Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Role Scoper and members list

UserPost

7:32 am
August 22, 2009


mikrofu

New Member

posts 1

1

Hello Kevin,

I'm new on this forum, actually, i'm new to Role Scope and Wordpress too !!!I am currently developping a wordpress website for my sport club, and i'm using the members-list plugin to generate a member list of club members that i would like to be hidden except for members… hence the use of Role scoper !!!

unfortunatelly I am unable to restrict access to the member list page that holds the member-list generated by the members-list plugin…

other pages under the same parents page work well and i can restrict access.

my guess is that the "member-list" plugin requires another template that "single.php" or "page.php"; the plugin requires to create a new template ("members.php") and to select it instread of the default template.

if i select the default template, I get the title and the correct restriction message printed by Role Scope.

As soon as I select the "members" template, i get my member list, but it can't be restricted.

from what i understand from the role-scope usage guide, my guess is that i have to use the "is_restricted_rs( );" "is_teaser_rs( );" functions, but since i'm useless at coding (can make sense of copy/paste though) i have no idea on how to code that template page.

could you please advise me on what might be wrong, and if i'm correct, could you please explain how to implement the correct functions in my template code ???

Any help would be great !!!

Thanks in advance, and congratulations on this great plugin !!!

Mike


here is the code i have in the page (also am using the arras theme)

(start code)

<?php

/*

Template Name: Members

*/

?>


<?php get_header(); ?>


<div id="content" class="section">


<div id="post-<?php the_ID() ?>"

   <?php arras_single_post_class() ?>>

<?php arras_postheader() ?>

<?php $members = new tern_members;$members->members(array('search'=>true,'pagination'=>true,'sort'=>true));?>

    </div>       

</div><!– #content –>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

(end code)

11:34 pm
August 31, 2009


Kevin

Admin

posts 2402

2

Thanks for your patience as I've been very busy lately. Don't worry, much of that busyness is going to translate into more Role Scoper improvements soon.

If you compare your template code to themes/default/page.php, you'll see it's missing this line:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

… and the corresponding end tag:

<?php endwhile; endif; ?>

Wrap that around your <div id="post … </div> and it should work just like the default template.


About the Agapetry forum

Currently Online:

13 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1186

Posts: 5409

Members:

There are 1176 members

There are 1 guests


Kevin has made 2402 posts

Top Posters:

metal450 - 159

Ragnar - 105

YikYak - 70

whiteorb - 44

Daisy - 35

Administrator: Kevin | Moderators: Kevin