News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ultimate Profile

Started by JovanT, March 12, 2009, 12:14:40 PM

Previous topic - Next topic

JovanT

@gbsothere
To limit the size of avatars in your buddy's section, make these modifications. Open Sources/Profile.php:

Code (Find) Select
// For avatars: if we're always html resizing, assume it's too large.
if ($modSettings['avatar_action_too_large'] == 'option_html_resize' || $modSettings['avatar_action_too_large'] == 'option_js_resize') {
$avatar_width = !empty($modSettings['avatar_max_width_external']) ? ' width="' . $modSettings['avatar_max_width_external'] . '"' : '';
$avatar_height = !empty($modSettings['avatar_max_height_external']) ? ' height="' . $modSettings['avatar_max_height_external'] . '"' : '';
} else {
$avatar_width = '';
$avatar_height = '';
}

Code (Replace with) Select

$avatar_width = ' width="100" ';
$avatar_height = ' height="100" ';

Of course, you can change "100" to suit your needs.

Code (Find) Select
$user_data['avatar_image'] = $user_data['avatar'] == '' ? ($user_data['ID_ATTACH'] > 0 ? '<img src="' . (empty($user_data['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $user_data['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $user_data['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($user_data['avatar'], 'http://') ? '<img src="' . $user_data['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($user_data['avatar']) . '" alt="" class="avatar" border="0" />');
Code (Replace with) Select
$user_data['avatar_image'] = $user_data['avatar'] == '' ? ($user_data['ID_ATTACH'] > 0 ? '<img src="' . (empty($user_data['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $user_data['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $user_data['filename']) . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '') : (stristr($user_data['avatar'], 'http://') ? '<img src="' . $user_data['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($user_data['avatar']) . '"' . $avatar_width . $avatar_height . '  alt="" class="avatar" border="0" />');


And for the blog thing, does it already show recent blog posts in ordinary profiles?

JovanT

@Mr_Lon
I've just tested this on my local forum. If you have enabled "Allow users to email you?" under "Account Settings", other users will be able to contact you via "Members" section but they will not be able to see your email on your profile. It will show "hidden".

Hoewever, if you want to remove this section completely, open your Themes/defaultUltimateProfile.template.php and delete (line #193):

echo '
<tr>
<td><img src="', $settings['images_url'] ,'/email_sm.gif" alt="', $txt['email'], '" /></td>
<td valign="middle">';

// Only show the email address fully if it's not hidden - and we reveal the email.
if ($context['member']['show_email'] == 'yes')
echo '
<a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a>';

// ... Or if the one looking at the profile is an admin they can see it anyway.
elseif ($context['member']['show_email'] == 'yes_permission_override')
echo '
<i><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></i>';
else
echo '
<i>', $txt['hidden'], '</i>';

// Some more information.
echo '
</td>
</tr>';

JovanT

@Dzonny
You can increase number of displayed pictures. Open Sources/Profile.php.
Code (Find) Select

$request = db_query('SELECT ID_PICTURE, time, title, filename
FROM ' . $db_prefix . 'profile_pictures
WHERE ID_MEMBER = ' . $memID . '
ORDER BY RAND()
LIMIT 6', __FILE__, __LINE__);

and replace "6" with "10".

Then, open Themes/default/UltimateProfile.template.php.
Code (Find) Select

if ($i == 3)

Code (Replace with) Select

if ($i == 5)


Code (Find) Select

if ($i == 4) $i = 1;

Code (Replace with) Select

if ($i == 6) $i = 1;

gbsothere

JovanT, it worked beautifully and thank you so much!   I needed a width of only "65" and I had to leave the "height" empty:  $avatar_height = ' height="" '; in order to keep the aspect ratio fixed, since some avatars aren't perfectly square, but that did it and I really appreciate it!

As to the blog, I should have realized that.  No, they didn't show in the profiles, before.  That makes sense that we wouldn't have them showing, now.   :)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Dzonny

JovanT, thanks for your quick answer...
Anyway i still have the same problem. Please see attached image. I still have space right of displayed pics.
I've also attached my profile.php too see if i've done smth wrong...


JovanT

@Dzonny
It seems that you didn't change your UltimateProfile.template.php. When you do, it will show 2 rows with 5 pictures each.


Quote from: gbsothere on July 16, 2009, 08:16:02 AM
As to the blog, I should have realized that.  No, they didn't show in the profiles, before.  That makes sense that we wouldn't have them showing, now.   :)
It could be shown easily if the mod author gives you the code that will fetch N last entries from your blog.

gbsothere

Quote from: JovanT on July 16, 2009, 09:17:21 AM

It could be shown easily if the mod author gives you the code that will fetch N last entries from your blog.


Thanks, JovanT!  He's in the middle of moving servers, but I'll glean the support thread here for his mod and see if this question has been raised before. 
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

DonnaMarie

Will this work with the new 1.1.10 version?

JovanT

It will work with 1.1.10.

gbsothere

#489
I just wanted to mention (and I'm sorry that it sounds more like complaining) that I just did the same edits you suggested to Dzonny to remove the blank space to the right of the displayed pictures and I also still have the same blank space.



(I'm attaching the files, just in case, but I think the correct edits are there?)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

JovanT

Profile.php is correct but I don't see proper edits in UltimateProfile.template.php. As I can see, you changed the part which displayes buddies and not the part related to pictures. You should pay attentions to the tabs / blank spaces as well when searching the code. I'm attaching the correct version of UltimateProfile.template.php.

DonnaMarie

Quote from: JovanT on July 16, 2009, 09:29:13 AM
It will work with 1.1.10.

Thanks, now if I can get the buddy thing worked out, I am good to go. I love how it looks :)

gbsothere

Quote from: JovanT on July 16, 2009, 09:57:24 AM
Profile.php is correct but I don't see proper edits in UltimateProfile.template.php. As I can see, you changed the part which displayes buddies and not the part related to pictures. You should pay attentions to the tabs / blank spaces as well when searching the code. I'm attaching the correct version of UltimateProfile.template.php.


You're right, I completely bungled it.  It's a wonder I haven't blown my forum up.   :)

That's amazing, JovanT!  Thanks so much; you're very kind.  It looks great.
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

zanyuki

Any support for RC1.2?

DonnaMarie

Quote from: zanyuki on July 16, 2009, 10:26:32 AM
Any support for RC1.2?
I was going to ask that as I think I will upgrade today :)

Dzonny

JovanT, thanks for help, i fixed this.
In ultimateprofile.template.php there is two  if ($i == 3) and if ($i == 4) $i = 1; codes, so i've edited them and have pictures as i wanted.

Hvala! :)

chrishicks

I'm still having the issue where playlist.com playlists don't show for anyone using IE. It worked when I was using 0.7 but stopped after upgrading to 0.9. Any idea of what could be causing this? I'm on 1.1.10 by the way.

Mr_Lon

Quote@Mr_Lon
I've just tested this on my local forum. If you have enabled "Allow users to email you?" under "Account Settings", other users will be able to contact you via "Members" section but they will not be able to see your email on your profile. It will show "hidden".

Hoewever, if you want to remove this section completely, open your Themes/defaultUltimateProfile.template.php and delete (line #193):

Thank You JovanT

I did take out the lines that you gave me and everything looks good. I just didn't like the full email address showing it isn't shown in the Members List.
We all know about Spammers and other undesirables collecting email addresses.

Lon

Mr_Lon

#498
One more Quick question please.

In my Ultimate Profile in the "Contact Me" area I have this Contact Me :)
Is there suppose to be a "Smile" there showing like this - Contact Me :) ? Mine don't show like this?.....

Lon

mrtrc266

WOOOOHOOOOO!!! WTG on the release for SMF 2!

Thank you very much Jovan and anyone else who contributed to the dedication and hard work on getting this ported to SMF 2.

Installed clean and works great!

Advertisement: