Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
I have very bad memory Smile
Reply
Hi, All.
I think i need some help...

I added Grill theme to my site which includes News Manager v3.0. It all works okay.
But when i update plugin to the v3.2.3, i get problems (I updated directly with Updater plugin.):

1. images in posts are not shown anymore
2. when i try to edit news post - i click select file for post image, it gives me internal server error.


I backed to v3.0 now and again it works okay (both problems appear only in latest version...)

My site blog is here www.jaya.si/simplecms/blog/ now it works because i reverted it to v3.0

Any clues?

Thank you and have a nice day!
Reply
Carlos will be along soon I expect.


I don't think I had any issue with upgrading News Manager using that template, but making other changes to the site or the plugin will often require an update to the htaccess file in the root of your site. See the bottom of the NM Settings page in the admin of your site.
Reply
@dvawolk

Can you check if, after updating the plugin, there's a .htaccess file in the plugins/news_manager/browser folder?
(That file should contain Allow from all)
Reply
(2016-01-12, 22:45:17)arseni89 Wrote: Hello Carlos. I want to ask you if is possible create "nm_list_archives" with a tag? I have a website with a lot of posts and I would to have one page with yearly archive only with one kind of tag. Thank you

This feature will be available in version 3.3.
You can already test it - I've just posted a new beta version
Reply
(2016-02-05, 00:07:52)Carlos Wrote: @dvawolk

Can you check if, after updating the plugin, there's a .htaccess file in the plugins/news_manager/browser folder?
(That file should contain Allow from all)

Hi, Carlos.
Sorry for late reply - i tried updating it manually today and it works without problem. the .htaccess file is the way it should be and all works flawlessly.

BTW, in the single post view i havent found the option to make the post image clickable for original size image... Am i missing something or is this the way it should be?

Thanks for such a fast reply - i missed get the notification... Undecided - now i am subscribed!

Best Regards,
Klemen
Reply
(2016-02-12, 21:56:40)dvawolk Wrote: BTW, in the single post view i havent found the option to make the post image clickable for original size image... Am i missing something or is this the way it should be?

There's no option for this in 3.2, but I'm adding it to 3.3 (via custom setting imageLink).
Check the latest beta 31 if you wish.
Reply
Hi Carlos,

Very very nice plugin, thanks a lot.

Perhaps i have missed something ! But when we are on a single post it seem News Manager thinks we are on parent page. 

so canonical tag is the URL of the parent post and not of the single post. For example on http://localhost/getsimple/blog/post/news-2  the canonical tag is <link rel="canonical" href="http://localhost/getsimple/blog/" /> instead of <link rel="canonical" href="http://localhost/getsimple/blog/post/news-2" />

   

So how to do to have a single page with a specific canonical. I have seen thread about this but without any solutions.

Regards, 
And keep improving.
It's good

Frédéric
Reply
Canonical URLs for single post pages:

In your template, change this line:
Code:
<?php get_header(); ?>
by this:
Code:
<?php
    if (nm_is_single()):
      get_header(false);
      echo "\n",'<link rel="canonical" href="',nm_post_url(false),'" />';
    else:
      get_header();
    endif;
  ?>
(If you use I18N, replace get_header by get_i18n_header)
Reply
(2016-02-13, 21:53:32)Carlos Wrote: Canonical URLs for single post pages:

In your template, change this line:

Code:
<?php get_header(); ?>
by this:

Code:
 <?php
   if (nm_is_single()):
     get_header(false);
     echo "\n",'<link rel="canonical" href="',nm_post_url(false),'" />';
   else:
     get_header();
   endif;
 ?>
(If you use I18N, replace get_header by get_i18n_header)

So nice that's exaclty what I want. Thanks a lot.
Reply
Hi Carlos,

I have another question about URL for articles (single post) and category (tag page).

1. If I add a tag for example "analytics" to an article so I have, for category page, an URL like this "http://localhost/getsimple/blog/tag/analytics". Is it possible to modify (perhaps .htaccess) to have an URL without /tag like this http://localhost/getsimple/blog/analytics ?

2. And I have for article an URL like this http://localhost/getsimple/blog/post/news-2. Is it possible (again perhaps with .htaccess) to have a URL with name of category (/analytics) instead of /post like this http://localhost/getsimple/blog/analytics/news-2 

