News Manager (updated) - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: News Manager (updated) (/showthread.php?tid=3972) |
RE: News Manager (updated) - Carlos - 2015-03-15 Russian forum user Алексей found an issue with nm_search() template tag: case-insensitive search does not work with non latin, multibyte character sets (e.g. cyrillic). This will be fixed in the next release. If you need a fix now, you can replace news_manager/inc/site.php with this modified version: https://raw.githubusercontent.com/cnb/News_Manager-getsimplecms/5cb8028121c8c07aa51387a1e2925f8cde536ccb/news_manager/inc/site.php (note: only valid for News Manager 3.1) RE: News Manager (updated) - Hypertexter - 2015-03-15 Hello Carlos, today I tried to make a recent list with a custom template and filtered by a tag. I found "nm_custom_display_recent" for that task, and it works, but: I need to use "margin-bottom:0", since it produces an own <ul> for every line, and an empty line after each entry. (I want to have the standard ul-li look) Could this be done more elegant? My code is: PHP Code: <?php nm_custom_display_recent('<ul style="margin-bottom:0" class="nm_recent"><li><a href="{{ post_link }}" RE: News Manager (updated) - Carlos - 2015-03-15 Put your <ul> and </ul> tags outside the function, like this: PHP Code: <ul style="margin-bottom:0" class="nm_recent"> RE: News Manager (updated) - Hypertexter - 2015-03-15 Of course... Thank you! RE: News Manager (updated) - Hypertexter - 2015-03-17 Hello, I found something special when (News Manager language is "de_DE" and) the post date is inserted in a custom way, like: PHP Code: <?php nm_custom_display_recent('<li><a href="{{ post_link }}" or via "nm_custom_list_recent" in the same way: Dates with 1-digit day numbers get an extra white space before the day number, which is not nice for line breaks sometimes, for example: "(title text) am _3. Dezember 2014" Hypertexter RE: News Manager (updated) - Carlos - 2015-03-17 That's how PHP's strftime function (used by NM for localised dates) works. I could patch the plugin to remove that leading space in 1-digit days, but... What if you change the before {{ post_date }} by a normal space? Like: PHP Code: ...<span class="nm_post_date"> am {{ post_date }}</span>... RE: News Manager (updated) - Hypertexter - 2015-03-17 Hm... I see! A normal white space and the leading white space result in one white space... I wanted to avoid a date as the beginning of a new line on mobile devices, but never mind. Thank you Hypertexter I found this: http://stackoverflow.com/questions/904928/python-strftime-date-without-leading-0 and tried: DATE_FORMAT <time itemprop="datePublished" datetime="%Y-%m-%dT%H:%M:%S%z">%-e. %B %Y</time> and it seems to work on my server RE: News Manager (updated) - Carlos - 2015-03-17 Very interesting. So with a dash after the "%" you can remove the padding (spaces or zeroes) in any numeric modifier. It seems it's a (nonstandard) GNU extension for strftime. Nice to know - Thanks for sharing! RE: News Manager (updated) - Hypertexter - 2015-03-20 Hello Carlos, I tried to add author information to my posts, but I failed. I added "define('NMSAVEAUTHOR', true);" to the gsconfig.php and "showAuthor 1" to the custom settings of NM, but nothing happens. Do I need something else in NM 3.1? And when it works, will it make a meta information like "<author>John</author>", HTML5-like? Thanks, Hypertexter RE: News Manager (updated) - Carlos - 2015-03-20 (2015-03-20, 05:18:35)Hypertexter Wrote: I tried to add author information to my posts, but I failed. Existing posts (created before you enabled NMSAVEAUTHOR) don't have an author. Either re-edit and save them again, or define a default author for those posts in Custom Settings: Code: defaultAuthor John (2015-03-20, 05:18:35)Hypertexter Wrote: And when it works, will it make a meta information like "<author>John</author>", HTML5-like? No, it will make something like this: Code: <p class="nm_post_author">Author: <em>John</em></p> You can customize the markup for the author field container (default is p) with custom setting markupPostAuthor, however the author name will still be enclosed between <em>...</em> tags (currently hardcoded in the plugin). (Again, this will be more customizable when support for post templating is implemented...) I suppose that for 3.2 I can add another custom setting that allows changing that <em> by the markup of your choice... RE: News Manager (updated) - Carlos - 2015-03-21 (2015-03-20, 06:14:37)Carlos Wrote:(2015-03-20, 05:18:35)Hypertexter Wrote: And when it works, will it make a meta information like "<author>John</author>", HTML5-like?[...] Done (in the dev version). If you want to use this new custom setting in NM 3.1, just replace news_manager/inc/site.php by this version and enter this in Custom Settings: Code: markupPostAuthorName author RE: News Manager (updated) - Hypertexter - 2015-03-23 Hello Carlos, nice, thank you! Can I use defaultAuthor in custom setting and nmauthor in gsconfig.php at the same time? By the way: Perhaps I found an easter egg: I wanted to comment my various custom settings and found an effect. The custom setting Code: markupPostDate span /itemprop="trial" Code: <span itemprop="trial" class="nm_post_date">...</span> Is that a feature? LOL Bye Hypertexter RE: News Manager (updated) - Carlos - 2015-03-23 (2015-03-23, 00:32:41)Hypertexter Wrote: Can I use defaultAuthor in custom setting and nmauthor in gsconfig.php at the same time? Yes, you should be able to. (2015-03-23, 00:32:41)Hypertexter Wrote: By the way: Perhaps I found an easter egg: Doesn't work for me - I get bad markup instead. Only lines beginning with # or // are interpreted as comments (that is, ignored). You cannot add comments to a custom setting. RE: News Manager (updated) - Hypertexter - 2015-03-25 Hello, for better usability I would like to redirect user-shortened NM urls with these rules in .htaccess: RewriteRule ^/blog/tag http://www.domain.de/blog [R=301,L] RewriteRule ^/blog/post http://www.domain.de/blog [R=301,L] But they don't work. The other NM rules work fine: RewriteRule ^blog/tag/([^/.]+)/page/([^/.]+)/?$ index.php?id=blog&tag=$1&page=$2 [L] RewriteRule ^blog/tag/([^/.]+)/?$ index.php?id=blog&tag=$1 [L] RewriteRule ^blog/post/([^/.]+)/?$ index.php?id=blog&post=$1 [L] RewriteRule ^blog/page/([^/.]+)/?$ index.php?id=blog&page=$1 [L] RewriteRule ^blog/archive/([^/.]+)/?$ index.php?id=blog&archive=$1 [L] What can I do? (I use fancy urls in GS with %parent%/%slug%) Thanks Hypertexter RE: News Manager (updated) - Carlos - 2015-03-26 I don't know much about .htaccess stuff, but this seems to work for me: Code: RewriteRule ^blog/tag/?$ http://www.domain.de/blog [R=301,L] RE: News Manager (updated) - shawn_a - 2015-03-26 Why put domain names in rewrites? RE: News Manager (updated) - Hypertexter - 2015-03-26 @Carlos: That works for me, too, thank you! @shawn_a: I don't know, somebody showed me to do it like this and it worked... but you are right, the simple word "blog" does the same job I did not know. Bye Hypertexter RE: News Manager (updated) - grafix23 - 2015-04-03 Great plugin, but having an issue I can't quite figure out. Clean install, "Grill" Theme. Deleted the sample news posts and entered a new one. Great! Shows in the sidebar and the news page. Entered a second post...doesn't show! Deleted and retried, still does not show on either the sidebar or the news page. Post is not marked private and all tags are identical to post that shows properly. Any ideas? RE: News Manager (updated) - Carlos - 2015-04-03 Did you create that second post using NM's backend, or by copying/uploading it to data/posts? If you tell me (by PM if you prefer) your site's URL, I can take a look at it and maybe come up with some idea... RE: News Manager (updated) - YouShallNotPass - 2015-04-08 Good plugin. Any plans to support Markdown ? Once you go Markdown you never go back to wysiwyg. RE: News Manager (updated) - Carlos - 2015-04-08 Thank you. Yes, I intend to support Markdown. Maybe integrating News Manager with this plugin in some way. RE: News Manager (updated) - YouShallNotPass - 2015-04-08 Thats cool. I use that plugin also and it functions great. RE: News Manager (updated) - ostryweb.cz - 2015-04-23 Im sorry, if it was allready answered, its very hard to find anything on this forum (i get results for all threads).. Is it possible to have on one page list of articles with specified tag only? Same layout as front page.. RE: News Manager (updated) - stwneu - 2015-04-23 Hey, just one quick question: Is it possible to somehow add class="img-responsive" to all the images used in news page and the posts so that they resize according to the bootstrap framework? RE: News Manager (updated) - Carlos - 2015-04-23 (2015-04-23, 21:35:42)stwneu Wrote: Hey, just one quick question: Is it possible to somehow add class="img-responsive" to all the images used in news page and the posts so that they resize according to the bootstrap framework? Go to News Manager Settings, enable Custom Settings and enter: Code: imageClass img-responsive |