Posts: 3,491
Threads: 106
Joined: Mar 2010
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/Ne...c/site.php
(note: only valid for News Manager 3.1)
Posts: 258
Threads: 37
Joined: Jun 2014
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 }}" target="_blank">{{ post_title }}</a><span class=nm_post_date> am {{ post_date }}</span></li></ul>', 'Tagname');?>
Posts: 3,491
Threads: 106
Joined: Mar 2010
Put your <ul> and </ul> tags outside the function, like this:
PHP Code: <ul style="margin-bottom:0" class="nm_recent"> <?php nm_custom_display_recent('<li><a href="{{ post_link }}" target="_blank">{{ post_title }}</a><span class="nm_post_date"> am {{ post_date }}</span></li>', 'Tagname'); ?> </ul>
Posts: 258
Threads: 37
Joined: Jun 2014
2015-03-15, 22:30:25
Of course...
Thank you!
Posts: 258
Threads: 37
Joined: Jun 2014
2015-03-17, 02:02:23
(This post was last modified: 2015-03-17, 02:03:48 by Hypertexter.)
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 }}" target="_blank">{{ post_title }}</a><span class="nm_post_date"> am {{ post_date }}</span></li>', 'Tagname'); ?>
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
Posts: 3,491
Threads: 106
Joined: Mar 2010
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>...
Posts: 258
Threads: 37
Joined: Jun 2014
2015-03-17, 17:38:33
(This post was last modified: 2015-03-17, 18:20:53 by Hypertexter.)
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
![Exclamation Exclamation](http://get-simple.info/forums/images/smilies/exclamation.gif) I found this:
http://stackoverflow.com/questions/90492...-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
Posts: 3,491
Threads: 106
Joined: Mar 2010
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!
Posts: 258
Threads: 37
Joined: Jun 2014
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
Posts: 3,491
Threads: 106
Joined: Mar 2010
(2015-03-20, 05:18:35)Hypertexter Wrote: 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.
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:
(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...
Posts: 3,491
Threads: 106
Joined: Mar 2010
(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? [...]
I suppose that for 3.2 I can add another custom setting that allows changing that <em> by the markup of your choice...
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
(to use <author> instead of <em>)
Posts: 258
Threads: 37
Joined: Jun 2014
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"
leads to HTML:
Code: <span itemprop="trial" class="nm_post_date">...</span>
Is that a feature? LOL
Bye
Hypertexter
Posts: 3,491
Threads: 106
Joined: Mar 2010
(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:
I wanted to comment my various custom settings and found an effect. The custom setting
Code: markupPostDate span /itemprop="trial"
leads to HTML:
Code: <span itemprop="trial" class="nm_post_date">...</span>
![Rolleyes Rolleyes](http://get-simple.info/forums/images/smilies/rolleyes.gif)
Is that a feature? LOL
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.
Posts: 258
Threads: 37
Joined: Jun 2014
2015-03-25, 19:00:02
(This post was last modified: 2015-03-25, 19:00:54 by Hypertexter.)
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
Posts: 3,491
Threads: 106
Joined: Mar 2010
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]
RewriteRule ^blog/post/?$ http://www.domain.de/blog [R=301,L]
(just after the RewriteBase line, before the other rules)
Posts: 6,266
Threads: 181
Joined: Sep 2011
Why put domain names in rewrites?
Posts: 258
Threads: 37
Joined: Jun 2014
@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 ![Idea Idea](http://get-simple.info/forums/images/smilies/lightbulb.gif)
I did not know.
Bye
Hypertexter
Posts: 1
Threads: 0
Joined: Apr 2015
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?
Posts: 3,491
Threads: 106
Joined: Mar 2010
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...
Posts: 5
Threads: 0
Joined: Apr 2015
Good plugin.
Any plans to support Markdown ? Once you go Markdown you never go back to wysiwyg.
Posts: 3,491
Threads: 106
Joined: Mar 2010
Thank you.
Yes, I intend to support Markdown. Maybe integrating News Manager with this plugin in some way.
Posts: 5
Threads: 0
Joined: Apr 2015
2015-04-08, 23:06:32
(This post was last modified: 2015-04-08, 23:06:52 by YouShallNotPass.)
Thats cool. I use that plugin also and it functions great.
Posts: 3
Threads: 0
Joined: May 2013
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..
Posts: 50
Threads: 10
Joined: Apr 2015
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?
Posts: 3,491
Threads: 106
Joined: Mar 2010
(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
|