The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Parsing values in phrases
How do you parse values in phrases? I'd like to get the userid. In the phrase searchnoresults When doing a finduser if there are no results I added in the phrase to go somewhere else but I can't get the userid
PHP Code:
|
#2
|
||||
|
||||
Not quite sure if I understand what you're trying to do. Want to add a variable to a phrase which will be parsed and replaced with a userid?
You could use for example sprintf() PHP Code:
|
#3
|
|||
|
|||
Quote:
what do i put in phrase? |
#4
|
||||
|
||||
%d - This will be replaced with the second argument of the sprintf() function. (If numeric in this case)
http://us2.php.net/manual/en/function.sprintf.php |
#5
|
|||
|
|||
Well thank you but that does not work. I tried many options.
Basically what I want to do is when someone does a search to find all posts by a user, I altered the searchnoresults phrase with a link to redirect them somewhere else. So one thing I tried to simplify it was PHP Code:
I also tried {%d} and {1} |
#6
|
||||
|
||||
Okay, I get you now. Try this.
PHP Code:
Example. PHP Code:
|
#7
|
|||
|
|||
Thanks again... but that does not work.
I also tried to put $vbphrase PHP Code:
|
#8
|
||||
|
||||
You have to define the vriable userid first.
PHP Code:
|
#9
|
|||
|
|||
It is defined
|
#10
|
||||
|
||||
Weird. This is how I tested it.
PHP Code:
Code:
Sorry - no matches. Please try some different terms. {1} Is the source in the clean_array_gpc() function set right? (First argument) g = $_GET p = $_POST r = $_REQUEST |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|