Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
Hey everyone,

TeeJay tell me the beta Version (2.5) from the Plugin have an "Read More" Button..

How can i use it? i don't see it anywhere.


Cheers, .eXit.
Reply
(2013-09-05, 22:34:47).eXit. Wrote: Hey everyone,

TeeJay tell me the beta Version (2.5) from the Plugin have an "Read More" Button..

How can i use it? i don't see it anywhere.


Cheers, .eXit.
Look at my website - http://tomasjanecek.cz/clanky/ this is how it works.

Carlos has all the settings for beta on his website, but I can't seem to find it in one piece now.
Just look at here http://www.cyberiada.org/cnb/news-manage...-25-beta-5 and you can switch in the right sidebar menu to other betas where are some other information.

Basically, you have to go into your gsconfig.php in the root and write some lines. This is all you need and it also includes settings for pictures. The read more is in the bottom - I tried to comment it to understand it better.
Code:
# Allowing images for News Manager articles
$NMIMAGEINPUT = true;

# Setting direct visibility of the image upload line when writing an article
// $NMIMAGEINPUT = 0; // or FALSE : not visible
// $NMIMAGEINPUT = 1; // in Options, first field
$NMIMAGEINPUT = 2; // or TRUE : in Options, last field
// $NMIMAGEINPUT = 3; // directly visible above content
// $NMIMAGEINPUT = 4; // directly visible below content

# Setting frontend of the image
$NMIMAGES = array(
'width' => 100,
'height' => 100,
'crop' => 1,         // Cropping the image to fit exactly the dimensions above. IF 0, it scales the image to fit to the width / height
'default' => '',     // Default image to be set if none is chosen -
'alt' => true,       // Alt attribute for the picture
'title' => false,    // Title for the picture
'link' => true,      // Keep <a href=""> in the image
'external' => false, // Display images that are not in the data/upload folder
'show' => true       // Show post images
);

# Adding "Read more" link to all the articles
$NMREADMORE = 'a';

# Removing the link from the post title itself when on a post's detail
$NMTITLENOLINK = 'single';
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
@.eXit.
Note that $NMREADMORE = 'a'; doesn't add the "Read more" link to full posts, only to excerpts.
By your post in the old NM thread I guess that what you need is a permalink/link to post at the bottom.

@D.O., TeeJay, everyone...
If I add an option to insert permalinks under posts, do you think the readmore 'a' (always) option would no longer be necessary? Or do I keep it? (I personally don't need it)
Reply
(2013-09-05, 23:39:54)TeeJay Wrote:
(2013-09-05, 22:34:47).eXit. Wrote: Hey everyone,

TeeJay tell me the beta Version (2.5) from the Plugin have an "Read More" Button..

How can i use it? i don't see it anywhere.


Cheers, .eXit.
Look at my website - http://tomasjanecek.cz/clanky/ this is how it works.

Carlos has all the settings for beta on his website, but I can't seem to find it in one piece now.
Just look at here http://www.cyberiada.org/cnb/news-manage...-25-beta-5 and you can switch in the right sidebar menu to other betas where are some other information.

Basically, you have to go into your gsconfig.php in the root and write some lines. This is all you need and it also includes settings for pictures. The read more is in the bottom - I tried to comment it to understand it better.
Code:
# Allowing images for News Manager articles
$NMIMAGEINPUT = true;

# Setting direct visibility of the image upload line when writing an article
// $NMIMAGEINPUT = 0; // or FALSE : not visible
// $NMIMAGEINPUT = 1; // in Options, first field
$NMIMAGEINPUT = 2; // or TRUE : in Options, last field
// $NMIMAGEINPUT = 3; // directly visible above content
// $NMIMAGEINPUT = 4; // directly visible below content

# Setting frontend of the image
$NMIMAGES = array(
'width' => 100,
'height' => 100,
'crop' => 1,         // Cropping the image to fit exactly the dimensions above. IF 0, it scales the image to fit to the width / height
'default' => '',     // Default image to be set if none is chosen -
'alt' => true,       // Alt attribute for the picture
'title' => false,    // Title for the picture
'link' => true,      // Keep <a href=""> in the image
'external' => false, // Display images that are not in the data/upload folder
'show' => true       // Show post images
);

# Adding "Read more" link to all the articles
$NMREADMORE = 'a';

# Removing the link from the post title itself when on a post's detail
$NMTITLENOLINK = 'single';

Thanks TeeJay ;-)

