Posts: 3,491
Threads: 106
Joined: Mar 2010
This thread is for News Manager (updated) beta versions.
GitHub repo (dev version): https://github.com/cnb/News_Manager-getsimplecms
Posts: 3,491
Threads: 106
Joined: Mar 2010
News Manager 3.2 beta 27 available
Download: https://github.com/cnb/News_Manager-gets...dd38b2.zip
NEW FEATURES:
- Added support for GS 3.2 author Display Name, defined in GS settings (@Oleg06)
(No need to use NM 3.1's $NMAUTHOR array in gsconfig, though it is still supported)
- New custom setting for author name's markup (@Hypertexter)
For example, to have <author> instead of <em>:
markupPostAuthorName author
- Optionally show disabled items in older/newer navigation
Custom setting navOldNew a is now supported
CHANGES:
- Language fallback
If NM does not have a language file that matches the one selected by the user in GetSimple's backend, tries to find another one instead of falling back to en_US.
For example: es_MX should fallback to es_ES; de_CH to de_DE, ...
- Optimization: read index/cache file only once
Before this, posts.xml was read from disk several times. Rendering news pages should be a bit faster now (if you use sidebar functions like nm_list_recent, nm_list_archives, etc.)
- Regenerate post cache if xml files changed
Detects if post files have been added/renamed/deleted manually (ftp or whatever), then recreate posts.xml. Very basic: checks when in backend, and only slug changes.
- Allowed image sizes are registered to prevent arbitrary generation of thumbnail files (pic.php script)
FIXES:
- fixed: search is case sensitive with multibyte charsets (found by Russian forum user Алексей)
- fixed: bad results if leading/trailing/extra spaces in search query + fix for empty queries
- fix display of private post checkbox/label (was not aligned properly due to changes in GS 3.1). Also, the checkbox has been moved to the left of the private label
- fixed: code inside <style>, <script> tags is not removed from excerpts (strip_tags)
Feedback much appreciated. Please report any issues you find.
Posts: 3,491
Threads: 106
Joined: Mar 2010
Here's an updated version of News Manager Addons: 0.9.3.2 (beta)
http://www.cyberiada.org/cnb/data/upload...2-beta.zip
works properly with the new feature in NM 3.2 beta for displaying authors' display names.
I'll upload it to Extend soon.
Posts: 3,491
Threads: 106
Joined: Mar 2010
News Manager 3.3 beta 28 available
Download: https://github.com/cnb/News_Manager-gets...b976fc.zip
This version only has some new options/features:
Warning about unsaved changes
both in edit_post and edit_settings pages, when you leave the page by going back or clicking on any backend link.
Feedback is very welcome - I'd be grateful if you test this in several browsers.
nm_tag_list() options
- classcurrent: specify the class you want to have in the current tag. (@GPB61)
Example:
Code: nm_tag_list(array( 'classcurrent' => 'active' ));
- showcount: display the number of posts for each tag. Example:
Code: nm_tag_list(array( 'showcount' => 1 ));
You can combine both:
Code: nm_tag_list(array( 'classcurrent' => 'active', 'showcount' => 1 ));
nm_list_archives() options
- showcount: display the number of posts for each month/year archive. Example:
Code: nm_list_archives(array( 'showcount' => 1 ));
- dateformat: lets you use your custom date format for the archive list. Example:
Code: nm_list_archives(array( 'dateformat' => '%m.%Y' ));
(can be combined too)
Posts: 6,266
Threads: 181
Joined: Sep 2011
about leaving with changes, beforeunload checking should work in most browsers, i know it does not in mobile safari, it handled leaving forms on its own, so you still might get warnings, but it is not reliable. ( if you find a decent polyfill let me know, if you are using that lib you posted ill test it, we need a cross browser solution for core. )
also you do inline code now with \[c\] tags
nm_list_archives(array( 'dateformat' => '%m.%Y' ));
Posts: 3,491
Threads: 106
Joined: Mar 2010
Yes, I'm using that lib I told you ( jquery AreYouSure)
I use onbeforeunload in edit_post.php to make it work (I hope) with ckeditor. In edit_settings.php the code is simpler ( https://github.com/cnb/News_Manager-gets...705a3e5d04 )
Posts: 1,920
Threads: 87
Joined: Apr 2010
Hi, Carlos, lost sight of the update, as it was in the hospital. tested the new plugin, it works just fine.
http://getsimple.business-website.ru/novosti/
Posts: 3,491
Threads: 106
Joined: Mar 2010
Nevermind, and thanks for testing.
I hope you're okay.
Posts: 5
Threads: 1
Joined: Jun 2014
Hello Carlos,
News Manager is a great plugin we're using on most clients' websites however how to add the mulilanugage support to it for websites running multilanguages use I18N plugin?
Thank you!
Posts: 3,491
Threads: 106
Joined: Mar 2010
NM doesn't currently support multiple languages. Some users (like TeeJay) do it with tags and custom template code.
However for multilang sites I recommend using I18N Search (and/or Special Pages)
If you want to stick with NM another possible workaround is using NM clones: http://get-simple.info/forums/showthread...8#pid53538
PS please use that thread, this one is only for beta versions.
Posts: 3,491
Threads: 106
Joined: Mar 2010
News Manager 3.3 beta 29 available
Download: https://github.com/cnb/News_Manager-gets...50d64e.zip
This version only has a few more options/features:
Restrict access to NM settings
If the MultiUser plugin is installed, you'll see a new permission checkbox that allows hiding and blocking access to the News Manager Settings page.
CKEditor support
- allow overriding CKeditor default config values via GSEDITOROPTIONS (like GS since 3.2.2, I believe)
- support for CKeditor custom toolbar id/name, like GS since 3.2.2: GSEDITORTOOL supports custom toolbar ids, not only "basic", "advanced" or custom js array. (@stwneu)
Maximum posts in tag view
- new custom setting maxPosts to limit the number of posts displayed on tag pages. (@D.O., @lnickel)
Usage:
Or, if using nm_show_tag in template or component:
Code: nm_set_option('maxposts', 5);
nm_show_tag('books');
Note: the custom setting is ignored in tag pages if tagPagination is enabled
(see other changes in NM 3.3 here: 3.3 beta 28)
Posts: 1,920
Threads: 87
Joined: Apr 2010
it would be good to show users only the posts written by them
http://getsimple-themes.ru/nm/
Posts: 3,491
Threads: 106
Joined: Mar 2010
Thanks for the suggestion. Added to the to-do list.
However, unless there's demand for this (do you need it?), I'll leave it for some future version.
As always, thanks for testing.
Posts: 1,920
Threads: 87
Joined: Apr 2010
believe me, users from Russia, the demand for it there
Posts: 185
Threads: 8
Joined: Apr 2012
Hi Carlos, I have 2 request for you
1. would it be possible to integrate "Similar Posts" into News Manager ?
2. I know that engine for displaying of news main page is cool and works fine, but would it be possible to give developers more control over the functions ? I mean:
- give option to override functions responsible for printing output (like in wordpress, if custom function exists, skip default function) or
- give option to define custom function in settings, something like "main function nm_list_post_custom"
what do you think ?
Posts: 3,491
Threads: 106
Joined: Mar 2010
(2015-11-16, 23:11:35)morvy Wrote: Hi Carlos, I have 2 request for you ![Smile Smile](http://get-simple.info/forums/images/smilies/smile.gif)
1. would it be possible to integrate "Similar Posts" into News Manager ?
I prefer not to add complementary functions like yours ATM. Maybe in the future... ( added to the todo/tothink list)
(2015-11-16, 23:11:35)morvy Wrote: 2. I know that engine for displaying of news main page is cool and works fine, but would it be possible to give developers more control over the functions ? I mean:
- give option to override functions responsible for printing output (like in wordpress, if custom function exists, skip default function) or
- give option to define custom function in settings, something like "main function nm_list_post_custom"
what do you think ?
Definitely it would be nice to have some more flexible way to customize posts' layout. All this stuff with showfields, markup/class/etc custom settings is somewhat of a temporary solution. I have custom post rendering in the to-do list... but I still haven't decided how to implement it - I was thinking about using a template file or a component to store the (each) post layout (in PHP à la WordPress, or with {{tokens}}), etc... but your idea of a custom function is interesting.
Posts: 185
Threads: 8
Joined: Apr 2012
1. OK - will continue putting it into functions.php
2. now I have my custom display function in functions.php and after each update I just modify site.php file where I replace the function's name, so maybe just clause if exists would be fine
Posts: 3,491
Threads: 106
Joined: Mar 2010
News Manager 3.3 beta 30 available
Download (GitHub)
Archives by tag (@arseny89)
You can now display archives (monthly/yearly) of posts having some tag.
Enable 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:
- For a given tag:
nm_list_archives(array( 'tag'=>'The Tag' ));
- For the current tag (if in a tag page):
nm_list_tag_archives();
(Both functions also accept array parameters 'showcount', 'dateformat', ...)
Admin/backend (post list) pagination (@xxdex)
This is especially useful if you have a lot of posts.
- Prev/Next + numbered navigation
- "show all" link
- posts per page: default 15 - custom via gsconfig.php define('NMPAGINATION', 25); - 0 or false to disable pagination
- basic, unstyled for now
Redefinable language strings for backend too
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")
Other
Fixed: warning about unsaved changes was not working properly in previous beta.
As always, feedback is very welcome.
(see other changes in NM 3.3 here: beta 28 and beta 29)
Posts: 1,920
Threads: 87
Joined: Apr 2010
2016-02-13, 00:00:29
(This post was last modified: 2016-02-13, 00:02:22 by Oleg06.)
http://getsimple.business-website.ru/nov...ive=201510
empty
and the code define('NMPAGINATION', 3); is not brought results
Posts: 3,491
Threads: 106
Joined: Mar 2010
(2016-02-13, 00:00:29)Oleg06 Wrote: http://getsimple.business-website.ru/nov...ive=201510
empty
Could it be you did not specify tagArchives d in Custom Settings?
(Perhaps I should enable tag archives by default...)
(2016-02-13, 00:00:29)Oleg06 Wrote: and the code define('NMPAGINATION', 3); is not brought results
It works for me: I get 3 posts listed per page in NM main admin panel.
Can you check it again, please?
Thanks for testing so quickly.
Posts: 1,920
Threads: 87
Joined: Apr 2010
2016-02-13, 04:42:00
(This post was last modified: 2016-02-13, 04:46:43 by Oleg06.)
I realized it work in the admin
http://prntscr.com/a2ex5h
yes it works now, I have a lot of difficulties with the translation
Posts: 3,491
Threads: 106
Joined: Mar 2010
News Manager 3.3 beta 31 available
Download (GitHub)
Make post images/thubnails link to original (full-size) images (@dvawolk)
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
(see previous changes in NM 3.3 here: beta 28, beta 29 and beta 30)
Posts: 1,920
Threads: 87
Joined: Apr 2010
this is a useful function, but then you need to add a class to this link so that you can use scripts
classimageLink
Posts: 3,491
Threads: 106
Joined: Mar 2010
Thank you Oleg.
Added custom setting classPostImageLink
If you want to test it, replace news_manager/inc/site.php (beta 30) with:
https://github.com/cnb/News_Manager-gets...c/site.php
Posts: 1,920
Threads: 87
Joined: Apr 2010
2016-02-14, 03:05:16
(This post was last modified: 2016-02-14, 06:57:35 by Oleg06.)
everything just works great, I did not expect that everything will be so easy
http://getsimple.business-website.ru/novosti/
Click on the picture.
For zoom image I have used this plugin.
http://get-simple.info/extend/plugin/lig...lugin/997/
|