See also: new features and options in version 3.0
News Manager (for GetSimple CMS) an easy to use plugin allowing you to publish posts/articles on your website.
Installation
You can download the latest version from GetSimple Extend. Unzip the downloaded file and copy its contents to your plugins folder. Go to the Plugins tab and make sure the plugin is activated. The required data folder and configuration file should be created automatically when you first access the plugin.
Upgrading
Upgrading from 2.2.x or later: just unzip and upload/copy news_manager.php and news_manager folder (with all its contents) to your plugins folder, overwriting existing files. (You should make a backup first, especially if you had patched it or changed some strings in language files.) - See also: Upgrading from 2.x to 3.x
Usage
To access the plugin, go to the News Manager submenu under the Pages tab. Once you're in the News Manager main admin panel, you will notice three buttons in the top-right corner: Settings, Create New Post and Filter. The Settings button allows you to change the behavior of the News Manager plugin, with the Create New Post button you can start writing new posts and the Filter button lets you search through long lists of posts.
Settings
The settings panel currently has 7 different options, each of which will be explained in more detail in the list below.
Writing Posts
Writing posts is more or less similar to writing pages: you can define a Post Title, and write the Post Content just as regular pages. Clicking on the Post Options button in the top-right corner reveals some extra options which are Slug/URL, Tags, Publication date and the ability to make a post Private. A page slug is a user- and SEO-friendly short text used in the post URL. In the Tags field you can enter whatever keywords you see fit, as long as they are single words and seperated by commas. The publication date speaks for itself and making a post private prevents it from being displayed on the front-end part of your website.
Sidebar Functions
A couple of optional sidebar functions are also availabe. They can be found in the file sidebar.php which is located in the /plugins/news_manager/inc/ folder. What follows is a short description of what each function does:
For example, to show a list of recently published articles in the sidebar, simply put the following code in a component (e.g. sidebar) or in your theme template:
<?php nm_list_recent(); ?>
SEO
- See function/template tag nm_post_title (since News Manager 2.3.x) to have a proper <title>
- Recommended:
(update) Since News Manager 3.5:
Edit your template(s) and change get_header
to nm_get_header
(or get_i18n_header
to nm_get_i18n_header
if you use mvlcek's *I18N* plugin). This way your posts, archives and tag pages will have proper canonical meta tags.
Before News Manager 3.5:
Change your template's <?php get_header(); ?>
to:
<?php get_header(false); ?>
- This way your site won't have the canonical meta tag (or else, because of the way GetSimple works, all posts have the same canonical URL, that of the news page)
Languages
There are multiple language files included, they can be found in the /plugins/news_manager/lang/ folder. You can create your own language file by translating any of the existing ones. Please contact me (via the GS forum topic or PM) when you have created a new language file and I will include it in the next release.
CSS
This plugin uses various CSS classes (title, date, content, etc), but you have to write your own CSS rules in order to apply a style of your liking. CSS code for the GetSimple Innovation theme is shown below.
.nm_post {
padding: 0;
margin-bottom: 50px;
}
.nm_post h3 {
margin-bottom: 5px;
}
.nm_post p {
margin-bottom: 10px;
}
.nm_post_title a {
text-decoration: none;
}
.nm_post_title a:hover {
text-decoration: underline;
}
.nm_post_date {
color: #999;
font-size: 11px;
}
.nm_post_content {
margin-bottom: 20px;
}
.nm_post_meta {
padding: 2px 5px;
border: 1px solid #ccc;
background-color: #f9f9f9;
font-size: 11px;
}
.nm_post_back {
margin-top: 20px;
font-size: 11px;
}
.nm_post_back a {
text-decoration: none;
}
.nm_post_back a:hover {
text-decoration: underline;
}
.nm_page_nav .left {
float:left;
text-align:left;
}
.nm_page_nav .right {
float:right;
text-align:right;
}
aside .section a, aside .section a {
text-decoration: none;
}
aside .section a:hover, aside .section a:hover {
text-decoration: underline;
}
aside .section a.large {
font-size: 22px;
}
Customization
Since version 2.4.0 you can redefine all frontend language strings, allowing some basic customization. (With previous versions of the plugin, some of them could be modified by editing the language file, but then you had to be careful not to overwrite it when upgrading.)
To use this feature, you can insert some lines in your site's gsconfig.php file. Here's an example where we redefine the "Published on" string, the date format and those three dots after an excerpt:
$nm_i18n = array();
$nm_i18n["PUBLISHED"] = "Posted on";
$nm_i18n["DATE_FORMAT"] = "%d.%m.%Y";
$nm_i18n["ELLIPSIS"] = "...";
The first line is recommended.
This is the full list of frontend strings (with their default values):
$nm_i18n["FOUND"] = "The following posts have been found:",
$nm_i18n["NOT_FOUND"] = "Sorry, your search returned no hits.",
$nm_i18n["NOT_EXIST"] = "The requested post does not exist.",
$nm_i18n["NO_POSTS"] = "No posts have been found.",
$nm_i18n["PUBLISHED"] = "Published on",
$nm_i18n["TAGS"] = "Tags",
$nm_i18n["OLDER_POSTS"] = "← Older Posts",
$nm_i18n["NEWER_POSTS"] = "Newer Posts →",
$nm_i18n["SEARCH"] = "Search",
$nm_i18n["GO_BACK"] = "<< Go back to the previous page",
$nm_i18n["ELLIPSIS"] = " [...]",
$nm_i18n["LOCALE"] = "en_US.utf8,en.utf8,en_US.UTF-8,en.UTF-8,en_US,en",
$nm_i18n["DATE_FORMAT"] = "%b %e, %Y"
It's not necessary to insert all lines, only those corresponding to texts you want to redefine (as in the example above).
Note that if you have non-English (US-ASCII) characters you must use a text editor that supports UTF-8 without BOM (e.g. Notepad++ for Windows) or use html entities for charactes like ä, é, ñ, ...
That's it, I hope you will enjoy it!
(Based on roog's original documentation in the first post of the old News Manager forum thread.)