or if the point 2 is not possible how to delete /post from the URL to have http://localhost/getsimple/blog/news-2

Regards,
Frédéric
Reply
(2016-02-13, 06:16:27)Carlos Wrote:
(2016-02-12, 21:56:40)dvawolk Wrote: BTW, in the single post view i havent found the option to make the post image clickable for original size image... Am i missing something or is this the way it should be?

There's no option for this in 3.2, but I'm adding it to 3.3 (via custom setting imageLink).
Check the latest beta 31 if you wish.

Thanks, Carlos. I'll try it in the following week. 

Best regards, Klemen 
Reply
I need to move News Manager to be under its own menu tab, rather than it being under the Pages tab. Can anyone point me in an easy direction to save me from having to work out a mod to the NM plugin or having to read all 49 pages in this topic to see if it has been done before :-)
Reply
@Carlos,

nice workaround for canonical urls, can you please tell me, how to achieve this also on nm_is_tag and nm_is_archive ? because they return root url too

@BeaneB - for point 2 - it's possible, just RTFM Wink I also removed "post" from urls, but I don't see a good reason in removing "tag" part, how would you then distinguish between list of posts with tag and post itself ?
Reply
(2016-02-14, 15:34:50)morvy Wrote: nice workaround for canonical urls, can you please tell me, how to achieve this also on nm_is_tag and nm_is_archive ? because they return root url too

Put this in your theme's functions.php file:
Code:
function custom_get_header_nm() {
 $canonical = false;
 if (nm_is_single())
   $canonical = nm_post_url(false);
 elseif (nm_is_tag())
   $canonical = nm_get_url('tag').rawurlencode(nm_single_tag_title('','',false));
 elseif (nm_is_archive())
   $canonical = nm_get_url('archive').intval($_GET[NMPARAMARCHIVE]);
 if ($canonical) {
   get_header(false);
   echo "\n",'<link rel="canonical" href="',$canonical,'" />';
 } else {
   get_header();
 }
}

Then in your template, replace
Code:
<?php get_header(); ?>
by:
Code:
<?php custom_get_header_nm(); ?>

--

I may add some get_header replacement function like this to the plugin..
Reply
(2016-02-15, 08:40:16)Carlos Wrote:
(2016-02-14, 15:34:50)morvy Wrote: nice workaround for canonical urls, can you please tell me, how to achieve this also on nm_is_tag and nm_is_archive ? because they return root url too

Put this in your theme's functions.php file:

Code:
function custom_get_header_nm() {
 $canonical = false;
 if (nm_is_single())
   $canonical = nm_post_url(false);
 elseif (nm_is_tag())
   $canonical = nm_get_url('tag').rawurlencode(nm_single_tag_title('','',false));
 elseif (nm_is_archive())
   $canonical = nm_get_url('archive').intval($_GET[NMPARAMARCHIVE]);
 if ($canonical) {
   get_header(false);
   echo "\n",'<link rel="canonical" href="',$canonical,'" />';
 } else {
   get_header();
 }
}

Then in your template, replace

Code:
<?php get_header(); ?>
by:

Code:
<?php custom_get_header_nm(); ?>

--

I may add some get_header replacement function like this to the plugin..

Yes, it's work perfeclty. thanks
Reply
(2016-02-14, 15:34:50)morvy Wrote: @Carlos,

nice workaround for canonical urls, can you please tell me, how to achieve this also on nm_is_tag and nm_is_archive ? because they return root url too

@BeaneB - for point 2 - it's possible, just RTFM Wink I also removed "post" from urls, but I don't see a good reason in removing "tag" part, how would you then distinguish between list of posts with tag and post itself ?

@morvy : thanks, it's done (for delete /post). Initially, I don't want delete /tag but just replace it by name  of my tags to have a specific URL for all my posts with the same tag. For example, all my "analytics" posts wil be in a page with /blog/analytics (each post in this category will be accessible via  /blog/analytics/title-of-my-post) and all my "google" posts will be in a page with /blog/google... (each post in this category will be accessible via  /blog/google/title-of-my-other-post) Any idea about this ?

Another point I see on http://revotechnik.sk/blog you use a nice breadcrumb but with Micro data but not "Json-LB" like recommanded on https://developers.google.com/structured...readcrumbs. So 1. what plugin do you use to do breadcrumbs with micro data, and 2. any idea to do it with Json LD instead of micro data ?

