GetSimple Support Forum
News Manager Addons plugin - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: News Manager Addons plugin (/showthread.php?tid=4339)

Pages: 1 2 3 4 5 6


RE: News Manager Addons plugin - Riianna - 2014-07-06

So if i use <?php nm_list_recent_by_tag('tagishere'); ?> how to get excerpt and read more also? Big Grin.


RE: News Manager Addons plugin - Carlos - 2014-07-06

You can use nm_custom_display_recent, e.g. like this:

Code:
<ul>
<?php
nm_custom_display_recent('
  <li><strong><a href="{{post_link}}">{{post_title}}</a></strong><br />
      {{post_excerpt}}
      <a href="{{post_link}}">Read more</a>
  </li>
',
'tagishere');
?>
</ul>



Just a note: I've uploaded this plugin to Extend.


RE: News Manager Addons plugin - Riianna - 2014-07-10

Ok thanx, works fine now Big Grin.


RE: News Manager Addons plugin - D.O. - 2014-07-22

Hey Carlos! Hell, GS is changing a lot!
I tested your lastest version 0.9.0.3 and it works great.

Tip: if you can't add my "pull-down menu style WP" to NMUpdated plugin, you could add it to NMAddons. it could fit well.


RE: News Manager Addons plugin - Carlos - 2014-09-04

News Manager Addons plugin version 0.9.1

- Support for NM authors with new token {{post_author}}
- Supports NM 3.0 custom setting defaultAuthor
- Supports $NMAUTHOR gsconfig array (as in NM Custom Authors)


RE: News Manager Addons plugin - Carlos - 2014-10-18

Version 0.9.1.1 available: fixes wrong <ul> classes (nm_custom_list_recent, nm_custom_list_future)


RE: News Manager Addons plugin - D.O. - 2014-10-20

Great. I am going to test it.


RE: News Manager Addons plugin - D.O. - 2014-12-03

Hi Carlos!
After various "tests" with "NM Addons", I may to suggest you to eliminate the tags <p> and </p> before and after the tag {{post_excerpt}}. I think that It's better to have a clean text to use it directly in a tag <div> or <span>, specially during the adaptation of a free html template. What do you think about it?


RE: News Manager Addons plugin - Carlos - 2014-12-06

I agree. Thank you!


RE: News Manager Addons plugin - Carlos - 2014-12-11

News Manager Addons version 0.9.2
  • Post excerpts ({{post_excerpt}} placeholder) are no longer enclosed between <p> and </p> tags. (@D.O.)
Please note that, if you're upgrading from previous versions of the plugin, you may have to edit your template or component (if your styles are affected, you just have to change {{post_excerpt}} to <p>{{post_excerpt}}</p>)


RE: News Manager Addons plugin - D.O. - 2014-12-12

