Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
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..
Reply
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?
Reply
(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
Reply
(2015-04-23, 14:05:09)ostryweb.cz Wrote: 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..

One way to do this:

If your page slug/id is, for example, my-page, and the specified tag is my-tag, edit your template and insert this after (or before) the <?php get_page_content(); ?> line:

PHP Code:
<?php if (return_page_slug()=='my-page'nm_show_tag('my-tag'); ?>
Reply
Hey!
Sorry for my stupid questions... I'm new to GS and to making websites in general Blush Which file do I have to edit in order to change the look of the first news-manager page? I would like to add a "slide-show newsbox" above it. I tried it with a new template, but then this newsbox appears on all news-manager pages.
Reply
(2015-04-27, 17:37:27)stwneu Wrote: Which file do I have to edit in order to change the look of the first news-manager page? I would like to add a "slide-show newsbox" above it. I tried it with a new template, but then this newsbox appears on all news-manager pages.

In your template:
Code:
<?php if (nm_is_home()) { ?>

... YOUR SLIDESHOW CODE GOES HERE ...

<?php } ?>
Reply
The other day morvy posted an interesting piece of code for News Manager, that displays a list of similar/related posts (having tags in common):
http://get-simple.info/forums/showthread...1#pid50761

A possible way to use it could be:
- paste the code into a new component, named e.g. nm-similar-posts
- enable Custom Settings and enter this below:
Code:
single componentBottomPost nm-similar-posts
Reply
Hello! 

I would like to add the date the post on top of the derivation of <?php nm_list_recent(); ?>. 
As far as I can understand, it is necessary to edit function

Code:
function nm_list_recent() {
 global $NMPAGEURL, $NMRECENTPOSTS;
 if ($NMPAGEURL == '') return;
 $posts = nm_get_posts();
 if (!empty($posts)) {
   echo '<ul class="nm_recent">',PHP_EOL;
   $posts = array_slice($posts, 0, $NMRECENTPOSTS, true);
   foreach ($posts as $post) {
     $url = nm_get_url('post') . $post->slug;
     $title = stripslashes($post->title);
     echo '  <li><span>this a date</span><br/><a href="',$url,'">',$title,'</a></li>',PHP_EOL;
   }
   echo '</ul>',PHP_EOL;
 }
}
Sorry for my English   Blush
Reply
(2015-04-29, 17:29:19)th0mas Wrote: I would like to add the date the post on top of the derivation of <?php nm_list_recent(); ?>.
As far as I can understand, it is necessary to edit function
[...]

Instead of editing the plugin's file, I suggest you rename your modified function (e.g. to nm_list_recent_2)  and paste it in your theme's functions.php file or in your template.

Another possibility is installing the News Manager Addons plugin and using its functions nm_list_recent_with_date or nm_custom_display_recent.
Reply
Hello,

today I saw a funny behaviour of my single post pages.

The h1 title of my blog overview page is an URL which links to itself. I use this since a longer time.

Today I saw that this h1 title is attached at the end of each single post h1 title.

I do not know where this comes from, and: Can I avoid it?

Thank you,
Hypertexter

I looked in Google cache and see the difference: Usually on the single post page I had the word "Blog" as h1 and the post title as h3. And since today I have the post title additionally as part of the h1: <h1>Post title - BLOG</h1>.

What happened? Confused

Exclamation  Found it out: I deleted the "<?php get_header(false);?>" in the header template. I thought it was unnecessary since the canonical option is commented out in my gsconfig.php. But it seems to have another function...
Reply
Yes, the get_header call in required for this to work, by default - and it has to be placed after the <title> tag to work properly with NM.

If you're interested I can tell you how to do it without get_header (by using custom setting titleTag and template tag nm_post_title).

Anyway, many other plugins require get_header to work - it is recommended to have it in the template (see the wiki).
Reply
Hey Carlos! So nice to see that all works great here!
:-D
Reply
Quote:many other plugins require get_header to work

Then I'll better continue using it.

Why has it to be called with "false",
PHP Code:
<?php get_header();?>
seems to work in the same way?

Thank you
Hypertexter
Reply
With get_header(false) the meta canonical tag is not rendered. If not set to false, all news pages (single posts, archives, tag pages...) have the same canonical url: the one of the main news page. This may be bad for SEO.

Another possibility is having the canonical tag on all GS pages except news pages, like:
Code:
<?php get_header(!nm_is_site()); ?>

or if you want to remove it only from single post pages:
Code:
<?php get_header(!nm_is_single()); ?>
Reply
Oh, interesting...

but they all only generate a canonical tag if canonical tags are switched on in gsconfig.php?
Reply
(2015-05-01, 18:28:51)Hypertexter Wrote: Oh, interesting...

but they all only generate a canonical tag if canonical tags are switched on in gsconfig.php?

Mates, it sounds really interesting but I'm a bit perplex,
because according the great G, canonical tag should be always used;
anyway I added get_header(!nm_is_site()); to a couple sites of mine to see the effects.
Reply
@Hypertexter
If you mean the GSCANONICAL setting, that's not for the meta tag, but to enable canonical redirects.
http://get-simple.info/wiki/config:gsconfig
Reply
@D.O.
Though it's one of the recommended methods to set the preferred URL, it's not required at all
https://support.google.com/webmasters/an...9066?hl=en
Reply
@Carlos,

is it possible to display "Display name" instead of "username" in News Manager when I enable showAuthor ? for example login is admin, but display name is Peter, another login is editor but display name is set to Rado .. ? GS has that feature, so I'm curious how to get those names displayed in News posts ..
thanks Smile
Reply
@morvy

Not currently possible, though it's in the to-do list:
https://github.com/cnb/News_Manager-gets...issues/201

In the meantime, you can define custom display names in gsconfig with $NMAUTHOR, see here:
http://www.cyberiada.org/cnb/news-manage...c-names%29
(since NM 3.1)
Reply
@Carlos

OK, I tried the canonical tag... but what is the good of automatically generated canonical tags? If every page generates one for itself in standard setting, you can make it or leave it.

Do www and non-www pages generate the same canonical tag? (I use 301 for this.)
Is the tag editable manually instead? This would be something else.

Hypertexter
Reply
Thanks Carlos ! this is totally acceptable solution Big Grin I don't understand how I could miss that in docs :/
Reply
(2015-04-30, 00:36:35)Carlos Wrote:
(2015-04-29, 17:29:19)th0mas Wrote: I would like to add the date the post on top of the derivation of <?php nm_list_recent(); ?>.
As far as I can understand, it is necessary to edit function
[...]

Instead of editing the plugin's file, I suggest you rename your modified function (e.g. to nm_list_recent_2)  and paste it in your theme's functions.php file or in your template.

Another possibility is installing the News Manager Addons plugin and using its functions nm_list_recent_with_date or nm_custom_display_recent.

Thx! News Manager Addons - is the best option
Reply
In news page excerpt that infamous [...] bracket still haunting there Big Grin.
Reply
You can change that string by enabling Custom settings and entering, for example:
Code:
ELLIPSIS "..."

or (with a blank before the dots)
Code:
ELLIPSIS " ..."
or any string you prefer.

Or if you just want to remove it:
Code:
ELLIPSIS ""
Reply




Users browsing this thread: 1 Guest(s)