Page 4 of 15

Re: Profile friend list

Posted: Fri Jul 24, 2009 12:19 am
by platinum_2007
lovevoice wrote:hey , great MOD i like it .
but i have question
i visited the demo website ..
on member profile i could write a comment the questions are :
1-is the comment available because we have this mod or for status change mod ?
2- when someone post a comment does the member notify that he has new profile comment exactly as in facebook.
thank you
1- Yes just got validated http://www.phpbb.com/community/viewtopi ... &t=1704805
2 - Yes there is a setting in the UCP so users can choose to get notified via email or not.

Re: Profile friend list

Posted: Fri Jul 24, 2009 11:35 am
by stathisch
Got a problem with this. It doesn't show all the friends. :?
For example, it's reporting that I have 17 friends on the corner of the friends list pane, but it's showing only 13 avatars.
What could be the problem? Or is it supposed to be like this?

Re: Profile friend list

Posted: Fri Jul 24, 2009 7:09 pm
by platinum_2007
stathisch wrote:Got a problem with this. It doesn't show all the friends. :?
For example, it's reporting that I have 17 friends on the corner of the friends list pane, but it's showing only 13 avatars.
What could be the problem? Or is it supposed to be like this?
Universal no Avatar mod installed?

Re: Profile friend list

Posted: Fri Jul 24, 2009 10:16 pm
by stathisch
platinum_2007 wrote:
stathisch wrote:Got a problem with this. It doesn't show all the friends. :?
For example, it's reporting that I have 17 friends on the corner of the friends list pane, but it's showing only 13 avatars.
What could be the problem? Or is it supposed to be like this?
Universal no Avatar mod installed?
Yes. Is that the problem?

Re: Profile friend list

Posted: Sat Jul 25, 2009 7:02 pm
by ekawaii
Hello,

If you have PHPBB-SEO mod installed and are having problems with it showing 0 friends even though you have friends added please read my fix below:
I've been having the same problems you've been having with SEO & Profile Friends List Mod. I figured out how to fix it a few minutes ago and thought I'd post my solution, I hope it works for you also or anyone else having this problem. I'm not super good with SQL so please let me know if my fix will cause any problems. So far I haven't ran into any ^_^ It seems that it was indeed the mod that needed a little tweaking to work properly with SEO but I also had already added the Zero Dupe changes. Those changes will also need to be made in addition to the original mod change below.
Here is my complete working code for the friend list mod part of memberlist.php:

Code: Select all

// friend list mod by ian-taylor.ca
	$user_id = request_var('u', 0);
	    // www.phpBB-SEO.com SEO TOOLKIT BEGIN
    if (!$user_id) {
          $user_name = request_var('un', '', true);
          if ($user_name) {
                $sql = 'SELECT user_id
                   FROM ' . USERS_TABLE . "
                   WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'
                      AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
                $result = $db->sql_query($sql);
                if ($row = $db->sql_fetchrow($result)) {
                      $user_id = (int) $row['user_id'];
                }
          }
    }
    // www.phpBB-SEO.com SEO TOOLKIT END
	$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'];

		$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'   =>   ($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']) : '',
));
}	
// count some stuff up for the pagination
$user_id = request_var('u', 0);
	    // www.phpBB-SEO.com SEO TOOLKIT BEGIN
    if (!$user_id) {
          $user_name = request_var('un', '', true);
          if ($user_name) {
                $sql = 'SELECT user_id
                   FROM ' . USERS_TABLE . "
                   WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'
                      AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
                $result = $db->sql_query($sql);
                if ($row = $db->sql_fetchrow($result)) {
                      $user_id = (int) $row['user_id'];
                }
          }
    }
    // www.phpBB-SEO.com SEO TOOLKIT END
$sql = 'SELECT COUNT(zebra_id) AS number_friends FROM '. ZEBRA_TABLE ." WHERE user_id=$user_id AND friend = 1";
$result = $db->sql_query($sql);

	$total_friends = $db->sql_fetchfield('number_friends');
	$db->sql_freeresult($result);
	
$pagination_friend = append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$user_id");
	
	$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
If you compare my code above to your code you'll notice I made the following changes:
- I changed $profile to $user_id
- Added a second PHPSEO Toolkit under the new $user_id that was just changed from $profile
- I changed anything within the profile friends list mod that had used the variable $profile to $user_id


Here is what my zero dupe looks like in memberlist.php

Code: Select all

		// www.phpBB-SEO.com SEO TOOLKIT BEGIN - Zero dupe
      $phpbb_seo->seo_opt['zero_dupe']['redir_def'] = array(
         'mode' => array('val' => 'viewprofile', 'keep' => true),
         'u' => array('val' => $user_id, 'keep' => true, 'force' => true),
	 'start' => array('val' => ($_start = max(0, request_var('start', 0))), 'keep' => !empty($_start)),
      );
		$phpbb_seo->seo_chk_dupe();
		// www.phpBB-SEO.com SEO TOOLKIT END - Zero dupe
