Page 2 of 15

Re: Profile friend list

Posted: Sat May 30, 2009 8:37 pm
by TandyServices
This was the very first mod I installed and I solved it. I used Dreamweaver to make the edits in the first place, and that seems to be the problem. Now I used wordpad and the problem is solved. Should've thought of that :oops:
Thanks for the quick support :D

Re: Profile friend list

Posted: Sat May 30, 2009 8:49 pm
by platinum_2007
TandyServices wrote:This was the very first mod I installed and I solved it. I used Dreamweaver to make the edits in the first place, and that seems to be the problem. Now I used wordpad and the problem is solved. Should've thought of that :oops:
Thanks for the quick support :D
Oh yes dreamweaver can do that to people :D

Re: Profile friend list

Posted: Sat May 30, 2009 8:59 pm
by phreakwars
TandyServices wrote:This was the very first mod I installed and I solved it. I used Dreamweaver to make the edits in the first place, and that seems to be the problem. Now I used wordpad and the problem is solved. Should've thought of that :oops:
Thanks for the quick support :D
Next time, try Notepad++

http://notepad-plus.sourceforge.net/uk/site.htm
.
.

Re: Profile friend list

Posted: Sat May 30, 2009 9:20 pm
by TandyServices
Thanks for the tip :)

Re: Profile friend list

Posted: Thu Jun 04, 2009 3:06 pm
by trickoff
Is it possible to make some sort of indication that show you if the user/friend is online or not. Mabye to have the username in red or bold text.

Re: Profile friend list

Posted: Thu Jun 04, 2009 5:09 pm
by mr.max
Subsilver2 isn't supported?:( I tryed make the same code changes but that deformed my page :shock:

Re: Profile friend list

Posted: Fri Jun 05, 2009 7:20 am
by woipi90
i have the subsilver2 code got to work....

Code: Select all

<div class="panel bg1">
	<div class="inner"><span class="corners-top"><span></span></span>
		<h3>{L_FRIEND_LIST}</h3>
		<!-- BEGIN fri -->
		<a class="thumbnail" href="{fri.AV_LINK}" style="text-decoration:none">
	<span>
		<!-- IF fri.USER_COLOR --><b style="color:#{fri.USER_COLOR}"> <!-- ELSE --><b style="color:#000;"><!-- ENDIF -->{fri.USERNAME}</b><br /><!-- IF fri.FRI_AV -->{fri.FRI_AV}</span>{fri.FRI_AV_THUMB} <!-- ELSE --> <img src="images/no_avatar.gif" alt="noavatar" /></span><img src="images/no_avatar.gif" alt="noavatar"  width="{fri.WIDTH}" /><!-- ENDIF -->
		</a>
		<!-- END fri -->
<ul class="linklist">
    <li class="rightside pagination">{TOTAL_FRIENDS} &bull; <!-- IF FRINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER_F}</a> &bull; <span>{FRINATION}</span><!-- ELSE -->{PAGE_NUMBER_F}<!-- ENDIF --></li>
</ul>

<span class="corners-bottom"><span></span></span></div>
	</div>

grz woipi

Re: Profile friend list

Posted: Sun Jun 28, 2009 12:10 pm
by superj707
I am using the universal no avatar mod and I am having the same problem as the others. I need the universal no avatar mod to work with this mod.

also I can't for the life of me get the module to appear in the ACP list as instructed in the DIY section of the install. I went over it and over it, it's just not there.




EDIT : UPDATE.... well I have been up all night and after about 9 hours I have not come to any solution on either of these problems. The mod doesn't seem to need ACP control to work so thats not as important but the Universal No Avatar not working is going to be the death of me... *pulls hair out*

Re: Profile friend list

Posted: Sun Jun 28, 2009 5:31 pm
by superj707
trickoff wrote:Is it possible to make some sort of indication that show you if the user/friend is online or not. Mabye to have the username in red or bold text.
I also like this idea.

Re: Profile friend list

Posted: Sun Jun 28, 2009 5:56 pm
by platinum_2007
Replace the edit in memberlist.php with

Code: Select all

		// friend list mod by ian-taylor.ca
	$user_id = request_var('u', 0);
	$start   = request_var('start', 0);
	$limit = request_var('limit', intval($config['number_friends']));
	$sql = 'SELECT u.user_avatar, u.username, u.user_colour, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, z.user_id, z.zebra_id, z.friend FROM ' . USERS_TABLE . '  u, ' . ZEBRA_TABLE . '  z WHERE u.user_id=z.zebra_id AND z.friend = 1 AND z.user_id = '.$user_id;
	$result = $db->sql_query_limit($sql, $limit, $start);
         
	while($row_av = $db->sql_fetchrow( $result )) {
		$avatar_fri = get_user_avatar($row_av['user_avatar'], $row_av['user_avatar_type'], $row_av['user_avatar_width'], 		$row_av['user_avatar_height']);
		$fri_id = $row_av['zebra_id'];
		$av_size_size = $config['friend_avatar_size'];
		
		if(!$row_av['user_avatar'])
		{
		$avatar = '<img src="images/avatars/no_avatar.gif" width="'.$av_size_size.'" />';
		
		}
		else
		$avatar =  ($row_av['user_avatar']) ? get_user_avatar($row_av['user_avatar'], $row_av['user_avatar_type'], ($row_av['user_avatar_width'] > $row_av['user_avatar_height']) ? $av_size_size : ($av_size_size / $row_av['user_avatar_height']) * $row_av['user_avatar_width'], ($row_av['user_avatar_height'] > $row_av['user_avatar_width']) ? $av_size_size : ($av_size_size / $row_av['user_avatar_width']) * $row_av['user_avatar_height']) : '';
		

		$template->assign_block_vars('fri',array(

      		'FRI_ID'   => $row_av['zebra_id'],
      		'FRI_AV'   => $avatar_fri,
      		'USERNAME'   => $row_av['username'],
      		'WIDTH'			=> $config['friend_avatar_size'],
         	'USER_COLOR' => $row_av['user_colour'],
      		'AV_LINK'   => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$fri_id"),      
      		'FRI_AV_THUMB'   =>  $avatar,
));
}
// count some stuff up for the pagination
$profile = request_var('u', 0);
$sql = 'SELECT COUNT(zebra_id) AS number_friends FROM '. ZEBRA_TABLE ." WHERE user_id=$profile AND friend = 1";
$result = $db->sql_query($sql);
$pagination_friend = append_sid($phpbb_root_path . 'memberlist.' . $phpEx ,'mode=viewprofile&u='.$user_id);

	$total_friends = $db->sql_fetchfield('number_friends');
	$db->sql_freeresult($result);

	$template->assign_vars(array(
    	'FRINATION'        => generate_pagination($pagination_friend, $total_friends, $limit, $start),
    	'PAGE_NUMBER_F'       => on_page($total_friends, $limit, $start),
    	'TOTAL_FRIENDS'       => ($total_friends == 1) ? $user->lang['LIST_FRIEND'] : sprintf($user->lang['LIST_FRIENDS'], $total_friends),

	));

