Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager Addons plugin
#26
(2014-01-08, 21:18:08)Riianna Wrote: I´m using latest News Manger and Addons plugin.. images not show in "sidebar".

Yup, read my previous post.

I'll update it soon...
Reply
#27
News Manager Addons 0.8.3 beta available
Download: https://raw.github.com/cnb/News_Manager_...addons.php

Adapted to News Manager 2.5 beta 14 (and up) post image support (usage)
Reply
#28
(2014-01-10, 05:00:25)Carlos Wrote: News Manager Addons 0.8.3 beta available
Download: https://raw.github.com/cnb/News_Manager_...addons.php

Adapted to News Manager 2.5 beta 14 (and up) post image support (usage)

Still cant get images to "sidebar". What is the code snippet to show older post? like i have 4 recent and i like to show older post under the recent ones Big Grin.
Reply
#29
(2014-01-13, 20:45:48)Riianna Wrote: Still cant get images to "sidebar".

I assume that your recent posts have a post image assigned...
What News Manager beta version?
Did you use nm_set_custom_image to set your image width etc before nm_custom_display_recent?

(2014-01-13, 20:45:48)Riianna Wrote: What is the code snippet to show older post? like i have 4 recent and i like to show older post under the recent ones Big Grin.

You mean an offset, to display e.g. posts after the fourth one. That option is not currently available. Right now it could be done by styling posts with e.g. class="post_{{post_number}}" and hiding them with css, like .post_0, .post_1, .post_2, .post_3 { display:none }
Reply
#30
(2014-01-14, 00:45:03)Carlos Wrote: [quote='Riianna' pid='42080' dateline='1389609948']
Still cant get images to "sidebar".

I assume that your recent posts have a post image assigned...
What News Manager beta version?
Did you use nm_set_custom_image to set your image width etc before nm_custom_display_recent?

No, i use only {{ post_image }} just before {{ post_excerpt }}.
Reply
#31
Please post the full code snippet (from <?php to ?>) that you're using.
Also please tell me your News Manager beta version.
Reply
#32
(2014-01-15, 02:25:23)Carlos Wrote: Please post the full code snippet (from <?php to ?>) that you're using.
Also please tell me your News Manager beta version.

I´m using 2.5 beta 15 and this snippet