That seemed to solve the problem for me. Before the change my friends list showed (0 Friends) and after the changes it shows (1 friend) and then I added a test friend and it shows (2 friends), so it seems to be working properly now.

P.S: I have SEO Rewrite, Zero Dupe and Strict all enabled to YES. Please refer to this post for further information.

Re: Profile friend list

Posted: Sat Jul 25, 2009 8:34 pm
by lovevoice
hey , thank you for the previous question .
now i have two questions :
1- i have auto avatar mod for member those didn't have one , the problem is that if the member doesn't has an avatar in this hack member will have no_avatar.gif attachment with hack files. but this picture conflicted with my mod which give members auto avatar , and member those doesn't have avatar won't be appear on friends list . how can i solve this problem .
i think we have to delete the code in this hack which gives the member no_avatar auto image or something like this.

2- look at this pic
Image

when we move the mouse over the small picture it appear bigger . but at the right of the small picture
how can i make it shows at the left for all pictures , and at right for the last one at the left of the page ?
thank you

Re: Profile friend list

Posted: Sat Jul 25, 2009 8:50 pm
by platinum_2007
stathisch wrote:
platinum_2007 wrote:
stathisch wrote:Got a problem with this. It doesn't show all the friends. :?
For example, it's reporting that I have 17 friends on the corner of the friends list pane, but it's showing only 13 avatars.
What could be the problem? Or is it supposed to be like this?
Universal no Avatar mod installed?
Yes. Is that the problem?
Yes but i posted a fix here http://itmods.com/viewtopic.php?f=11&t=3&start=10#p425

lovevoice the above link applies to you also. As for the picture being on the right you need to edit it in memberlist_avatar.css to change the layout.

:)

Re: Profile friend list

Posted: Sat Jul 25, 2009 9:17 pm
by lovevoice
thank you for fast reply .. but after i changed the code of memberlist.php from the link above
i still have the same problem .
for memberlist_avatar.css , sorry could you please tell me where i have to change , sorry i'm not familiar with css.
note : i made the avatar from 0-5 , i means 6 pictures change randomly ,
in the following code :

Code: Select all

return '<img src="images/avatars/no_avatar' . rand(0, 6) .  '.gif" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
thank you

Re: Profile friend list

Posted: Sun Jul 26, 2009 12:07 am
by lovevoice
this first question has been solved ...
i put this code

Code: Select all

 if(!$row_av['user_avatar'])
          {
          $avatar = '<img src="images/avatars/no_avatar' . rand(0, 5) .  '.gif" width="'.$av_size_size.'" />';
          
          }
instead of this

Code: Select all

if(!$row_av['user_avatar'])
          {
          $avatar = '<img src="images/avatars/no_avatar.gif" width="'.$av_size_size.'" />';
          
          }
the first code is similar that i made in auto avatar ..
but i still have the second question
what the code that i have to change in css .
thank you

Re: Profile friend list

Posted: Sun Jul 26, 2009 10:34 am
by noth
After installation, go to your Administrator Control Panel.
Click on Systems tab.
On the left hand side, choose "Administation Control Panel" under "Module Management".
Then choose "General", then "Board Configuration".
In the drop down select "Profile friends mod".
finding "Profile friends mod" in the list is a real bind

look under the header Board Configuration (in the drop down list itself)

it's like finding a needle in a haystack almost, that list is huge and the MOD gives little help as to where in the list it is

APART FROM THAT :mrgreen: great MOD!!!!

Re: Profile friend list

Posted: Sun Jul 26, 2009 5:40 pm
by eunaumtenhoid
how will i install in subsilver2?

Re: Profile friend list

Posted: Sun Jul 26, 2009 6:05 pm
by platinum_2007
lovevoice wrote:thank you for fast reply .. but after i changed the code of memberlist.php from the link above
i still have the same problem .
for memberlist_avatar.css , sorry could you please tell me where i have to change , sorry i'm not familiar with css.
note : i made the avatar from 0-5 , i means 6 pictures change randomly ,
in the following code :

Code: Select all

return '<img src="images/avatars/no_avatar' . rand(0, 6) .  '.gif" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
thank you
Without testing i would say you need to change

Code: Select all

a.thumbnail:hover {
	background-color: transparent;
	z-index: 50;
}
to

Code: Select all

a.thumbnail:hover {
	background-color: transparent;
	z-index: -50;
}

Re: Profile friend list

Posted: Sun Jul 26, 2009 6:06 pm
by platinum_2007
eunaumtenhoid wrote:how will i install in subsilver2?
Best bet would be to change the layout into a table layout.

Re: Profile friend list

Posted: Sun Jul 26, 2009 6:13 pm
by eunaumtenhoid
:( in place of edit this: @import url("colours.css");

styles/prosilver/theme/stylesheet.css

for subsilver2 anyone know?

Re: Profile friend list

Posted: Sun Jul 26, 2009 6:41 pm
by platinum_2007
eunaumtenhoid wrote::( in place of edit this: @import url("colours.css");

styles/prosilver/theme/stylesheet.css

for subsilver2 anyone know?
you can place it in styles/subsilver2/theme/stylesheet.css at the very bottom of the file.