Hi Carlos, thanks for accepting my TIP, example in this amazing themes by Timbow
(http://get-simple.info/extend/theme/grill-theme-and-template-site/873/) there is this "problem" with NM Addons and the template
(if you list it there are two <p> tags.
OK I am going to download the new version now, thanks again for your quick help bro!


(2014-12-11, 06:11:45)Carlos Wrote: News Manager Addons version 0.9.2
  • Post excerpts ({{post_excerpt}} placeholder) are no longer enclosed between <p> and </p> tags. (@D.O.)
Please note that, if you're upgrading from previous versions of the plugin, you may have to edit your template or component (if your styles are affected, you just have to change {{post_excerpt}} to <p>{{post_excerpt}}</p>)



RE: News Manager Addons plugin - Carlos - 2014-12-18

Version 0.9.2.1 available (bugfix for 0.9.2)
(Thanks to Gooos for reporting)


RE: News Manager Addons plugin - buitje68 - 2015-01-02

I'm trying to get a list of recent postimages in the sidebar with the title of the post as alt-tag

I've tried with the
PHP Code:
<a href="{{post_link}}">{{ post_image }} alt="{{post_title}}"</a

which off course don't work because of the <a href> tag.

but simple replacing this tag with the <img> tag also doesn't work
PHP Code:
<img src="{{post_link}}">{{ post_image }} alt="{{post_title}}"</img>] 


Is this possible ?
Anyone successful on this road ?




I think i'm getting there myself...

PHP Code:
<?php nm_custom_display_recent('    
<a href="{{ post_image_url }}" alt="{{ post_title }}">
'
); ?>



RE: News Manager Addons plugin - Carlos - 2015-01-02

To get the image URL only, use the {{ post_image_url }} placeholder. Example:

Code:
<a href="{{ post_link }}"><img src="{{ post_image_url }}" alt="{{ post_title }}" /></a>



RE: News Manager Addons plugin - Carlos - 2015-01-12

News Manager Addons version 0.9.3
  • added support for NM (3.0+) post image options and custom settings (width, height, crop, default image) when nm_set_custom_image is not used.



RE: News Manager Addons plugin - Carlos - 2015-02-26

News Manager Addons version 0.9.3.1
  • fixes issue with custom excerpt length, not working since 0.9.2 (with NM 3.0) (@smsHH)



RE: News Manager Addons plugin - D.O. - 2015-02-27

Hi Carlos, I will to test it soon.


RE: News Manager Addons plugin - Riianna - 2015-02-28

custom excerpt length works fine now, i have it on the slider caption Big Grin.. at least it works in my firefox 3.6 ;D


RE: News Manager Addons plugin - morvy - 2015-04-19

Hi,

any idea how can I implement random posts based on tags ? I'm trying to create a list of 5 random posts, where tags are sorted from 2 occurencies to more (2 because 1st is shown post, 2nd is related post based on tag..). I'm not very successful Big Grin I don't have effective way of counting tags and assigning posts to them :/

so if 5 posts have 1-2 common tags, they would be skipped and only posts with more unique tags will be displayed, if no other posts, then show at least those posts with common tags..


RE: News Manager Addons plugin - Carlos - 2015-04-19

News Manager's functions nm_get_posts() and nm_get_tags() return an array of posts (with all fields but content) and an array of tags (associated to post ids having the tag), respectively. These functions may be useful to do what you need.


RE: News Manager Addons plugin - morvy - 2015-04-22

thanks for pointing me to right direction, if anybody needs similar posts by tag, here's my code

Code:
$num_post = 5;
$slugs = array();
$url = nm_get_url('post');
$posts = nm_get_tags();
foreach($posts as $tag => $post) {
    if(nm_post_has_tag($tag)) {
        foreach ($post as $slug) {
            $slugs[] = (string)$slug;
        }
    }
}
$slugs = array_unique($slugs);
if(($key = array_search(nm_post_slug(false), $slugs)) !== false) {
    unset($slugs[$key]);
}
shuffle($slugs);
$slugs = array_slice($slugs, 0, $num_post);
$all = nm_get_posts();

echo '<ul class="nm_similar_post">';
foreach ($all as $post) {
    if(in_array($post->slug, $slugs)) {
        echo '<li><a href="'.$url.$post->slug.'" title="'.$post->title.'">'.$post->title.'</a></li>', PHP_EOL;
    }
}
echo '</ul>';



RE: News Manager Addons plugin - Carlos - 2015-04-24

Very interesting, thanks for sharing it.


RE: News Manager Addons plugin - Carlos - 2015-04-28

(2015-04-24, 05:13:29)Oleg06 Wrote: works well, but what does the number 5?
Code:
$num_post = 5;

Maximum number of posts to be listed.


RE: News Manager Addons plugin - Carlos - 2015-06-14

News Manager Addons version 0.9.3.2
  • added support for author's Display Name field (GS 3.2+, News Manager 3.2+)



RE: News Manager Addons plugin - Timbow - 2015-07-01

The custom display thing is fantastic. It means I can do almost anything with recent posts on a homepage. I have found one very small error in the documentation:
  • {{ post_number }} - number of post as displayed (1 = first)
Should read 
  • {{ post_number }} - number of post as displayed (0 = first)
When I have finished what I am working on I will be able to upload it as a theme. 


Thank you Carlos for this fine plugin.