Page 1 of 1

Profile Friend List 2.0.1 (my Own Costumization)

Posted: Fri Jul 31, 2009 6:48 pm
by djrikyx
This Mod not is a Official part of 'Profile Friend List' by platinum_2007
It's only a my Own Costumisation.

Profile Friend List Version 2.0.1

New Feature: Username Display, Age Display (if filled), Background Color Based on Gender.
Notes: This version NOT is compatible with Gender Mod. There is a Custom Profile Field for gender.
Tip: Install Birthday on Registration for make a Required Field the Birthday at registration :)

Download Update: Update from 1.0.3

Download Full Installation: Install 2.0.1

Please report bug or problem with this version of Mod


Profile Friend List Version 2.0.1a

Notes: This version It's ONLY for users who have Gender Mod Installed.

Download Update: Update from 1.0.3

Download Full Installation: Install 2.0.1a

Please report bug or problem with this version of Mod

Backup ALL Files Before Install.

Re: Profile Friend List 2.0.1 (my Own Costumization)

Posted: Sun Aug 02, 2009 12:25 am
by superj707
the memberlist_view.html I think ws designed in IE 7 because it looks perfect in IE 7 but it doesn't look right in FF .. THIS IS A MOD TO djrikyx's MOD of IANS MOD..

Essentially this is a mod of a mod. (D'oh)

here are some small fixes to make it look GREAT



Code: Select all

if($fri_age == 0-0-0)
replace with

Code: Select all

if (!ereg('^[[:digit:]]{2}$',$fri_age)) {

Code: Select all

'USERNAME'   => $row_av['username'],
replace with

Code: Select all

'USERNAME'   => str_replace(' ','',$row_av['username']),

use this as your memberlist_view.html entry

Code: Select all

<div class="panel bg1">
	<div class="inner"><span class="corners-top"><span></span></span>

		<!-- BEGIN fri -->
<div title="{fri.USERNAME} | {fri.FRI_GENDER} | {fri.FRI_AGE} {fri.FRI_YEARS}" onmouseover="'pointer';" onclick="location.href='{fri.AV_LINK}';"  class="friend-box">
<div class="friend-bg" style="background:url({T_THEME_PATH}/images/friend_{fri.FRI_GENDER}.png) no-repeat;">
<div class="friend-avatar">{fri.FRI_AV_THUMB}</div>

<div class="friend-username"><b style="color:#000;">{fri.USERNAME}</b></div>
<div class="friend-age"><font color="#000">{fri.FRI_AGE}</font></div>
<div class="friend-clearer"></div>

<!-- END fri -->
<div class="friend-clearer"></div>
<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>

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

These changes fix a lot of potential problems that may or may not be causing problems in your case. It's a good idea to add these the above changes because it will prevent the mod from having it's layout broken.
that does it. Firefox and all other modern browser approved.

Re: Profile Friend List 2.0.1 (my Own Costumization)

Posted: Sun Aug 02, 2009 12:29 am
by superj707
thank you so much for taking this mod to the next level.
I really appreciate all you are doing for this wonderful mod.

I would really like to see this mod expanded to add the feature of allowing users to organize their friend list , or at the least their top list. AS is I have over 100 friends and the friend list has become useless for finding anyone because there is no tools for sorting or organization.

perhaps a link to a "view all" page with "sort by ..." options on the view all page would be helpful. And a user defined top list.

What do you think >?

Re: Profile Friend List 2.0.1 (my Own Costumization)

Posted: Mon Aug 03, 2009 1:44 am
by superj707
ian's new friend list customizations are not compatible with your updates yet. a new version would be awesome.

I made the ian's new mod work with your version. I did the work, I hope it helps you. Here is the update to the memberlist.php for the version using the gender mod. Works for me.

Code: Select all

// friend list mod by
function is_user_online($id)
		global $db, $config;
        $session_sql = 'SELECT MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline
            FROM ' . SESSIONS_TABLE . "
            WHERE session_user_id = $id";
        $session_result = $db->sql_query($session_sql);
        $session_row = $db->sql_fetchrow($session_result);

        $member['session_time'] = (isset($session_row['session_time'])) ? $session_row['session_time'] : 0;
        $member['session_viewonline'] = (isset($session_row['session_viewonline'])) ? $session_row['session_viewonline'] :    0;

        $update_time = $config['load_online_time'] * 60;
        $online = (time() - $update_time < $member['session_time'] && ((isset($member['session_viewonline']) && $member['session_viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
        return $online;


	$user_id = request_var('u', 0);
	$start   = request_var('start', 0);
	$limit = request_var('limit', intval($config['number_friends']));
	$sql = $db->sql_build_query('SELECT', array(
	'SELECT'	=>  'u.user_regdate, u.user_lastvisit, user_posts, z.zebra_id,  u.user_avatar, u.user_birthday, u.username, u.user_colour, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, u.user_gender, z.user_id, z.zebra_id, z.friend', 
	'FROM'		=> array(
		USERS_TABLE		=> 'u',
	'LEFT_JOIN'	=> array(
			'FROM'	=> array(ZEBRA_TABLE => 'z'),
			'ON'	=> 'u.user_id=z.zebra_id'		
		'WHERE'		=> ' u.user_id=z.zebra_id AND z.friend = 1 AND z.user_id ='.$user_id,
		'ORDER_BY'	=> 'z.zebra_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'];
		$fri_age = $row_av['user_birthday'];
		$fri_gender = $row_av['user_gender'];
			if ($fri_age)
				list($bday_day1, $bday_month1, $bday_year1) = array_map('intval', explode('-', $fri_age));

				if ($bday_year1)
					$now1 = getdate(time() + $user->timezone + $user->dst - date('Z'));

					$diff1 = $now1['mon'] - $bday_month1;
					if ($diff1 == 0)
						$diff1 = ($now1['mday'] - $bday_day1 < 0) ? 1 : 0;
						$diff1 = ($diff1 < 0) ? 1 : 0;

					$fri_age = (int) ($now1['year'] - $bday_year1 - $diff1);
				if (!ereg('^[[:digit:]]{2}$',$fri_age)) {
				$fri_age = '--';
				if($fri_gender == 1){
				$fri_cgender = 'Male';
				}else if($fri_gender == 2){
				$fri_cgender = 'Female';
				}else if($fri_gender == 0){
				$fri_cgender = 'Undefined';
      $avatar = '<img src="images/avatars/no_avatar.gif" width="'.$av_size_size.'" />';
      $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']) : '';

			'FRI_GENDER'	=> $fri_cgender,
			'FRI_AGE'	=> $fri_age,
			'FRI_YEARS'	=> $user->lang['FRI_YEARS'],
      		'FRI_ID'   => $row_av['zebra_id'],
      		'FRI_AV'   => $avatar_fri,
      		'USERNAME'   => str_replace("-", "",str_replace(' ','',$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,
			'ONLINE_USER'		=> is_user_online($row_av['zebra_id'])

// 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');

    	'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),
		'U_VIEW_ALL' 		=> append_sid("{$phpbb_root_path}friend_list.$phpEx", "u=$user_id"),


// end friend list mod by

Re: Profile Friend List 2.0.1 (my Own Costumization)

Posted: Sat Nov 06, 2010 1:19 am
by vortexhlp
The url is long gone, could somebody please upload the file to megaupload or something please? I'm pulling my hair in frustration trying to get the friends mod to display on the index.php page (well on all pages that is). gah! ;__;