Regards
Reply
Microdata are accepted as well as RDFa and JSON-LD, so I use those as they are the easiest to implement and contain less code too Smile

breadcrumbs are my custom work, with workarounds for Blog and Hardware (currently disabled)

@Carlos: excellent, I use get_header(false); + get_canon_url(); custom function just for canonical link, but finally it works as it should with all my News Manager pages (including opengraph stuff). Thanks!
Reply
(2016-02-14, 07:01:22)davetest Wrote: I need to move News Manager to be under its own menu tab, rather than it being under the Pages tab. Can anyone point me in an easy direction to save me from having to work out a mod to the NM plugin or having to read all 49 pages in this topic to see if it has been done before :-)

Already done in the dev version. Next beta for 3.3 will have a gsconfig setting for this.
Reply
(2016-02-15, 09:49:10)morvy Wrote: @Carlos: excellent, I use get_header(false); + get_canon_url(); custom function just for canonical link, but finally it works as it should with all my News Manager pages (including opengraph stuff). Thanks!

You're welcome.
However, news pages ?page=2, /page/2, etc. still don't have the correct canonical url.
Do you think it would be better to simply not render it, in those pages?
Reply
(2016-02-16, 03:40:22)Carlos Wrote:
(2016-02-15, 09:49:10)morvy Wrote: @Carlos: excellent, I use get_header(false); + get_canon_url(); custom function just for canonical link, but finally it works as it should with all my News Manager pages (including opengraph stuff). Thanks!

You're welcome.
However, news pages ?page=2, /page/2, etc. still don't have the correct canonical url.
Do you think it would be better to simply not render it, in those pages?

@carlos : /page/2, /page/3 have a canonical URL with parent URL but it's a nice solution from a SEO point of view 

The most important point is to add, in the header (<head></head>),  the rel="prev" and rel="next" tag (cf. https://support.google.com/webmasters/answer/1663744) and to add a meta robots noindex, follow tag on theses pages.

Do you think it's possible ? Like some Wordpress Plugin like Yoast can do.
regards
Reply
For meta robots, you could insert this in the <head> section of your template:
Code:
<?php if (nm_is_main() && !nm_is_home()) { ?>
<meta name="robots" content="noindex, follow">
<?php } ?>
Reply
(2016-02-16, 02:52:25)Carlos Wrote:
(2016-02-14, 07:01:22)davetest Wrote: I need to move News Manager to be under its own menu tab, rather than it being under the Pages tab. Can anyone point me in an easy direction to save me from having to work out a mod to the NM plugin or having to read all 49 pages in this topic to see if it has been done before :-)

Already done in the dev version. Next beta for 3.3 will have a gsconfig setting for this.

Thanks Carlos, I've just tested this with current beta and it does just what I needed (with setting: define('NMTAB', true); ).

I want to use News Manager in its own menu so that I can have a user who can only edit news, so I was very happy seeing you have already implemented function to disable News Manager Settings through the Multi User plugin. For my application, my user will not be allowed to edit Pages (or any other menu than NM), so I'll need to see News Manager in the dropdown list of Multi User Custom Landing Page, otherwise admin login won't work for this user.

Is there a way you can make this possible via NM or is mod needed to Multi User plugin?
Reply
For now you can edit your user xml file and replace <LANDING></LANDING> by <LANDING>load.php?id=news_manager</LANDING>

I also suppose it should be easy to patch the MU plugin to add that to the dropdown.

But I'll see if there's other way...
Reply
Here's a way to add News Manager to the Custom Landing Page dropdown selector in the Multi User plugin (v1.8.2):

- Install and activate the sa hook components plugin
- Create a component named hook_footer and paste this:
Code:
<?php if (basename($_SERVER['PHP_SELF']) == 'load.php' && isset($_GET['id']) && $_GET['id'] == 'user-managment') { ?>
<script>
$('select[id="userland"]').append($('<option>', {
   text: 'News Manager',
   value: 'load.php?id=news_manager'
}));
</script>
<?php } ?>

Works for me on Firefox and Chrome, but I'm not sure it will work in all browsers. (The Multi User plugin is incorrectly rendering multiple selects with same css id and name.)
Reply




Users browsing this thread: 2 Guest(s)