Ultimate Profile

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

Previous topic - Next topic

Chriss Cohn

Quote from: NenaGb on March 14, 2009, 03:36:46 AM
any idea how to move the most recent visitors over to the right side under 'My Media' area?

Pretty simple is 5 mins work, just did it.

I assume you have the latest of both mods installed (4.0 for 1.18) and they are working.

Open your "UltimateProfile.template.php" from your themes/default folder.

Seach for this whole block:
// Let's see who viewed my profile.
if(!empty($modSettings['pv_enabled']) && $context['can_view_visitor']) {
echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="buddies">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['pv_latest_visitors'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2">
<table width="100%">';
if (!empty($context['visitor_profiles'])) {
$i = 1;
foreach ($context['visitor_profiles'] as $visitor) {
if ($i == 1)
echo ' <tr>';
echo '
<td class="windowbg" align="center" valign="bottom" style="padding:5px; width: 100px;">', $visitor['avatar']['href'] ? '<img src="' . $visitor['avatar']['href'] .'" width="50" />' : '', '<br /><b>', $visitor['link'], '</b><br /><span class="smalltext">', $visitor['time'], $context['can_delete_visitor'] ? '<br /><a href="' . $scripturl . '?action=deletevisitor;profile=' . $context['member']['id'] . ';member=' . $visitor['id'] . ';sesc=' . $context['session_id'] . '">' . $txt[31] . '</a>' : '', '</span></td>';

if ($i == 3)
echo '</tr>';

$i++;
if ($i == 4) $i = 1;
}
} else
echo ' <tr><td>', $txt['pv_no_visitors'] ,'</td></tr>';

echo '
</table>
</td>
</tr>';

echo '
</table>
</td>
</tr>
</table>
<br />';
}

and DELETE it.

Scroll down until the END of this block:
if (($modSettings['profile_allow_mediabox'] == 1) && (!empty($context['member']['options']['media'])))
echo '
<br />

<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="media">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['profile_media'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
', un_htmlspecialchars ($context['member']['options']['media']) ,'
</td>
</tr>
</table>';


And ADD this:
// Let's see who viewed my profile.
if(!empty($modSettings['pv_enabled']) && $context['can_view_visitor']) {
echo '
<br />
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="buddies">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['pv_latest_visitors'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2">
<table width="100%">';
if (!empty($context['visitor_profiles'])) {
$i = 1;
foreach ($context['visitor_profiles'] as $visitor) {
if ($i == 1)
echo ' <tr>';
echo '
<td class="windowbg" align="center" valign="bottom" style="padding:5px; width: 100px;">', $visitor['avatar']['href'] ? '<img src="' . $visitor['avatar']['href'] .'" width="50" />' : '', '<br /><b>', $visitor['link'], '</b><br /><span class="smalltext">', $visitor['time'], $context['can_delete_visitor'] ? '<br /><a href="' . $scripturl . '?action=deletevisitor;profile=' . $context['member']['id'] . ';member=' . $visitor['id'] . ';sesc=' . $context['session_id'] . '">' . $txt[31] . '</a>' : '', '</span></td>';

if ($i == 3)
echo '</tr>';

$i++;
if ($i == 4) $i = 1;
}
} else
echo ' <tr><td>', $txt['pv_no_visitors'] ,'</td></tr>';

echo '
</table>
</td>
</tr>';

echo '
</table>
</td>
</tr>
</table>
<br />';
}


Its basically the same code you delete earleir, but i just added a "br" to it...
Works fabulous.

heinandar

Now , Ultimate Profile is version 0.9
What is the change log 0.85 to 0.9

how can i update 0.85 to 0.9 manually (I don't wanna uninstall 0.85)

JovanT

There are no new features. Compared to 0.8.5, UP 0.9 brought a few bug fixes (size of avatars), better language support (if you use two or more languages simultaneously) and new and improved HTML filter to prevent XSS attacks.

Sudhakar Arjunan

Quote from: JovanT on March 13, 2009, 05:57:25 PM


And, for all of you waiting for the RC1 version, one small announcement: I will certainly port UP to SMF 2.0. I just need time to get used to all the changes and new database system.

As I wrote earlier, adding Ultimate Profile to mod site was my priority. Now, when that's finally over, I can move to the next task :). I can't promise you the exact release date but you should expect it during the next month.

This is an excellent mod which i have used on my 1.1.5.

As you said, we all will be waiting for 2.0. supported version of Ultimate Profile.

Thank you JovanT.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Mr_Lon

Hi JovanT
I see that you have a version 0.9 up in the Mod site. I take it that it is still not ready for RC1? Or can it be manually installed in RC1?

I'm waiting patiently for this Cool Mod for my site.

Lon

Xavi-Nena

Quote from: Chriss Cohn on March 14, 2009, 10:27:13 AM
Quote from: NenaGb on March 14, 2009, 03:36:46 AM
any idea how to move the most recent visitors over to the right side under 'My Media' area?

Pretty simple is 5 mins work, just did it.

I assume you have the latest of both mods installed (4.0 for 1.18) and they are working.

Open your "UltimateProfile.template.php" from your themes/default folder.

Seach for this whole block:
// Let's see who viewed my profile.
if(!empty($modSettings['pv_enabled']) && $context['can_view_visitor']) {
echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="buddies">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['pv_latest_visitors'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2">
<table width="100%">';
if (!empty($context['visitor_profiles'])) {
$i = 1;
foreach ($context['visitor_profiles'] as $visitor) {
if ($i == 1)
echo ' <tr>';
echo '
<td class="windowbg" align="center" valign="bottom" style="padding:5px; width: 100px;">', $visitor['avatar']['href'] ? '<img src="' . $visitor['avatar']['href'] .'" width="50" />' : '', '<br /><b>', $visitor['link'], '</b><br /><span class="smalltext">', $visitor['time'], $context['can_delete_visitor'] ? '<br /><a href="' . $scripturl . '?action=deletevisitor;profile=' . $context['member']['id'] . ';member=' . $visitor['id'] . ';sesc=' . $context['session_id'] . '">' . $txt[31] . '</a>' : '', '</span></td>';

if ($i == 3)
echo '</tr>';

$i++;
if ($i == 4) $i = 1;
}
} else
echo ' <tr><td>', $txt['pv_no_visitors'] ,'</td></tr>';

echo '
</table>
</td>
</tr>';

echo '
</table>
</td>
</tr>
</table>
<br />';
}

and DELETE it.

Scroll down until the END of this block:
if (($modSettings['profile_allow_mediabox'] == 1) && (!empty($context['member']['options']['media'])))
echo '
<br />

<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="media">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['profile_media'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
', un_htmlspecialchars ($context['member']['options']['media']) ,'
</td>
</tr>
</table>';


And ADD this:
// Let's see who viewed my profile.
if(!empty($modSettings['pv_enabled']) && $context['can_view_visitor']) {
echo '
<br />
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="buddies">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['pv_latest_visitors'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2">
<table width="100%">';
if (!empty($context['visitor_profiles'])) {
$i = 1;
foreach ($context['visitor_profiles'] as $visitor) {
if ($i == 1)
echo ' <tr>';
echo '
<td class="windowbg" align="center" valign="bottom" style="padding:5px; width: 100px;">', $visitor['avatar']['href'] ? '<img src="' . $visitor['avatar']['href'] .'" width="50" />' : '', '<br /><b>', $visitor['link'], '</b><br /><span class="smalltext">', $visitor['time'], $context['can_delete_visitor'] ? '<br /><a href="' . $scripturl . '?action=deletevisitor;profile=' . $context['member']['id'] . ';member=' . $visitor['id'] . ';sesc=' . $context['session_id'] . '">' . $txt[31] . '</a>' : '', '</span></td>';

if ($i == 3)
echo '</tr>';

$i++;
if ($i == 4) $i = 1;
}
} else
echo ' <tr><td>', $txt['pv_no_visitors'] ,'</td></tr>';

echo '
</table>
</td>
</tr>';

echo '
</table>
</td>
</tr>
</table>
<br />';
}


Its basically the same code you delete earleir, but i just added a "br" to it...
Works fabulous.

Thank you this actually moved it under both colums just above my edit/comments area so its spread across the entire bottom of the page.....is there a way to do it just under the Media
side as well?

TheMaker

Great Mod!!
but there aren't a version for smf 2.0 RC1?   :(

Chriss Cohn

Quote from: NenaGb on March 14, 2009, 09:42:57 PM
Thank you this actually moved it under both colums just above my edit/comments area so its spread across the entire bottom of the page.....is there a way to do it just under the Media side as well?
I have attached my file so you can see how it looks there - line 512 is where it starts.


chrishicks

Question... Is there a way to get opacity working correctly in the profiles for IE? I tossed up a quick layout code which i found posted here in another topic and it looks fine in Firefox but absolutely horrid in IE. In IE there are large chunks of the page that doesn't even show and that's only part of the problem. I had no idea it was like this until someone pointed it out to me since I never use IE. Here is my profile page:

http://rejectsreststop.com/forum/index.php?action=profile;u=1;sa=summary (Warning.. slightly mature background??)

Can someone give me an idea how to fix the look in IE? If possible take a look at how it displays in Firefox as in comparison. Thanks.

Antechinus

Quote from: NenaGb on March 14, 2009, 09:42:57 PM
Thank you this actually moved it under both colums just above my edit/comments area so its spread across the entire bottom of the page.....is there a way to do it just under the Media
side as well?
The dreaded colspans strike again.  :P

<table border="0" cellspacing="0" cellpadding="2" width="100%">
                  <tr>
                     <td colspan="2">
                        <table width="100%">';


You want it set to colspan="1". This will restrict it to spanning one column. Rowspans and colspans can drive you nuts if you aren't aware of them.

Antechinus

Quote from: chrishicks on March 15, 2009, 03:21:29 PM
Question... Is there a way to get opacity working correctly in the profiles for IE? I tossed up a quick layout code which i found posted here in another topic and it looks fine in Firefox but absolutely horrid in IE. In IE there are large chunks of the page that doesn't even show and that's only part of the problem. I had no idea it was like this until someone pointed it out to me since I never use IE. Here is my profile page:

http://rejectsreststop.com/forum/index.php?action=profile;u=1;sa=summary (Warning.. slightly mature background??)

Can someone give me an idea how to fix the look in IE? If possible take a look at how it displays in Firefox as in comparison. Thanks.
Yes and no. You can apply various fixes to render png opacity in IE6 but they're rather nasty and can have adverse effects elsewhere. Easiest solution is to not use png opacity in your layout. Next best solution is to use customised css to call gifs instead of png's if the browser is IE6.

ETA: Just checked and you want to use css opacity. That isn't supported by IE either. Doncha just love Microsoft?

To get css opacity in IE (6 or 7) you need to apply proprietary Microsoft filters, and you need to apply a different one for IE6 and IE7, and they aren't W3 valid code. Read this. 

Really if you want that particular layout the best option would be to call a separate stylesheet to handle IE, and leave the standard stylesheet to handle the real browsers. You can hide the IE stylesheet by using IE-specific conditional comments in the <head> section of your index.template.php. If you do it this way your code will appear to be valid.

Xavi-Nena

Quote from: Antechinus on March 15, 2009, 05:04:08 PM
Quote from: NenaGb on March 14, 2009, 09:42:57 PM
Thank you this actually moved it under both colums just above my edit/comments area so its spread across the entire bottom of the page.....is there a way to do it just under the Media
side as well?
The dreaded colspans strike again.  :P

<table border="0" cellspacing="0" cellpadding="2" width="100%">
                  <tr>
                     <td colspan="2">
                        <table width="100%">';


You want it set to colspan="1". This will restrict it to spanning one column. Rowspans and colspans can drive you nuts if you aren't aware of them.


I changed it to 1 and it still shows in the same location?

Antechinus

#52
Should look at the code before giving advice then, shouldn't I? :P

Got a link to that other mod then? I'll throw it on my local since I'm messing with templates anyway.

ETA: NVM. Got it from the previous page.

Antechinus

Well ya learn something every day. Ok, do it like this:

Find and delete:

// Let's see who viewed my profile.           

if(!empty($modSettings['pv_enabled']) && $context['can_view_visitor']) {
echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="buddies">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['pv_latest_visitors'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2">
<table width="100%">';
if (!empty($context['visitor_profiles'])) {
$i = 1;
foreach ($context['visitor_profiles'] as $visitor) {
if ($i == 1)
echo ' <tr>';
echo '
<td class="windowbg" align="center" valign="bottom" style="padding:5px; width: 100px;">', $visitor['avatar']['href'] ? '<img src="' . $visitor['avatar']['href'] .'" width="50" />' : '', '<br /><b>', $visitor['link'], '</b><br /><span class="smalltext">', $visitor['time'], $context['can_delete_visitor'] ? '<br /><a href="' . $scripturl . '?action=deletevisitor;profile=' . $context['member']['id'] . ';member=' . $visitor['id'] . ';sesc=' . $context['session_id'] . '">' . $txt[31] . '</a>' : '', '</span></td>';

if ($i == 3)
echo '</tr>';

$i++;
if ($i == 4) $i = 1;
}
} else
echo ' <tr><td>', $txt['pv_no_visitors'] ,'</td></tr>';

echo '
</table>
</td>
</tr>';

echo '
</table>
</td>
</tr>
</table>
<br />';
}


Find:

<td class="windowbg">
', un_htmlspecialchars ($context['member']['options']['media']) ,'
</td>
</tr>
</table>';


Add after:

// Let's see who viewed my profile.           

if(!empty($modSettings['pv_enabled']) && $context['can_view_visitor']) {
echo '
<br/>
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="buddies">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['pv_latest_visitors'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2">
<table width="100%">';
if (!empty($context['visitor_profiles'])) {
$i = 1;
foreach ($context['visitor_profiles'] as $visitor) {
if ($i == 1)
echo ' <tr>';
echo '
<td class="windowbg" align="center" valign="bottom" style="padding:5px; width: 100px;">', $visitor['avatar']['href'] ? '<img src="' . $visitor['avatar']['href'] .'" width="50" />' : '', '<br /><b>', $visitor['link'], '</b><br /><span class="smalltext">', $visitor['time'], $context['can_delete_visitor'] ? '<br /><a href="' . $scripturl . '?action=deletevisitor;profile=' . $context['member']['id'] . ';member=' . $visitor['id'] . ';sesc=' . $context['session_id'] . '">' . $txt[31] . '</a>' : '', '</span></td>';

if ($i == 3)
echo '</tr>';

$i++;
if ($i == 4) $i = 1;
}
} else
echo ' <tr><td>', $txt['pv_no_visitors'] ,'</td></tr>';

echo '
</table>
</td>
</tr>';

echo '
</table>
</td>
</tr>
</table>
<br />';
}


This is the same as the block you deleted except there is a line break added just after the first echo.

Xavi-Nena

Quote from: JovanT on March 14, 2009, 12:09:43 PM
There are no new features. Compared to 0.8.5, UP 0.9 brought a few bug fixes (size of avatars), better language support (if you use two or more languages simultaneously) and new and improved HTML filter to prevent XSS attacks.

So in 0.8.5 there should be the option for members to make their own albums to organize their photos in? If so how do I enable this because all I see is General and no way to create an album?

Xavi-Nena

Quote from: Antechinus on March 16, 2009, 03:06:36 AM
Well ya learn something every day. Ok, do it like this:

Find and delete:

// Let's see who viewed my profile.           

if(!empty($modSettings['pv_enabled']) && $context['can_view_visitor']) {
echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="buddies">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['pv_latest_visitors'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2">
<table width="100%">';
if (!empty($context['visitor_profiles'])) {
$i = 1;
foreach ($context['visitor_profiles'] as $visitor) {
if ($i == 1)
echo ' <tr>';
echo '
<td class="windowbg" align="center" valign="bottom" style="padding:5px; width: 100px;">', $visitor['avatar']['href'] ? '<img src="' . $visitor['avatar']['href'] .'" width="50" />' : '', '<br /><b>', $visitor['link'], '</b><br /><span class="smalltext">', $visitor['time'], $context['can_delete_visitor'] ? '<br /><a href="' . $scripturl . '?action=deletevisitor;profile=' . $context['member']['id'] . ';member=' . $visitor['id'] . ';sesc=' . $context['session_id'] . '">' . $txt[31] . '</a>' : '', '</span></td>';

if ($i == 3)
echo '</tr>';

$i++;
if ($i == 4) $i = 1;
}
} else
echo ' <tr><td>', $txt['pv_no_visitors'] ,'</td></tr>';

echo '
</table>
</td>
</tr>';

echo '
</table>
</td>
</tr>
</table>
<br />';
}


Find:

<td class="windowbg">
', un_htmlspecialchars ($context['member']['options']['media']) ,'
</td>
</tr>
</table>';


Add after:

// Let's see who viewed my profile.           

if(!empty($modSettings['pv_enabled']) && $context['can_view_visitor']) {
echo '
<br/>
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="buddies">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['pv_latest_visitors'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2">
<table width="100%">';
if (!empty($context['visitor_profiles'])) {
$i = 1;
foreach ($context['visitor_profiles'] as $visitor) {
if ($i == 1)
echo ' <tr>';
echo '
<td class="windowbg" align="center" valign="bottom" style="padding:5px; width: 100px;">', $visitor['avatar']['href'] ? '<img src="' . $visitor['avatar']['href'] .'" width="50" />' : '', '<br /><b>', $visitor['link'], '</b><br /><span class="smalltext">', $visitor['time'], $context['can_delete_visitor'] ? '<br /><a href="' . $scripturl . '?action=deletevisitor;profile=' . $context['member']['id'] . ';member=' . $visitor['id'] . ';sesc=' . $context['session_id'] . '">' . $txt[31] . '</a>' : '', '</span></td>';

if ($i == 3)
echo '</tr>';

$i++;
if ($i == 4) $i = 1;
}
} else
echo ' <tr><td>', $txt['pv_no_visitors'] ,'</td></tr>';

echo '
</table>
</td>
</tr>';

echo '
</table>
</td>
</tr>
</table>
<br />';
}


This is the same as the block you deleted except there is a line break added just after the first echo.

Wonderful worked perfectly :) Thanks you as always ;)

Xavi-Nena

Quote from: NenaGb on March 16, 2009, 03:53:43 AM
Quote from: JovanT on March 14, 2009, 12:09:43 PM
There are no new features. Compared to 0.8.5, UP 0.9 brought a few bug fixes (size of avatars), better language support (if you use two or more languages simultaneously) and new and improved HTML filter to prevent XSS attacks.

So in 0.8.5 there should be the option for members to make their own albums to organize their photos in? If so how do I enable this because all I see is General and no way to create an album?

Ok sorry total brain fart moment, I see the image with the plus sign on it...I would imagine I can replace that image with an image that shows text to 'Add Albums' so my members know they can create their own images?


And also how can I list the member created albums horizontally vs. vertically?

Antechinus

ProfilePictures.template.php

Find: <table border="0" cellpadding="4" cellspacing="1" width="100%" id="albums">';
foreach ($context['albums'] as $album) {
echo '
<tr>
<td width="5%"><img src="', $settings['images_url'] ,'/board.gif" alt="" /></td>
<td><a href="', $album['url'] ,'">', $album['title'] ,'</a><br /><div class="smalltext">', $txt['profile_albums_pic_count'] ,': ', $album['pictures_count'] ,'</div></td>
</tr>';
}

echo ' </table>



Replace with: <table border="0" cellpadding="4" cellspacing="1" width="100%" id="albums"><tr>';
foreach ($context['albums'] as $album) {
echo '
<td width="5%"><img src="', $settings['images_url'] ,'/board.gif" alt="" /></td>
<td><a href="', $album['url'] ,'">', $album['title'] ,'</a><br /><div class="smalltext">', $txt['profile_albums_pic_count'] ,': ', $album['pictures_count'] ,'</div></td>';
}

echo ' </tr></table>

Xavi-Nena

#58
Still not working....

sending pm w/ log in details so you can see from my end because i dont think guests can view memberlist.
Sorry wrong topic...can you tell I need to sleep? :)



This edit works perfectly to get them  side by side YOUR AWESOME :)  Thanks again.

Antechinus

I'm getting some cool ideas out of this for hacking templates on my site.
Me gots teh styley planz. :D

Advertisement: