Changelog for this version:
Back-end (admin) improvements:
Front-end functions and settings:
Changes and fixes
Languages
Both in edit_post and edit_settings pages, if you have made any changes and try to leave the page by going back or clicking on any link, an alert will be displayed.
With the new NMWARNUNSAVED
gsconfig setting you can disable this warning:
define('NMWARNUNSAVED', false);
This is especially useful if you have a lot of posts.
define('NMPAGINATION', 25);
or set it to 0
or false
to disable paginationIt looks like this:
Optional top admin "News" tab in backend, instead of a sidebar link under the Pages tab . Note: this only works with GetSimple 3.1 or later.
define('NMTAB', true);
$nm_i18n['NEWS_TAB'] = "My News Tab";
in gsconfig.If the MultiUser (user-managment) plugin is installed, you'll see a new permission checkbox that allows hiding and blocking access to the News Manager Settings page.
You can now customize any of the plugin texts, not only for the frontend but also for the backend, without needing to edit language files. You can do this by assigning values to the $nm_i18n array in gsconfig.php, like this:
$nm_i18n['NEW_POST'] = "Add post";
(instead of "Create New Post")
GSEDITOROPTIONS
(like GS since 3.2.2, I believe)GSEDITORTOOL
supports custom toolbar ids, not only "basic", "advanced" or custom js array. classcurrent: specify the class you want to have in the current tag. Example:
nm_tag_list(array( 'classcurrent' => 'active' ));
showcount: display the number of posts for each tag. Example:
nm_tag_list(array( 'showcount' => 1 ));
You can combine both:
nm_tag_list(array( 'classcurrent' => 'active', 'showcount' => 1 ));
showcount: display the number of posts for each month/year archive. Example:
nm_list_archives(array( 'showcount' => 1 ));
dateformat: lets you use your custom date format for the archive list. Example:
nm_list_archives(array( 'dateformat' => '%m.%Y' ));
Can be combined too. See also tag parameter to filter buytag.
You can now display archives (monthly/yearly) of posts having some tag.
First, enable this with custom setting tagArchives d
(dynamic, default) or tagArchives f
(fancy, folder)
For fancy option, a new rewriterule in htaccess is required.
Usage: Listing archives in sidebar/template:
nm_list_archives(array( 'tag'=>'The Tag' ));
nm_list_tag_archives();
(Both functions also accept array parameters 'showcount', 'dateformat', ...)new custom setting maxPosts
to limit the number of posts displayed on tag pages.
Usage:
tag maxPosts 5
Or, if using nm_show_tag
in template or component:
nm_set_option('maxposts', 5);
nm_show_tag('books');
Note: the custom setting is ignored in tag pages if tagPagination
is enabled
Custom setting imageLink
now supports a 'full' parameter:
imageLink full
or if you want to enable this only for the single post view:
single imageLink full
New custom setting classPostImageLink
allows specifying a class for post images/thumbnails' links
Function nm_post_date()
It can be used in the single post view. (@singha-cz)
Optional parameters: date format (strftime, default as defined in the language file) and echo (default true)
Usage:
Current post date: <?php nm_post_date(); ?>
With a different format: <?php nm_post_date('%Y-%m-%d'); ?>
MONTHLIST
language string, comma-separated month names) for strftime parameter %B
, to override your server's month namesMONTHLIST_ALT
language string, comma-separated month names), supported by (non-standard) parameter %EB
- it can be used for genitive month names.Example for Russian months (nominative, genitive), with NM custom settings:
MONTHLIST Январь,Февраль,Март,Апрель,Май,Июнь,Июль,Август,Сентябрь,Октябрь,Ноябрь,Декабрь
MONTHLIST_ALT января,февраля,марта,апреля,мая,июня,июля,августа,сентября,октября,ноября,декабря
DATE_FORMAT %e %EB %Y
or in the language file:
"DATE_FORMAT" => "%e %EB %Y",
"MONTHLIST" => "Январь,Февраль,Март,Апрель,Май,Июнь,Июль,Август,Сентябрь,Октябрь,Ноябрь,Декабрь",
"MONTHLIST_ALT" => "января,февраля,марта,апреля,мая,июня,июля,августа,сентября,октября,ноября,декабря",
NO_POSTS
), just like the main news page.
(@DmitriyT)New updated German translation by @Markus00000 (Thanks also to @Connie for maintaining the original version).
Note when upgrading German language sites: There are some slight changes in front-end texts.
Now it's 100% translated. Thanks to @szrudi
Russian language file includes custom month names (genitive and nominative) and updated date format with correct full month name.