Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
(2017-02-18, 02:39:52)Artur Wrote: One more question. In grid which I use the classes look like "6u 12u$(small)" - and I cannot put it into the NM classes in custom setting, it shows "6u 12usmall" without other symbols. How can I fix it?

Download this zip and replace news_manager/inc/site.php with the patched version inside the file.
Characters !, %, $, ( and ) will be allowed now.
(Valid for NM 3.4 and 3.4.1)
Reply
Hello @Carlos,

I am trying to understand how templates work for the blog.
I understand that you can add classes etc., and create templates for Main and Single posts, but this over-rides the complete page template.

Is it possible to just use a Post chunk that includes place holders for the posts data?
For example:


Code:
<section class="pb0 bg-secondary">
    <div class="container">
        <div class="feed-item mb96 mb-xs-48">
            <div class="row mb16 mb-xs-0">
                <div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 text-center">
                    <h3>{{PAGE-TITLE}}</h3>
                    <h6 class="uppercase mb16 mb-xs-8"><i class="icon fa fa-calendar"></i> {{DATE}} <i class="icon fa fa-thumb-tack" style="padding-left:30px;"></i> {{TAGS}} </h6>
                </div>
            </div>
            <div class="row mb32 mb-xs-16">
                <div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1">
                    {{CONTENT}}
                </div>
            </div>
        </div>
    </div>
</section>


So that each post would be in this format.

Is this beyond the scope of this plugin or is there an alternative method for doing something like this?


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply
NM 3.5 will have support for custom post rendering.
I'll post a beta in this other thread when it's more or less ready.
Reply
Hi,

I have NM set up and working fine. I would like to add an image as a header on the page used to show the posts but can't figure out how to do this. Obviously the function that gets the content is returning just the posts and ignoring any static text or images on the news page. Is there any way I can achieve what I'm trying to do?

Thanks,
Paul.
Reply
If you want to always display the newspage content before the list of posts or single post, insert this in your template, before the <?php get_page_content(); ?> line:

Code:
<?php if (nm_is_site()) getPageContent(return_page_slug()); ?>
Reply
Fantastic - thanks. Worked like a charm.
Reply
Carlos, Hi!
How to clone the plugin? I need 4 news feeds.
Thank you
Reply
Here you have 3 clones:
http://www.cyberiada.org/cnb/news-manage...ger-clones
(They're still version 3.2.2, I have to update them...)

Note that this is just a (kludgey) workaround until I add multi-section support.
Reply
Hi all,

I've got what is probably a really dumb question, but I just noticed something in my meta data that I wanted info on.

Using News Manager (updated) Version 3.3 -- I noticed in my pages:
<link rel="canonical" ....   instructions that would, if I understand it correctly, be telling Google that a specific URL should be indexed as the canonical URL ??? Which in this case is the "news manager" blog's root:

For example I want Google to index this blog post:
http://scramblekit.uk/review/index.php?i...side-pouch

But the meta data for that post includes:

Code:
<link rel="canonical" href="http://scramblekit.uk/review/index.php?id=outdoor" />


Doesn't this mean Google won't index the actual post URL, instead indexing:
http://scramblekit.uk/review/index.php?id=outdoor

I'm confused.

Also, is it the News Manager plugin that creates this entry or GetSimple. Since it's not in my template.

Sorry for such a dumb question, I should know this really.

Any help much appreciated!

C.
Reply
Just in case anyone else has a similar issue and like me, didn't RTFM (actually I did way back, but changed my theme and didn't re-readTFM):

Recommended: Change your template's
Code:
<?php get_header(); ?>
to:

Code:
<?php get_header(false); ?>
- This way your site won't have the canonical meta tag (or else, because of the way GetSimole works, all posts have the same canonical URL, that of the news page).

-------------

Oooops -- sorry!

C.
Reply
That's the easiest way, but if you prefer to have canonical urls in your site that work with NM posts, you can do this:
http://get-simple.info/forums/showthread...5#pid54725
or this:
http://get-simple.info/forums/showthread...5#pid54785
Reply
Hi Carlos

Thanks, that's useful. Forgive me as I'm a little tired, but I think in my case that's not necessary. The way I'm using News Manager is as a filter, so I'm using 2 different template files:
The output / results page (based on tags) is the News Manager root, and it uses:
Code:
<?php get_header(); ?>

Then you click on one of the "results" (i.e. "read more ..." link to post) and that takes you to the post which uses a different template which has:
Code:
<?php get_header(false); ?>
To see what I mean, go here:
http://scramblekit.uk/review/
Clicking on the Baselayer Square, gives you:
http://scramblekit.uk/review/?id=outdoor&tag=base
A list of tagged posts (with read more ...), then you click on the option you're after, e.g. "Best Cold Weather Baselayer" which would take you here:
http://scramblekit.uk/review/index.php?i...yer-ls-top

I'm trying to get my head round how Google deals with this. Have I got this right for my use case? So the "results output" preview post (tag output) list is canonical and the actual full post unique URL (is not canonical).

That code will be useful for my other sites, but perhaps not this one?

Thanks again for the quick reply and for the code. Any clarification would put this to bed, and me too, then I can enjoy the weekend. Big Grin

C.

EDIT: My light-headed understanding, is that I'm pretty much mimicking the code options you gave above by using 2 templates One for single posts and the other for the News Page.
Reply
A separate issue I've just bumped into regarding the RSS part of News Manager:
Here's my feed:
http://scramblekit.uk/review/index.php?id=rss

