Posts: 3,491
Threads: 106
Joined: Mar 2010
There's no nm_... for this -- just use GetSimple's own <?php get_page_meta_desc(); ?>
(You may need to enable NM custom settings and enter autometad 1 so that posts without meta description have an excerpt instead)
Posts: 258
Threads: 37
Joined: Jun 2014
Oh, ok! It works, thank you!
Just another question about metadata:
I make a schema.org issue "Image" and wonder why it says:
Code: https://www.domain.de/plugins/news_manager/browser/pic.php?p=picname.jpg&w=100&h=100&c=1>=1
instead of
Code: https://www.domain.de/data/uploads/picname.jpg
The source code is
Code: "image": "<?php nm_post_image_url(); ?>"
But the image given to the metadata seems to be the small one from the overview page. Why?
Posts: 3,491
Threads: 106
Joined: Mar 2010
For a full image:
Code: <?php nm_post_image_url(0,0,0); ?>
Parameters: width (0 = full), height (0 = full), crop (0 = no) - if you don't pass them, it will use what you have in NM settings.
Posts: 258
Threads: 37
Joined: Jun 2014
Quote:Code: <?php nm_post_image_url(0,0,0); ?>
Nice! And in this case it takes the original image from uploads folder. Thank you!
Hypertexter
Posts: 3,491
Threads: 106
Joined: Mar 2010
(Replying to http://get-simple.info/forums/showthread...4#pid63114 )
(2018-09-24, 19:54:17)domscatterbrain Wrote: Hi, I've encountered issues which post image is not shown. Whenever I choose pic for post image from server, in which its generated an image link
Code: https://mysite.com/plugins/news_manager/browser/pic.php?p=mypicture.jpg
Yet it's not showing anything. Did I do something wrong?
Are you sure that image file exists in the Uploads folder?
Open that URL in your browser and check if you get any errors.
Posts: 3,491
Threads: 106
Joined: Mar 2010
Anyway, an image URL like that should not be rendered by News Manager (at least in recent versions) - it's missing some parameters (width, height...)
Posts: 6
Threads: 0
Joined: Feb 2015
(2018-09-25, 04:36:33)Carlos Wrote: Anyway, an image URL like that should not be rendered by News Manager (at least in recent versions) - it's missing some parameters (width, height...)
I dm you my link, even with complete params the image is still missing.
I'm using the latest news manager tho
Posts: 3,491
Threads: 106
Joined: Mar 2010
It's some restriction in your host.
This is what it's rendering instead of the resized image:
Code: Warning: readfile() has been disabled for security reasons in [...]plugins/news_manager/browser/pic.php on line 101
Function readfile() is also used in GetSimple's File Management. Are you also having issues when downloading a file (e.g. an uploaded PDF) in the backend, or viewing/generating thumbnails...?
Posts: 3,491
Threads: 106
Joined: Mar 2010
@domscatterbrain
I see that the link you sent me by PM now displays the resized image properly, so I assume your issue has been fixed.
Posts: 3,491
Threads: 106
Joined: Mar 2010
(replying to http://get-simple.info/forums/showthread...7#pid63137 )
(2018-09-30, 08:13:23)Bak Wrote: Good evening to all.
When I create a new post in my website the new post contain a title, the date creation, the text and the tags.
Is there a way to hide date creation and tags?
The important thing is the title and the text.
Thanks in advance.
Luke
In NM Settings, enable Custom Settings and insert this:
Code: showFields title,content
then save settings.
---
There is (will be) another way, with custom post rendering, but it's not possible with the current stable version (3.6) - right now you'd have to use the beta version
Posts: 6
Threads: 0
Joined: Feb 2015
Heya Carlos, I forgot to say that the blog picture is working again after I asked my site admin to enable readfile()
Thanks in advance!
Posts: 3
Threads: 1
Joined: Oct 2018
Hi, I've two questions:
- Is there a way to use News Manager to create a sticky post (i.e. one that stays posted above any other new posts, so site visitors will always see it first)?
- Is there a way to post News Manager posts to two different pages on a website, rather than simply assigning the posts to one page?
I've searched the thread and couldn't find any relevant answers - apologies if I've missed something.
Posts: 19
Threads: 0
Joined: Aug 2011
2018-10-27, 22:18:28
(This post was last modified: 2018-10-27, 22:24:12 by lesh.)
(2018-10-26, 09:01:51)32010 Wrote: Hi, I've two questions:
- Is there a way to use News Manager to create a sticky post (i.e. one that stays posted above any other new posts, so site visitors will always see it first)?
- Is there a way to post News Manager posts to two different pages on a website, rather than simply assigning the posts to one page?
I've searched the thread and couldn't find any relevant answers - apologies if I've missed something.
you can use nm_show_tag in a template like this
PHP Code: <section id="news-features"> <section id="sticky-posts"> <?php nm_set_option('maxposts', 2); //I don't want to see more than 2 stickies nm_show_tag('sticky'); ?> </section>
<section id="news-headlines"> <h2>Recent News</h2> <?php nm_list_recent(); ?> </section> </section>
and in gsconfig exclude the tag 'sticky' from normal news listings like this-
define('NMDEFAULTEXCLUDETAGGED', 'sticky');
Carlos -
nm_show_tag displays a message "no posts found' if there are no posts with that tag, it would be good to be able to check first so nm_show_tags could be skipped and avoid this message.
Posts: 3,491
Threads: 106
Joined: Mar 2010
(2018-10-27, 22:18:28)lesh Wrote: Carlos -
nm_show_tag displays a message "no posts found' if there are no posts with that tag, it would be good to be able to check first so nm_show_tags could be skipped and avoid this message.
Currently you can use a conditional like this:
Code: <?php
$tags = nm_get_tags();
if (count($tags['mytag']) {
nm_show_tag('mytag');
}
?>
(I intend to add some other functions to make things better.)
In the meantime, another option is using the News Manager Addons plugin, that lets you filter by a tag, use your custom html layout, etc.
Posts: 80
Threads: 8
Joined: Aug 2011
2018-10-30, 09:38:40
(This post was last modified: 2018-10-30, 09:41:36 by platinum.)
hello
I'm using "GetSimple 3.0 + News Manager 3.6"
but there is a problem:
News Manager 3.6 put (in the code of each single post page) ALWAYS the same "canonical url" (=main page url).
for example
mywebsite.com/news/
(this url is for all post !! this is not good for google !!)
instead I want for each single post a specific "canonical url" (=specific page url).
for example
mywebsite.com/news/[url_of_specific_post]
Please can you help me?
thanks.
Posts: 3,491
Threads: 106
Joined: Mar 2010
See here: Replacement template functions for proper canonical meta tag.
PS You shouldn't be using such an outdated GetSimple version.
Posts: 80
Threads: 8
Joined: Aug 2011
(2018-10-31, 17:18:42)in "News manager" page postCarlos Wrote: See here: Replacement template functions for proper canonical meta tag.
PS You shouldn't be using such an outdated GetSimple version.
Carlos,
thanks for your message, at first.
I use "Elegance" template.
If, in template.php file, I change "get_header" to "nm_get_header":
I have not a specific "canonical url" (= specific page url) for each post,
but i simply have not "canonical url" for all post created by News Manager!!
pleaase can help me?
where is the error?
Posts: 3,491
Threads: 106
Joined: Mar 2010
(2018-10-31, 23:08:21)platinum Wrote: Carlos,
thanks for your message, at first.
I use "Elegance" template.
If, in template.php file, I change "get_header" to "nm_get_header":
I have not a specific "canonical url" (=specific page url) for each post,
but i simply have not "canonical url" for all post created by News Manager!!
pleaase can help me?
where is the error?
I've just tested with the Elegance theme, and it works ok. After replacing <?php get_header(); ?> by <?php nm_get_header(); ?> , the line <link rel="canonical" href=... is present in single post pages.
By the way, if News Manager 3.6 is working for you then you are not using GetSimple 3.0 - it would simply crash. Last plugin version that worked with GS 3.0 was NM 3.3.x.
Posts: 103
Threads: 10
Joined: Jul 2015
(2012-12-18, 22:22:52)Carlos Wrote: News Manager is very straightforward, maybe too simple for your needs.
Tags could serve as categories, but very basic, e.g. you wouldn't have pagination in these pseudo-category pages.
I18N Search is a great plugin that allows including non-page items like posts (see Custom Item Indexing in I18N Search - Custom Indexing), but someone has to develop a plugin or script for this. I'll give this a try some day.
I don't think GS Blog is not being developed, though its author may not be visiting the forums lately. If it has bugs I suggest you also report them in its GitHub repository.
@Oleg06 or anyone interested in having a 'featured image' for posts...
Let's say the code for the picture is something like:
PHP Code: <div class="nm_post_image"><a href="[POST-TITLE]"><img src="[POST-IMAGE]" /></a></div>
What do you think would be the best place to insert this code? Before, or after the <h3>? After the date? ...
Currently News Manager uses this structure when displaying posts:
PHP Code: <div class="nm_post"> <h3 class="nm_post_title"><a href="[POST-TITLE]">[POST-TITLE]</a></h3> <p class="nm_post_date">Published on [POST-DATE]</p> <div class="nm_post_content"><p> [POST-CONTENT] </p></div> <p class="nm_post_meta"><b>Tags:</b> [POST-TAGS]</p> </div>
Of course it would be better to have custom post templates, but I'd like to know what default format to use.
Which file have this code?
I am planning of a new theme using this news manager!
Posts: 3,491
Threads: 106
Joined: Mar 2010
(2018-11-01, 22:02:24)kazu2015 Wrote: Which file have this code?
I am planning of a new theme using this news manager!
That's a very old post. If you read it carefully you'll see it was just a example - I was asking for ideas. Post layout customization was implemented since NM 3.0 with a bunch of NM custom settings (that unfortunately cannot be set in the theme).
However, in the current beta version I added support for post templating: see here.
(Note that it's a beta - the final implementation may change.)
Posts: 80
Threads: 8
Joined: Aug 2011
(2018-11-01, 04:41:29)Carlos Wrote: (2018-10-31, 23:08:21)platinum Wrote: Carlos,
thanks for your message, at first.
I use "Elegance" template.
If, in template.php file, I change "get_header" to "nm_get_header":
I have not a specific "canonical url" (=specific page url) for each post,
but i simply have not "canonical url" for all post created by News Manager!!
pleaase can help me?
where is the error?
I've just tested with the Elegance theme, and it works ok. After replacing <?php get_header(); ?> by <?php nm_get_header(); ?> , the line <link rel="canonical" href=... is present in single post pages.
By the way, if News Manager 3.6 is working for you then you are not using GetSimple 3.0 - it would simply crash. Last plugin version that worked with GS 3.0 was NM 3.3.x.
You are right!
I have GestSimple Version 3.3.5 !!
anyway your info doens't help me :-(
I cannot have "canonical" href in single post pages.
Question:
here
http://get-simple.info/forums/showthread...5#pid54725
this solution is good, in your opnion, for my problem?
Posts: 3,491
Threads: 106
Joined: Mar 2010
That was the old solution. It works the same (except that it only works for single post pages and not for tag, archive pages).
nm_get_header() should work, unless you call it with parameter false .
Have you searched for the canonical tag in the source html code of the page? It may be at the end of another line...
Do normal GS pages have their canonical tag line?
Posts: 80
Threads: 8
Joined: Aug 2011
(2018-11-01, 04:41:29)Carlos Wrote: (2018-10-31, 23:08:21)platinum Wrote: Carlos,
thanks for your message, at first.
I use "Elegance" template.
If, in template.php file, I change "get_header" to "nm_get_header":
I have not a specific "canonical url" (=specific page url) for each post,
but i simply have not "canonical url" for all post created by News Manager!!
pleaase can help me?
where is the error?
I've just tested with the Elegance theme, and it works ok. After replacing <?php get_header(); ?> by <?php nm_get_header(); ?> , the line <link rel="canonical" href=... is present in single post pages.
By the way, if News Manager 3.6 is working for you then you are not using GetSimple 3.0 - it would simply crash. Last plugin version that worked with GS 3.0 was NM 3.3.x.
(2018-11-02, 05:28:41)Carlos Wrote: nm_get_header() should work, unless you call it with parameter false .
?
sorry
where i see if parameter is true or false ???
in template.php file (of "Elegance" template)?
or where?
Posts: 80
Threads: 8
Joined: Aug 2011
2018-11-02, 23:44:57
(This post was last modified: 2018-11-02, 23:47:17 by platinum.)
(2018-11-02, 05:28:41)Carlos Wrote: Do normal GS pages have their canonical tag line?
yes!
each page in the website has a specific canonical url in the source html code
Posts: 3,491
Threads: 106
Joined: Mar 2010
Are you using the same template (Default template = template.php) for the news page as for the other pages, or perhaps you selected Elegance's wide.php or sidebar.php?
|