// end friend list mod by ian-taylor.ca
to solve the Universal no avatar problem.

Re: Profile friend list

Posted: Sun Jun 28, 2009 6:08 pm
by superj707
platinum_2007 wrote:Replace the edit in memberlist.php with

Code: Select all

		// friend list mod by ian-taylor.ca
	$user_id = request_var('u', 0);
	$start   = request_var('start', 0);
	$limit = request_var('limit', intval($config['number_friends']));
	$sql = 'SELECT u.user_avatar, u.username, u.user_colour, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, z.user_id, z.zebra_id, z.friend FROM ' . USERS_TABLE . '  u, ' . ZEBRA_TABLE . '  z WHERE u.user_id=z.zebra_id AND z.friend = 1 AND z.user_id = '.$user_id;
	$result = $db->sql_query_limit($sql, $limit, $start);
         
	while($row_av = $db->sql_fetchrow( $result )) {
		$avatar_fri = get_user_avatar($row_av['user_avatar'], $row_av['user_avatar_type'], $row_av['user_avatar_width'], 		$row_av['user_avatar_height']);
		$fri_id = $row_av['zebra_id'];
		$av_size_size = $config['friend_avatar_size'];
		
		if(!$row_av['user_avatar'])
		{
		$avatar = '<img src="images/avatars/no_avatar.gif" width="'.$av_size_size.'" />';
		
		}
		else
		$avatar =  ($row_av['user_avatar']) ? get_user_avatar($row_av['user_avatar'], $row_av['user_avatar_type'], ($row_av['user_avatar_width'] > $row_av['user_avatar_height']) ? $av_size_size : ($av_size_size / $row_av['user_avatar_height']) * $row_av['user_avatar_width'], ($row_av['user_avatar_height'] > $row_av['user_avatar_width']) ? $av_size_size : ($av_size_size / $row_av['user_avatar_width']) * $row_av['user_avatar_height']) : '';
		

		$template->assign_block_vars('fri',array(

      		'FRI_ID'   => $row_av['zebra_id'],
      		'FRI_AV'   => $avatar_fri,
      		'USERNAME'   => $row_av['username'],
      		'WIDTH'			=> $config['friend_avatar_size'],
         	'USER_COLOR' => $row_av['user_colour'],
      		'AV_LINK'   => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$fri_id"),      
      		'FRI_AV_THUMB'   =>  $avatar,
));
}
// count some stuff up for the pagination
$profile = request_var('u', 0);
$sql = 'SELECT COUNT(zebra_id) AS number_friends FROM '. ZEBRA_TABLE ." WHERE user_id=$profile AND friend = 1";
$result = $db->sql_query($sql);
$pagination_friend = append_sid($phpbb_root_path . 'memberlist.' . $phpEx ,'mode=viewprofile&u='.$user_id);

	$total_friends = $db->sql_fetchfield('number_friends');
	$db->sql_freeresult($result);

	$template->assign_vars(array(
    	'FRINATION'        => generate_pagination($pagination_friend, $total_friends, $limit, $start),
    	'PAGE_NUMBER_F'       => on_page($total_friends, $limit, $start),
    	'TOTAL_FRIENDS'       => ($total_friends == 1) ? $user->lang['LIST_FRIEND'] : sprintf($user->lang['LIST_FRIENDS'], $total_friends),

	));

// end friend list mod by ian-taylor.ca
to solve the Universal no avatar problem.


OMG IAN thank you thank you thank you. !!! You're an absolute genius. This is why you are one of my most favorite Mod authors. (and jr validator now also)

Re: Profile friend list

Posted: Sun Jun 28, 2009 6:32 pm
by Ashley.S.
Thanks a bunch Ian

Re: Profile friend list

Posted: Sun Jun 28, 2009 7:59 pm
by platinum_2007
No problem

Re: Profile friend list

Posted: Mon Jun 29, 2009 9:17 am
by S.kumaran
Demo please?

Re: Profile friend list

Posted: Mon Jun 29, 2009 3:05 pm
by platinum_2007
S.kumaran wrote:Demo please?

Visit the topic on my dev site at http://itmods.com for a test user account.