If you click on the first or any links, the & has been turned into &amp; breaking the URL, so:


Code:
http://scramblekit.uk/review/index.php?id=outdoor&post=rab-vertex-pants-lightweight-softshell-trousers


becomes the broken:

Code:
http://scramblekit.uk/review/index.php?id=outdoor&amp;post=rab-vertex-pants-lightweight-softshell-trousers


Anyone else have the same issue and if so, is there a way to fix it. Tried Google and forum search, but not too helpful.

Again, any help greatly appreciated.

C.
Reply
(2017-04-15, 03:08:45)carpman Wrote: A separate issue I've just bumped into regarding the RSS part of News Manager:
[...]
If you click on the first or any links, the & has been turned into &amp; breaking the URL, so:
[...]

This happens with NM 2.2.5 or later with default non-fancy URLs, because of a change I made to fix a different issue (#8). :-(

To fix this, edit news_manager_rss.php, find line 161 and change:
Code:
$url     = htmlspecialchars(nm_get_url('post') . $slug, ENT_QUOTES, 'UTF-8');
to:
Code:
$url     = nm_get_url('post') . $slug;
Reply
Excellent, thanks, Carlos.

Any thoughts on my previous post, just looking for confirmation that I've got my head around this canonical thing in regard to Google SEO.

Thanks again, you're a star!

C.
Reply
I think that the function in the second link I posted would work for you - you'd have proper canonical urls in your single-post and single-tag news pages. But anyway, you can try and check the generated source code to see if you get what you need.
Reply
Thanks. Yes, I'd checked the source and it all looked fine, in addition since I'm using 2 different templates anyway for individual posts and the news manager main pages I'll stick with what I've got for now. Google just indexed a single post with the proper URL, so all looks good.

I've bookmarked that code, for future use.

Thanks again for all your help.

C.
Reply
News Manager 3.3 onwards has issues with the Multi-User plugin 1.8.2 (the one available in Extend).
See here: http://get-simple.info/forums/showthread...9#pid60009
(can edit existing users permissions, but cannot add new users if NM enabled)
Reply
I'm probably going to fix the Multi-User issue (see previous post) in News Manager this way:

- custom permission "News Manager Settings" will be removed.
- users that have access to Theme or Plugins management pages will have access to NM Settings.

I suppose that this solution will be fine for most sites using MU 1.8.x and NM 3.3+

Opinions and suggestions welcome.
Reply
Thank you for such a fabulous plug-in. I love using it. The individual posts have a "back" link to previous posts. How do I add a link to "next" when there are more posts after it?
Reply
(2017-04-29, 17:18:39)joyofweaving.com Wrote: Thank you for such a fabulous plug-in. I love using it. The individual posts have a "back" link to previous posts. How do I add a link to "next" when there are more posts after it?

I'll eventually add the previous/next posts feature - it's still in the to-do list (#6)

In the meantime you can use this snippet:

PHP Code:
<?php
if (nm_is_single()) {
  
$posts nm_get_posts();
  
$current nm_post_slug(false);
  
$count 0;
  foreach (
$posts as $post) {
    if (
$post->slug == $current) break;
    
$count++;
  }
  
$next $count >= $posts[$count-1] : false;
  
$prev $count count($posts) ? $posts[$count+1] : false;
?>
<div class="nm_prev_next">
<?php if ($prev) { ?>
  <div class="nm_previous_post"><a href="<?php echo nm_get_url('post'),$prev->slug?>" title="<?php echo $prev->title?>">Previous post</a></div>
<?php ?>
<?php 
if ($next) { ?>
  <div class="nm_next_post"><a href="<?php echo nm_get_url('post'),$next->slug?>" title="<?php echo $next->title?>">Next post</a></div>
<?php ?>
</div>
<?php
}
?>

You can paste it in your template, or create a component (e.g. nm-prev-next) and then enable NM Custom Settings and enter this:
Code:
single componentBottomPost nm-prev-next
(or use componentAfterPost instead if you want to have the links under the "go back" link)

You can style the links using classes .nm_previous_post, .nm_text_post, etc. (or if you use a Bootstrap-based template you may prefer to change all those <div>'s to <ul class="pager"> and <li>'s)
Reply
(2017-04-27, 02:39:13)Carlos Wrote: I'm probably going to fix the Multi-User issue (see previous post) in News Manager ....
Thank you! Warmly waiting for this process ...
Maybe:
- can add photo/avatar and displaying bio
- filter news by author, so the index can be sourced from the tag
Smile
Reply
(2017-04-27, 02:39:13)Carlos Wrote: I'm probably going to fix the Multi-User issue (see previous post) in News Manager this way:

- custom permission "News Manager Settings" will be removed.
- users that have access to Theme or Plugins management pages will have access to NM Settings.

I suppose that this solution will be fine for most sites using MU 1.8.x and NM 3.3+

Opinions and suggestions welcome.

This sounds like a good solution, how long until it becomes available?


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply
I dont remember if i asket this before, but is there a snippet to show current news related posts?.
Like if i have news which has tag moped and when i click that news to read the full post i can show related news in sidebar.
Reply
http://get-simple.info/forums/showthread...1#pid50761
Reply




Users browsing this thread: 5 Guest(s)