Results 1 to 4 of 4
  1. #1
    Constant Pligger voxxxlll's Avatar
    Joined
    Jun 2010
    Posts
    156

    Show Friends 2 in profile

    Hi guys! this is the code to show the friends in the profile:
    HTML Code:
    <div id="friends">
    			<fieldset><legend>{#PLIGG_Visual_User_Profile_Friends#}</legend>
    			{if $friends}			
    				<table id="friendlist">
    					<thead>
    						<tr>
    							<th scope="col" style="width:25px;"></th>
    							<th scope="col">{#PLIGG_Visual_Login_Username#}</th>
    							{checkActionsTpl location="tpl_pligg_profile_friend_th"}
    							{if $user_login eq $user_logged_in}<th scope="col">{#PLIGG_Visual_User_Profile_Remove_Friend#}</th>{/if}
    						</tr>
    					</thead>
    					<tbody>
    						{foreach from=$friends item=myfriend}
    							{php}
    								$this->_vars['friend_avatar'] = get_avatar('small', $this->_vars['myfriend']['user_avatar_source'], $this->_vars['myfriend']['user_login'], $this->_vars['myfriend']['user_email']);
    								$this->_vars['profileURL'] = getmyurl('user2', $this->_vars['myfriend']['user_login'], 'profile');
    								$this->_vars['removeURL'] = getmyurl('user_add_remove', $this->_vars['myfriend']['user_login'], 'removefriend');
    							{/php}
    							<tr>
    							<td><a href="{$profileURL}"><img src="{$friend_avatar}" style="text-decoration:none;border:0;"/></a></td>
    							<td><a href="{$profileURL}">{$myfriend.user_login}</a></td>
    							{checkActionsTpl location="tpl_pligg_profile_friend_td"}
    							{if $user_login eq $user_logged_in}
    								<td><a href="{$removeURL}"><img src="{$my_pligg_base}/templates/{$the_template}/images/delete.gif" style="border:0;text-decoration:none;"/></a> <a href="{$removeURL}"> {$myfriend.user_login}</a></td>
    							{/if}
    							</tr>
    						{/foreach}
    					</tbody>
    				</table>
    			{else}
    				<br />{#PLIGG_Visual_User_Profile_No_Friends#}
    			{/if}
    			</fieldset>
    		</div>
    Unfortunately i cannot figure out how to show friends 2 in the profile aswell.Anybody can help?Thank you!

  2. #2
    Casual Pligger tnsblog's Avatar
    Joined
    Sep 2010
    Posts
    31
    Were you able to figure out, how to show friends 2.

    If yes then would you mind sharing, how you did that?

  3. #3
    Constant Pligger urbn's Avatar
    Joined
    Oct 2010
    Posts
    107
    This is the code from my site which is working, though it may be modified, but it should help you figure out what the problem is.

    Code:
    <h2>{#PLIGG_Visual_User_Profile_Viewing_Friends_2a#}</h2>
    	{if $friends}
    	  	<table>
    			{if check_for_enabled_module('simple_messaging',0.6) && $is_friend}
    				<th style="width:250px;text-align:left;">{#PLIGG_Visual_User_Profile_Username#}</th>
    				<th style="width:60px;text-align:left;">{#PLIGG_Visual_User_Profile_Message#}</th>
    			{/if}
    			{foreach from=$friends item=myfriend}
    				{php}
    					$this->_vars['friend_avatar'] = get_avatar('small', $this->_vars['myfriend']['user_avatar_source'], $this->_vars['myfriend']['user_login'], $this->_vars['myfriend']['user_email']);
    					$this->_vars['profileURL'] = getmyurl('user2', $this->_vars['myfriend']['user_login'], 'profile');
    					$this->_vars['removeURL'] = getmyurl('user_add_remove', $this->_vars['myfriend']['user_login'], 'removefriend');
    				{/php}
    
    				<tr>
    				<td><img src="{$friend_avatar}" align="absmiddle" /> <a href="{$profileURL}">{$myfriend.user_login}</a></td>
    				{if check_for_enabled_module('simple_messaging',0.6) && $is_friend}<td><a href="{$my_pligg_base}/module.php?module=simple_messaging&view=compose&to={$myfriend.user_login}&return={$templatelite.server.REQUEST_URI|urlencode}"><img src="{$my_pligg_base}/modules/simple_messaging/images/reply.png" border="0" /></a></td>{/if}
    				</tr>
    			{/foreach}
    		</table>
    	{else}
    		<br /><br />
    		<h2 style="text-align:center;"><span style="text-transform:capitalize;">{$user_username}</span> {#PLIGG_Visual_User_Profile_No_Friends_2#}</h2>
    	{/if}

  4. #4
    Casual Pligger tnsblog's Avatar
    Joined
    Sep 2010
    Posts
    31
    Ubrn,

    Actually i'm trying to show "viewfriends2" on user profile page using tabs. Currently it is set to show "viewfriends" on profile page.

    Is there any way to show "viewfriends2" on profile page?

    Thanks. Any help would be appreciated.

Similar Threads

  1. How do add my Friends 2 show in profile page?
    By nellaitamil in forum Questions & Comments
    Replies: 2
    Last Post: 11-10-2010, 01:33 PM
  2. Changing how many friends to show at the profile page?
    By Jonase in forum Questions & Comments
    Replies: 0
    Last Post: 07-04-2010, 01:10 PM
  3. Profile Friends Box
    By method20 in forum Questions & Comments
    Replies: 3
    Last Post: 09-11-2008, 04:30 PM
  4. Replies: 3
    Last Post: 10-12-2007, 11:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting