Community Support Forums — WordPress® ( Users Helping Users ) — 2011-06-22T00:27:08-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=10200 2011-06-22T00:27:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21364#p21364 <![CDATA[Re: Member directory]]>

Statistics: Posted by Cristián Lávaque — June 22nd, 2011, 12:27 am


]]>
2011-06-21T16:35:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21342#p21342 <![CDATA[Re: Member directory]]>
Code:
<?php
$thisauthor 
get_userdata(intval($author));
?>
<div style="float: right;"><h5 style="text-align:right;margin-right:10px;"><?php echo $thisauthor->display_name?>'s qr Code</h5>
<? if(function_exists('get_avatar')) { echo get_avatar($thisauthor->user_email150"" ); } ?> </div>
<h3><?php echo $thisauthor->first_name " " $thisauthor->last_name?> (<?php echo $thisauthor->display_name?>)</h3>
<h5>Accredited member since:&nbsp;<?php $registered = ($thisauthor->user_registered "\n");
  echo 
date("j/n/Y"strtotime($registered)); ?></h5>
<h5><?php echo $thisauthor->first_name " " $thisauthor->last_name?>'s website: <a href="<? echo $thisauthor->user_url?>"><? echo $thisauthor->user_url?></a><br /></h5>
<h5>Accredited as a <?php echo get_user_field('s2member_access_label'$thisauthor->ID); ?> member</h5>
<h5>This member's accreditation number is: <?php echo $thisauthor->ID?> </h5>
<h5>Email&nbsp;<?php echo $thisauthor->first_name " " $thisauthor->last_name?>
:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?php if (S2MEMBER_CURRENT_USER_IS_LOGGED_IN){ ?> <a href="mailto:<? echo $thisauthor->user_email?>">Email Address</a>&nbsp;<?php } else { ?> (Only available to accredited members)<?php ?></h5>

<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h3>What&nbsp;<?php echo $thisauthor->display_name?>&nbsp;says about themselves:</h3>
<p><?php echo $thisauthor->description?> </p>


Need to sort the layout now and it is all done...

Once again Cristian - much obliged

Statistics: Posted by arbie — June 21st, 2011, 4:35 pm


]]>
2011-06-21T13:04:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21332#p21332 <![CDATA[Re: Member directory]]>
Saves me having to type that one out each time - much obliged!

Statistics: Posted by arbie — June 21st, 2011, 1:04 pm


]]>
2011-06-21T11:30:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21320#p21320 <![CDATA[Re: Member directory]]>
Code:
echo get_user_field('s2member_access_label'$thisauthor->ID); 

Statistics: Posted by Cristián Lávaque — June 21st, 2011, 11:30 am


]]>
2011-06-21T11:20:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21318#p21318 <![CDATA[Re: Member directory]]> Statistics: Posted by Cristián Lávaque — June 21st, 2011, 11:20 am


]]>
2011-06-21T10:38:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21309#p21309 <![CDATA[Re: Member directory]]>
Code:
<h5><?php echo c_ws_plugin__s2member_user_access::user_access_role(intval($author)); ?></h5>

Added and results in:

Image

(the code above should appear between website and email address)

And I DID read the literature - and watch a bunch of videos - that's why I posted here.... thanks for making me feel like I'm asking noob questions though.

Statistics: Posted by arbie — June 21st, 2011, 10:38 am


]]>
2011-06-21T10:15:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21304#p21304 <![CDATA[Re: Member directory]]>
Code:
echo c_ws_plugin__s2member_user_access::user_access_role(intval($author)); 


By the way, here's the documentation for those, in case you haven't read it yet. viewtopic.php?f=40&t=9477&src_doc_v=110605

Statistics: Posted by Cristián Lávaque — June 21st, 2011, 10:15 am


]]>
2011-06-21T02:52:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21287#p21287 <![CDATA[Re: Member directory]]> Statistics: Posted by arbie — June 21st, 2011, 2:52 am


]]>
2011-06-20T22:10:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21266#p21266 <![CDATA[Re: Member directory]]>
Code:
echo c_ws_plugin__s2member_user_access::user_access_label(intval($author));  

Statistics: Posted by Cristián Lávaque — June 20th, 2011, 10:10 pm


]]>
2011-06-20T13:31:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21234#p21234 <![CDATA[Re: Member directory]]>
$thisauthor
is the variable on
author.php
(which is a WP function).

I've given up guessing what I need to do - might go back to it another time....

Statistics: Posted by arbie — June 20th, 2011, 1:31 pm


]]>
2011-06-20T13:24:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21233#p21233 <![CDATA[Re: Member directory]]> $user_id to give it an descriptive name, but if you don't have that variable defined then it won't work. If $thisauthor is not the user ID, it won't work either. In you case the user's ID seems to be $author, although I may be wrong, make sure it is. What you have to enter there is the user's ID (that's why I had named the variable $user_id for the example).

