The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
help with phrases.. what are {1} ??
Code:
There have been <b>{1}</b> post{7} and <b>{2}</b> thread{8} since your last visit at {3}. What are these things? I'm new to coding in VB 3.5.x and have been out of the loop for several years. |
#2
|
|||
|
|||
It's a wrapper for the sprintf function, basically those are the inputted variables that are inserted into the phrase. The number inside the {} is based on the order of the parameters of the vbphrase function. (Which I can't remember off the top of my head)
construct_phrase() maybe... |
#3
|
|||
|
|||
and where can I find these sprintf functions? Where can they be edited?
Also, why aren't they showing up on a non-VB page when everything else VB related does. I can call for templates and phrases, but these wrappers don't work. |
#4
|
|||
|
|||
Here is the info:
Quote:
|
#5
|
|||
|
|||
Thanks!
For people ever having the same issues this is the fix. Code:
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase> That would be what is filled into {1} and so on. --------------- Added [DATE]1198292190[/DATE] at [TIME]1198292190[/TIME] --------------- Well, it seems some work and some don't. Can anyone shed light as to why the second group of wrappers aren't working? PHP Code:
But the second group of stats aren't working. $totalposts, etc. I have installed the "Welcome Panel Rewrite" hack and the stats work on the index.php, but on my own custom page, they numbers aren't showing up, just the text. |
#6
|
|||
|
|||
The are not working because they only have scope within the plugins of the Member Rewrite modifications. You are either going to have to duplicate code or create your own variation of it.
|
#7
|
|||
|
|||
The hack doesn't modify PHP files or templates though. So how is it that it will work in index.php, but not my page?
What needs to be called to allows those phrases to work? --------------- Added [DATE]1198300451[/DATE] at [TIME]1198300451[/TIME] --------------- Also, it can't be the hack, because there is a built in vbulletin variable for total number of members registered. $numbermembers However, even when I call that it still isn't working. |
#8
|
|||
|
|||
Okay, even it they are default vBulletin variables, they are out of scope with your custom script.
|
#9
|
|||
|
|||
correct
Here is the solution for anyone searching. PHP Code:
Also include this: PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|