Can you tell me how i put the "read more"-link on the right side of the Post?
I have tried it already with padding, align, float and margin, but nothing will working for me.

------

Edit:
i find a solution for my question.
Reply
Draft documentation for next 2.5 beta:
http://www.cyberiada.org/cnb/nm-25-beta-draft/
(quickly written... sorry, I'm not good at documenting)

I'll test it a bit more before posting. Your comments are very welcome.

Changes since beta 10:
- $NMIMAGES, $NMTITLENOLINK and $NMREADMORE no longer supported (see the doc.). Instead you use functions in component nm-init (and/or others)
- new function to redefine language strings (in components instead of gsconfig)
- new conditional functions (for use in templates)

These gsconfig settings remain the same as before:
$NMIMAGEINPUT, $NMIMAGEDIR and $NMARCHIVESBY

If you need any example, just ask.
Reply
An example: TeeJay's setup could be defined like this with these new layout settings:

component nm-init:
Code:
<?php
nm_set_option('excerpt','forcereadmore');
nm_enable_images();
nm_set_image_size(100,100,1);
nm_set_image_option('alt');
nm_set_image_option('link');
?>

component nm-top-single
Code:
<?php
nm_set_option('titlelink',false);
nm_disable_images();
?>
Reply
Better to keep it. Ok for permalink

(2013-09-06, 00:46:55)Carlos Wrote: @D.O., TeeJay, everyone...
If I add an option to insert permalinks under posts, do you think the readmore 'a' (always) option would no longer be necessary? Or do I keep it? (I personally don't need it)
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
(2013-09-06, 00:46:55)Carlos Wrote: @D.O., TeeJay, everyone...
If I add an option to insert permalinks under posts, do you think the readmore 'a' (always) option would no longer be necessary? Or do I keep it? (I personally don't need it)
Sorry I overlooked this post.

What do you mean by "permalinks under posts"? You mean a link to the full post page or permalink structure (URL)?

No matter what you're asking about, the "Read More" button should definitely be under every post. If the button's there, I don't care if I can set to hide it or not. Display:none does its job well in such cases.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Yes, I agree with TeeJay: "Read More" has to be under every post.
Frankly, according to me, a permalink is not so important, it's a blog thing. But hey go for it :-D

(2013-09-06, 17:02:30)TeeJay Wrote: Sorry I overlooked this post.

What do you mean by "permalinks under posts"? You mean a link to the full post page or permalink structure (URL)?

No matter what you're asking about, the "Read More" button should definitely be under every post. If the button's there, I don't care if I can set to hide it or not. Display:none does its job well in such cases.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Carlos, D.O. has explained to me the permalink you were talking about so I hope I understand it correctly now. Here's my opinion:

The Read More button is supposed to be a link leading to the URL (permalink) of the full post (like <a href="(permalink)">Anchor text</a>).

Why would you put a hyperlink somewhere under a post? Keep it in the Read More button, that's only reasonable solution. Then there can be a settings to hide the Read More button which of course also hides the permalink inside.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Usually Blog systems show the permanent link of a post. It can be useful, tho it's irrelevant to me. Maybe it should be important to show by default the author of a post beside the date.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Sorry guys, I misunderstood .eXit.'s post. I won't add the "permanent link" option. (It was something quite easy to add, and I thought that some people would use it, but maybe it's a bit old-style.)

So I'll keep the "forcereadmore" option, of course.
Reply
(2013-09-06, 18:43:59)D.O. Wrote: Maybe it should be important to show by default the author of a post beside the date.

Yeah I remember you had requested this some months ago. I have not decided about this, but I have it in the to-do list (issue in repo). I think that the patch I posted (by NM 2.3.x) would still be valid for 2.4.x and 2.5 beta.

One question: if I added optional support for authors, would it be fine to display it like this?
Code:
<p class="nm_post_date">Posted on Sep 6, 2013</p><p class="nm_post_author">Author: username</p>
or do you suggest another way?
(The "Author: " string would be customizable, e.g. changed to " by: ")
Reply
Yes, Carlos and that patch works fine. But I think it could be very useful by default to show the author of a news or not.

About the line I could suggest this way:

<p class="nm_post_date">Posted on Sep 6, 2013 <span class="nm_post_author">by Username</span></p>

And yes, of course, the string "Author" (or "by") should be customizable, and on th same line of the post date.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Hello,

I am still using version 2.5 beta 10 and I would like to have a link at the bottom that brings me back to the top of the page. But with the HTML anchor it will not work.

Can anyone help me?

Cheers, .eXit.
Reply
(2013-09-08, 00:08:29).eXit. Wrote: I am still using version 2.5 beta 10 and I would like to have a link at the bottom that brings me back to the top of the page. But with the HTML anchor it will not work.

You want it only on single/full posts?

I assume you inserted something like <a name="top"></a> in your template...
Reply
(2013-09-08, 00:41:30)Carlos Wrote:
(2013-09-08, 00:08:29).eXit. Wrote: I am still using version 2.5 beta 10 and I would like to have a link at the bottom that brings me back to the top of the page. But with the HTML anchor it will not work.

You want it only on single/full posts?

I assume you inserted something like <a name="top"></a> in your template...
As far as I know,
using "name" attribute for anchors in the page are not the best solution anymore. You should use "id" attribute instead.

An example - before the content you put <div id="top">&nbsp;</div> and then you put a link somewhere in the bottom (usually with fixed position) that has <a href="#top">Back to top</a>
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
I want it only on the post list http://meine-welt.bplaced.net/news

i have try that with <a name="top"></a> and <a href="#top">Zurück zum Anfang</a>, but then nothing is displayed on the newspage
Reply
In the next beta there will be another way to do this, but right now you could insert this in your template file:

Code:
<?php if (return_page_slug()=='news' && !nm_post_title("","",0)) { ?>
<a href="#top">Zurück zum Anfang</a>
<?php } ?>

...just after your template's get_page_content(); tag.
Reply
Hey, thanks Carlos, it works fine.

What I need to change if I want to have this on all pages?
Reply
For all GS pages except NM single posts, change first line to:

Code:
<?php if (!nm_post_title("","",0)) { ?>

For all pages including posts, just insert your link in the template file.
Reply
Thank you, Carlos. Your support here in the forum is really great!
Reply
News Manager 2.5 beta 11 attached to this post

Changed options/settings since 2.5 beta 10:
- Post images / thumbnails - http://www.cyberiada.org/cnb/news-manage...humbnails/
- Images enabled by default (including full/single posts, @TeeJay)
- Remove link in post title http://www.cyberiada.org/cnb/news-manage...ost-title/
- Add "Read more" link to excerpts - http://www.cyberiada.org/cnb/news-manage...more-link/
- Change/remove "Go back..." link - http://www.cyberiada.org/cnb/news-manager/go-back-link/

New in 2.5 beta 11:
- Custom frontend texts/strings - http://www.cyberiada.org/cnb/news-manage...d-strings/
- Layout blocks (components) - http://www.cyberiada.org/cnb/news-manage...ut-blocks/
- Conditionals for templates/components - http://www.cyberiada.org/cnb/news-manager/conditionals/

Not changed:
- Image backend settings ($NMIMAGEINPUT, $NMIMAGEDIR)
- Yearly archives ($NMARCHIVESBY)



These are the current settings for my NM blog:

component nm-init
Code:
<?php
nm_set_option('excerpt','readmore');
nm_set_text('ELLIPSIS','... ');
nm_set_text('READ_MORE','read more');
?>

component nm-top-single
Code:
<?php
nm_set_option('titlelink',0);
nm_set_option('gobacklink','main');
nm_set_text('GO_BACK','&laquo; Back to main news page');
?>

[attachment removed: news_manager-2.5-beta11.zip (Size: 62.54 KB / Downloads: 14) ]
Reply
Hey Carlos,
is there in this version
the change to display in a tag page
the same number of posts of the main page??
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
(2013-09-10, 05:50:06)D.O. Wrote: is there in this version
the change to display in a tag page
the same number of posts of the main page??

No. You still have to patch it.
Would that solution (just limit number of posts displayed) work for you?
Pagination for tag pages is in the to-do list for now.
Reply




Users browsing this thread: 1 Guest(s)