Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Unable to show a suffix after a post excerpt

UserPost

5:59 am
March 23, 2010


jjww

Member

posts 2

1

I have just installed Role Scoper, and I'm very pleased so far.

I have run into one snag - I have enabled teasers in the options. While I can add a prefix/suffix to the title of the post or page when seen by a non-logged-in user, I am not able to show them a prefix/suffix to the excerpt.

The fact that I can add text before or after the title and this is seen by non-logged-in users makes me think that I have got the restrictions set up properly. I'm really unsure why this isn't working for the excerpt prefix/suffix.

I have posted a screengrab of the options here (hosted on my own site, not the site in question):

http://include.co.uk/blog/wp-content/files/role_scoper_options.gif

Just in case it was template related, I tried switching to the Wordpress default template, but the problem remained.

Have I missed out some necessary step?

Many thanks for any help.

11:21 am
March 23, 2010


Kevin

Admin

posts 2503

2

There is some ambiguity here in that Role Scoper is applying your excerpt suffix to the excert itself (as seen in RSS feeds). But when substituting the excerpt data into post content, the "content" prefix and suffix are still used.

I'm afraid that changing this unilaterally would break existing sites which have come to expect the current behavior. However, think the functionality you have in mind would be more intutive and useful. I've mailed you a modified copy of teaser_rs.php which will get the job done if you first add the following to wp-config.php:

define( 'SCOPER_FORCE_EXCERPT_SUFFIX', true );

With that constant definition in place, the "excerpt" prefix and suffix will be applied to the displayed post content whenever the excerpt, "pre-more content", or "first X characters" are displayed as the teaser. In other words, the "content" prefix and suffix will only be used when the content is fully replaced by a fixed teaser message.

Due to some other current development, this change is not yet in the dev snapshot, but I plan to include it in a Role Scoper 1.1.8 release soon.

8:01 am
March 24, 2010


jjww

Member

posts 2

3

Thanks for your quick reply and the new script.

I have installed the script succesfully, as it seems to work fine, though I find I need to add the same text as an excerpt (for not logged in users) and also above a 'more' comment (for logged in users) to get the behaviour I'm after.

If I use 'more' alone, then the suffix does not appear on the home page for non-logged-in users, but they see a 'Continued' link, which if they click on takes them to the single post page, which does show the suffix.

Using both seems to work fine, so I'll stick with this for now, unless you have any other thoughts.

Thanks again.


7:38 am
June 29, 2011


Kevin

Admin

posts 2503

4

This was fixed in Role Scoper 1.2


About the Agapetry forum

Currently Online:

16 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1249

Posts: 5659

Members:

There are 1261 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin