vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Userid Link (https://vborg.vbsupport.ru/showthread.php?t=149937)

stonner 06-17-2007 04:47 PM

Userid Link
 
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:

Quote:

<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;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:

Quote:

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

Code:

<if condition="$post['userid'] = $post['userid'] * 2">$post[userid]</if>


All times are GMT. The time now is 03:07 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01023 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete