View Full Version : Userid Link
stonner
06-17-2007, 04:47 PM
Hi,
When you click on a username (for example in a post), the link is https://vborg.vbsupport.ru/member.php?u=145764
but I'd like to change that link to:
https://vborg.vbsupport.ru/member.php?u=$userid+2
i.e. i would like to change the variable $userid = $userid+2
how would i have to do this?
thank you!
Dismounted
06-18-2007, 06:26 AM
Look near the bottom of the postbit (or postbit_legacy) for the code.
stonner
06-18-2007, 06:27 AM
i found the code.
i dont know how to change the code.
$userid=$userid+2 doesn't work.
Dismounted
06-18-2007, 06:40 AM
Replace $post[userid] with <if condition="$post['userid'] = $post['userid'] + 2">$post['userid']</if>
stonner
06-18-2007, 09:44 AM
I think there is a misunderstanding. sorry for my bad explanations.
When you click on a username you are redirected to for example:
https://vborg.vbsupport.ru/member.php?u=100
but I want that the link is:
https://vborg.vbsupport.ru/member.php?u=200 (i.e. two times userid)
-------------------------------------------------
When you click on a username you are redirected to for example:
https://vborg.vbsupport.ru/member.php?u=150
but I want that the link is:
https://vborg.vbsupport.ru/member.php?u=300 (i.e. two times userid)
How do i do that?
thank you again!
Dismounted
06-18-2007, 11:28 AM
Oh, then replace + 2 with * 2.
stonner
06-18-2007, 12:45 PM
in the template postbit i have now:
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&u=<if condition="$post['userid'] = $post['userid'] * 2">$post['userid']</if>" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
but i cannot save it. i get the error message:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/stonner/public_html/forum/includes/adminfunctions_template.php(3596) : eval()'d code on line 232
Dismounted
06-19-2007, 07:25 AM
<if condition="$post['userid'] = $post['userid'] * 2">$post[userid]</if>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.