I hope that helps.

Statistics: Posted by Cristián Lávaque — June 20th, 2011, 1:24 pm


]]>
2011-06-20T02:24:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21184#p21184 <![CDATA[Re: Member directory]]> Statistics: Posted by arbie — June 20th, 2011, 2:24 am


]]>
2011-06-19T23:14:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21176#p21176 <![CDATA[Re: Member directory]]>
Code:
echo c_ws_plugin__s2member_user_access::user_access_label($user_id); 

Statistics: Posted by Cristián Lávaque — June 19th, 2011, 11:14 pm


]]>
2011-06-19T12:08:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21146#p21146 <![CDATA[Re: Member directory]]> The one thing I cannot do is output the level of the member being displayed.
Essentially, the plugin is listing the users - that is fine. Each user then becomes a link, which outputs to author.php. I can output everything (even have an S2 conditional to allow logged in members to see the member's email - but not a non-logged in visitor).
The bit that I cannot get to output is the displayed member's level. Tried c_ws_plugin_s2_member_user_access::user access label - but this displays the user viewing (either nothing if not logged in or the user logged in) I have searched through the classes etc, and nowhere can I find something that will allow me to output the user who is being displayed on the author.php page's level.
Anyone have any clues?

UPDATE
Okay - so I have given up on auto outputting the user level for now (I am manually adding the image for now so it is only an extra little bit of typing).
The code that I added to author.php is:
Code:
                        <h2>Accredited Member Profile</h2>
<?php
$thisauthor 
= get_userdata(intval($author));
?>
<div style="float: right;"><h5 style="text-align:right;margin-right:10px;"><?php echo $thisauthor->display_name; ?>'s qr Code</h5>
<? if(function_exists('get_avatar')) { echo get_avatar($thisauthor->user_email, 150, "" ); } ?> </div>
<h3><?php echo $thisauthor->first_name . " " . $thisauthor->last_name; ?> (<?php echo $thisauthor->display_name; ?>)</h3>
<h5>Accredited member since:&nbsp;<?php $registered = ($thisauthor->user_registered . "\n");
  echo date("j/n/Y", strtotime($registered)); ?></h5>
<h5><?php echo $thisauthor->first_name . " " . $thisauthor->last_name; ?>'s website: <a href="<? echo $thisauthor->user_url; ?>"><? echo $thisauthor->user_url; ?></a><br /></h5>
<h5>Email&nbsp;<?php echo $thisauthor->first_name . " " . $thisauthor->last_name; ?>
:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?php if (S2MEMBER_CURRENT_USER_IS_LOGGED_IN){ ?> <a href="mailto:<? echo $thisauthor->user_email; ?>">Email Address</a>&nbsp;<?php } else { ?> (Only available to accredited members)<?php } ?></h5>

<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h3>What&nbsp;<?php echo $thisauthor->display_name; ?>&nbsp;says about themselves:</h3>
<p><?php echo $thisauthor->description; ?> </p>

<?php if (have_posts()) : ?>


<? endif; ?>


Which works fine (output example is: http://aospuk.co.uk/author/aospuk) - probably need to tidy the layout up some - but busily adding the content to the site - so css is acceptable for now....(must get rid of all those
Code:
&nbsp;
and empty paragraphs at some stage!)

Statistics: Posted by arbie — June 19th, 2011, 12:08 pm


]]>
2011-06-19T11:20:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21140#p21140 <![CDATA[Re: Member directory]]>

Statistics: Posted by Cristián Lávaque — June 19th, 2011, 11:20 am


]]>
2011-06-19T03:06:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21130#p21130 <![CDATA[Re: Member directory]]> Thanks - but I think I will keep looking on that one...

[FOLLOW UP]
The plugin mentioned above (now installed) picks up the S2Member fields so there is no additional work to do to any wordpress files.
Essentially it is now just a case of styling the page.....

Statistics: Posted by arbie — June 19th, 2011, 3:06 am


]]>
2011-06-18T22:49:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21114#p21114 <![CDATA[Re: Member directory]]> viewtopic.php?f=4&t=6536

This plugin may be useful too https://wordpress.org/extend/plugins/members-list/

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — June 18th, 2011, 10:49 pm


]]>
2011-06-18T12:15:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10200&p=21096#p21096 <![CDATA[Member directory]]> Essentially I need a directory listing the users by first and last name (with a name search preferably), then individual pages for each user (accessible by clicking the users name in the directory). That page would then be the user profile page and would include their
Name
Membership level
Time of joining
Next renewal date
Member picture (which I add)
Member description/summary
All of the usual plugins miss the S2Member info and only output the normal wordpress info. I want it the other way around!
Think I can work it out?
<sigh>
Nope!
Anyone feeling generous with their knowledge?
(My S2Member is pro if that helps....)

Statistics: Posted by arbie — June 18th, 2011, 12:15 pm


]]>