View Full Version : How is the link to my forum profile?
nerofix
12-06-2006, 05:44 AM
Hello,
would be nice if someone could tell me how is the link to my profile when i am logged in, because when i modified my options i need to go back to the frontpage first to click on my name in the who is online list, but i'd like to have a direct link from my profile options to view my public profile..
i guess it's like profile.php?do=
but i couldn't find something that would link me to my public profile. any chance to do this?
Dismounted
12-06-2006, 06:25 AM
To edit it or to access it?
To edit it, the link is profile.php?do=editprofile
To access it, the link is member.php?u={userid}
evenmonkeys
12-06-2006, 07:23 AM
If you did not know already, and I just realized this a couple weeks ago (bah!), there is a "My Profile" link under Quick Links on your navbar. It may not be the option you're looking for, but for those who don't like modifying anything, there ya go. =D
nerofix
12-06-2006, 07:41 AM
To access it, the link is member.php?u={userid}
Thanks, this is after what i was looking for, i just tried it with the wrong php-file o_O .. my link is now: member.php?u=$bbuserinfo[userid]
have a nice day!
evenmonkeys
12-06-2006, 07:50 AM
In USERCP_SHELL
Find:<tr>
<td class="thead">$vbphrase[settings_and_options]</td>
</tr>
Add Below: <tr>
<td class="alt2" nowrap="nowrap"><a class="smallfont" href="member.php?u=$bbuserinfo[userid]">View My Profile</a></td>
</tr>
Or place it wherever you want. This just seems most convenient.
nerofix
12-06-2006, 08:17 AM
thx yarub, maybe you can give me a hint, the thing is that i want use beside of the "View my profile"-link the current avatar of this user if he or she got an avatar selected.
i tried $currentavatar, but it doesnt shows up, althought i got an avatar selected. you know how to fix?
evenmonkeys
12-06-2006, 08:30 AM
Are you talking about something like this?
Modification: https://vborg.vbsupport.ru/showthread.php?t=112594
Screenshot: https://vborg.vbsupport.ru/attachment.php?attachmentid=45430&d=1144624922
I don't completely understand what you're after. >_<; If it is something like that, maybe it'd help give me some incentive to start working on the 3.6.x version. =D
nerofix
12-06-2006, 09:09 AM
yes, like the upper left avatar-picture in this screenshot.
once i had your modification installed, but it didn't work with our advanced memberprofile together, there is html allowed and a member's profile can be very large for putting it directly into the usercp, so i had to uninstall the mod again. that's why i was just looking for a simple link + avatar because every preview of a custom html member profile within the usercp would be too large.
check my profile (http://forum.gamesserver.net/members/nerofix) to see it's too large to put it into the cp.
i also tried to put this code into my USERCP template, but no avatar shows up.
<tr valign="top">
<td>
<img src="$bbuserinfo[avatarurl]" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>
</tr>
I think i have to add more code somewhere else to get this working, perhaps in the plugin-system, but i am new to this.
evenmonkeys
12-06-2006, 09:11 AM
You will need a plugin in order for the avatar to show up. Give me a few minutes and I'll try to make something for you.
nerofix
12-06-2006, 09:16 AM
hey thanks would be nice of you! Yarub's New UserCP Look Lite Edition .. xD
evenmonkeys
12-06-2006, 09:43 AM
Bah. I tried to make a product out of it, but I just couldn't get it to work right.
Install the attached plugin first. Then make this template edit. You may edit it as you like...
In USERCP, add this at the very top:<!-- ############## AVATAR / SIGNATURE ############## -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">
$bbuserinfo[username]</span>
</td>
</tr>
<tr>
<td class="thead">
Avatar
</td>
</tr>
<tr>
<td class="alt2">
<img src="$bbuserinfo[avatarurl]" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" />
</td>
</tr>
<tr>
<td class="thead">
Signature
</td>
</tr>
<tr>
<td class="alt2">
$bbuserinfo[signature]
</td>
</tr>
</table>
<br />
<!-- ############## END AVATAR / SIGNATURE ############## -->
I'm off to bed though. I need to get some sleep for work tomorrow. =D If that doesn't work for ya, I can help ya first thing tomorrow afternoon. Hopefully you can wing it from there.
nerofix
12-06-2006, 09:53 AM
i'm getting a database error while i am importing the plugin:
Invalid SQL:
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO vb_plugin
(`active`, `executionorder`, `product`, `title`, `hookname`, `phpcode`)
VALUES
('1', '5', 'vbulletin', 'Avatar & Signature', 'usercp_start', '// AVATAR\r\n$avatarurl = fetch_avatar_url($vbulletin->userinfo[\'userid\']);\r\n\r\nif ($avatarurl == \'\' OR !$vbulletin->options[\'avatarenabled\'])\r\n{\r\n $show[\'avatar\'] = false;\r\n}\r\nelse\r\n{\r\n $show[\'avatar\'] = true;\r\n $vbulletin->userinfo[\'avatarsize\'] = $avatarurl[1];\r\n $vbulletin->userinfo[\'avatarurl\'] = $avatarurl[0];\r\n}\r\n\r\n// ****************************************\r\n// SIGNATURE\r\nif ($vbulletin->userinfo[\'signature\'])\r\n{\r\n require_once(DIR . \'/includes/class_bbcode.php\');\r\n $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());\r\n $vbulletin->userinfo[\'signature\'] = $bbcode_parser->parse($vbulletin->userinfo[\'signature\'], 0, true);\r\n\r\n $show[\'signature\'] = true;\r\n}\r\nelse\r\n{\r\n $show[\'signature\'] = false;\r\n}');
MySQL-Error : Unknown column 'executionorder' in 'field list'
evenmonkeys
12-06-2006, 09:55 AM
Try this new attached plugin. If the attached plugin does not work, try creating a plugin.
Plugins & Products > Add New Plugin
Product: vBulletin
Hook Location: usercp_start
Title: Avatar & Signature
Execution Order: 5
PHP Code:// AVATAR
$avatarurl = fetch_avatar_url($vbulletin->userinfo['userid']);
if ($avatarurl == '' OR !$vbulletin->options['avatarenabled'])
{
$show['avatar'] = false;
}
else
{
$show['avatar'] = true;
$vbulletin->userinfo['avatarsize'] = $avatarurl[1];
$vbulletin->userinfo['avatarurl'] = $avatarurl[0];
}
// ****************************************
// SIGNATURE
if ($vbulletin->userinfo['signature'])
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$vbulletin->userinfo['signature'] = $bbcode_parser->parse($vbulletin->userinfo['signature'], 0, true);
$show['signature'] = true;
}
else
{
$show['signature'] = false;
}Active: Yes
Alas, I am off to bed now though. If you still have problems, hopefully someone else can help you out until I get on tomorrow. I really hope that one works for ya. =D Goodnight and best of luck!
nerofix
12-06-2006, 10:05 AM
hey your second plugin works great .. thanks for your advanced help!!! :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.