nm_custom_display_recent('
<div class="my_recent_{{ post_number }}">
<a href="{{ post_link }}">
<h5 class="recentitle">{{ post_title }}</h5>
<em class="dati">{{ post_date }}</em>
<span class="my_excerpt">{{ post_image }}{{ post_excerpt }}</span>
</a>
</div>
');
Reply
#33
Could it be that all of your post images are external, that is, not hosted in your site? (either in /data/uploads or /data/thumbs)
External images are not currently supported by NM Addons.

[edit] Well, it can be forced to display external images if you insert
Code:
nm_set_option('imageexternal',1);
before nm_custom_display...
Reply
#34
I didn't know about this great feature Smile

So I tested it and it works like a charm, exactly as Carlos has written - at least with images hosted by myself.
See my news page.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
#35
(2014-01-15, 05:54:23)Carlos Wrote: Could it be that all of your post images are external, that is, not hosted in your site? (either in /data/uploads or /data/thumbs)
External images are not currently supported by NM Addons.

[edit] Well, it can be forced to display external images if you insert
Code:
nm_set_option('imageexternal',1);
before nm_custom_display...

Nope, i use uploadet images. But never mind , i´m using GetSimple 3.3 rc now and none of the plugins wont work anymore, so i just wait them to be compatible Big Grin.
Reply
#36
@TeeJay
Nice to know it works for you. It's still kinda experimental feature...

@Rianna
Pity we couldn't find what the problem was.
Why do you say that none of the plugins will work with 3.3.0 RC? Have you tested them? Please report any issue you find (with my plugins, or anyone's)
Reply
#37
(2014-01-17, 01:56:31)Carlos Wrote: @TeeJay
Nice to know it works for you. It's still kinda experimental feature...

@Rianna
Pity we couldn't find what the problem was.
Why do you say that none of the plugins will work with 3.3.0 RC? Have you tested them? Please report any issue you find (with my plugins, or anyone's)

Weird! .. it startet working again when i change Get Simple language from Finnish to en_US. So plugins i use works with GS 3.3 Big Grin. But still no images in "sidebar" recent news.
Reply
#38
Could I make my recent list multilingual as I did the News Manager using nm_show_tag() function? I differ the language versions of the posts with a tag.

I use the following code for the sidebar recent posts
Code:
<span class="heading">      
  <?php if ($language == 'cs') { ?>Nejnovější články
  <?php } else { ?>Latest posts<?php } ?>
</span>
<?php nm_set_custom_maxposts(4) ?>
<?php nm_set_custom_excerpt(175) ?>
<?php nm_set_custom_image(75, 75); ?>    
<?php nm_custom_display_recent('
  <div class="my_recent_post">
    <h3><a href="{{ post_link }}">{{ post_title }}</a></h3>
    <span class="my_excerpt_date">{{ post_date }}</span>
    {{ post_image }}{{ post_excerpt }}
  </div>
'); ?>

If I could at least force to not show the "read more" button in the sidebar, I could restyle nm_show_tag() output for the sidebar.

Thanks for any info regarding this.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
#39
@TeeJay
You can filter by tag since NM Addons 0.7, see here.
Sorry it's only documented in the GitHub page, I should update the docs...

Did you redefine the ellipsis in your NM custom settings? If so, you will need to add something like this to your code:
Code:
nm_set_text('ELLIPSIS', '...');
(if not, the default ([...]) will be used in "external" (non-news) pages.)
Reply
#40
@Rianna
Can you please post or send me by PM some example of image URL you have in any of your posts' image field?
Reply
#41
(2014-01-19, 19:30:20)Carlos Wrote: @TeeJay
You can filter by tag since NM Addons 0.7, see here.
Sorry it's only documented in the GitHub page, I should update the docs...

Did you redefine the ellipsis in your NM custom settings? If so, you will need to add something like this to your code:
Code:
nm_set_text('ELLIPSIS', '...');
(if not, the default ([...]) will be used in "external" (non-news) pages.)

Thank you, works great. And no, I didn't redefine the ellipsis, the default is fine.

Yes, it would be nice to have an extended documentation with complete API and some tips for often-asked features at one place. I have to say that you are very good at explaining clearly in a few words, so don't worry about that.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
#42
(2014-01-20, 02:55:11)Carlos Wrote: @Rianna
Can you please post or send me by PM some example of image URL you have in any of your posts' image field?

I play with GS in here http://getsimppeli.kummallista.net/ .. i use "sidebar" functions in frontpage and in source view img tag shows but no url
Reply
#43
Did you select an image in your posts?
I see no images anywhere on your site, not only the front "sidebar"
Reply
#44
(2014-01-21, 00:39:55)Carlos Wrote: Did you select an image in your posts?
I see no images anywhere on your site, not only the front "sidebar"

Yes i have image in 3 fronpage posts and one flex video test.
Reply
#45
I see.
Your images are embedded in the post content, not selected in the image field.
Reply
#46
News Manager Addons 0.9.0 beta available
Download: https://raw2.github.com/cnb/News_Manager...addons.php

New function nm_set_custom_offset, to be called before display functions.

Example:
Code:
<?php nm_set_custom_offset(3); ?>
First, second and third posts will not be displayed, only the fourth and following.

(If you need to show those first ones again later, use parameter 0 to clear the offset)
Reply
#47
Is there a way I could force auto-adding the "alt attribute" to the images in the sidebar as well?
It's a required attribute for a valid HTML5 code, not sure about the previous HTML versions, but I think it's a necessary attribute there as well.

As the w3c validator says:
Quote:An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

Thank you.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
#48
Good catch TeeJay.

News Manager Addons 0.9.0.1 (beta) - download (GitHub)
Adds alt="" to <img> tags generated for the {{post_image}} placeholder.



[Update] Version 0.9.0.2 (beta) - download
If you use {{post_image}} and there is no default image, it is no longer rendered as <img src="" />
Reply
#49
Thank you Carlos, my code is valid now. I've just redone my site into HTML5, added Google Authorship etc., so I was concerned with these things a bit more than usually Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
#50
(replying to http://get-simple.info/forums/showthread...9#pid46309 )

(2014-06-29, 07:59:38)Oleg06 Wrote: is it possible to display the date in this code?
Code:
<?php nm_custom_display_recent('
   <div class="my_recent_post">
      <h4><a href="{{ post_link }}">{{ post_title }}</a></h4>
      <div class="my_image">{{ post_image }}</div>
      <span class="my_excerpt">{{ post_excerpt }}</span>
   </div>
'); ?>

You can use {{ post_date }} (or {{post_date}}).

If you want to use a custom date format, you can insert something like:
Code:
nm_set_custom_date('%d/%m/%Y');
before nm_custom_display_recent('...

Full docs for NM Addons here: http://www.cyberiada.org/cnb/news-manage...ns-plugin/
Reply




Users browsing this thread: 1 Guest(s)