Profile friend list

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
TandyServices
Registered User
Posts: 10
Joined: Thu May 28, 2009 12:13 am

Re: Profile friend list

Post 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
platinum_2007
Registered User
Posts: 1101
Joined: Tue Jul 22, 2008 2:47 am
Location: Nova Scotia, Canada

Re: Profile friend list

Post 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
User avatar
phreakwars
Registered User
Posts: 242
Joined: Thu Feb 22, 2007 4:57 am
Location: Polaris Industries

Re: Profile friend list

Post 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
.
.
MODS by me: Default Topic Icon
TandyServices
Registered User
Posts: 10
Joined: Thu May 28, 2009 12:13 am

Re: Profile friend list

Post by TandyServices »

Thanks for the tip :)
trickoff
Registered User
Posts: 513
Joined: Mon Jan 07, 2008 12:23 am

Re: Profile friend list

Post 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.
mr.max
Registered User
Posts: 24
Joined: Wed Jan 30, 2008 10:22 pm

Re: Profile friend list

Post by mr.max »

Subsilver2 isn't supported?:( I tryed make the same code changes but that deformed my page :shock:
User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: Profile friend list

Post 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
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";
superj707
Registered User
Posts: 1136
Joined: Thu Feb 26, 2009 12:20 am

Re: Profile friend list

Post 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*
Last edited by superj707 on Sun Jun 28, 2009 5:46 pm, edited 2 times in total.
superj707
Registered User
Posts: 1136
Joined: Thu Feb 26, 2009 12:20 am

Re: Profile friend list

Post 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.
platinum_2007
Registered User
Posts: 1101
Joined: Tue Jul 22, 2008 2:47 am
Location: Nova Scotia, Canada

Re: Profile friend list

Post 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.
superj707
Registered User
Posts: 1136
Joined: Thu Feb 26, 2009 12:20 am

Re: Profile friend list

Post 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)
User avatar
Ashley.S.
Registered User
Posts: 469
Joined: Mon Aug 04, 2008 6:01 pm
Location: Falmouth, Cornwall, UK
Name: Ashley .S.

Re: Profile friend list

Post by Ashley.S. »

Thanks a bunch Ian
Regards,
-Ashley.S. [ PurephpBB Founder ]
platinum_2007
Registered User
Posts: 1101
Joined: Tue Jul 22, 2008 2:47 am
Location: Nova Scotia, Canada

Re: Profile friend list

Post by platinum_2007 »

No problem
User avatar
S.kumaran
Registered User
Posts: 23
Joined: Sun Jan 04, 2009 7:34 pm
Name: Shivasharma Nallaikkumaran

Re: Profile friend list

Post by S.kumaran »

Demo please?
platinum_2007
Registered User
Posts: 1101
Joined: Tue Jul 22, 2008 2:47 am
Location: Nova Scotia, Canada

Re: Profile friend list

Post by platinum_2007 »

S.kumaran wrote:Demo please?

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

Return to “[3.0.x] MOD Database Releases”