The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
i want to make a variation of the all_ times_ are_ gmt_ x_ time_ now_ is_ y variable, one that doesnt list the "all times are" part and just displays the time. when i copy the original phrase to a new one just to test and then call to it from BELOW the forum table it works just fine. however, when i put the phrase ABOVE the table, i get this:
All times are GMT%1$s. The time now is %2$s. what am i doing wrong? do i need some certain code in the top portion of the page? thanks! |
#2
|
||||
|
||||
![]()
Probably the time variables are not parsed at that time. The part of the code in the page that spits out the time is done later than when you are calling that phrase. So, you would need to add a plugin to spit out the time at an earlier point. That is my guess anyway.
|
#3
|
|||
|
|||
![]()
i thought that too, but then i tested the original phrase from the same early point and it works just fine. is the timestamp somehow locked to the phrase?
|
#4
|
||||
|
||||
![]()
Are you calling the phrase correctly? You need to pass any variable to it, just like in the original call you are trying to copy.
|
#5
|
|||
|
|||
![]()
my custom phrase is named "time_is_now" and its text is set to:
All times are GMT{1}. The time now is <span class="time">{2}</span>. i'm calling it in the FORUMHOME template like so: $vbphrase[time_is_now] which is exactly how the original phrase is called later down the page. and again, if i use the original phrase in this new location, calling it the same way, it works fine. i'm baffled. |
#6
|
||||
|
||||
![]()
You need to call the phrase parser and use the variables to fill in the gaps.
Code:
<phrase 1="$fill_me_1" 2="$fill_me_2">$vbphrase[time_is_now]</phrase> |
#7
|
|||
|
|||
![]()
weird. i just tried that and now the output is:
All times are GMT. The time now is . where are getting the $fill_me_1 and $fill_me_2 variables from? or do i need to do something with those? |
#8
|
||||
|
||||
![]()
Do a search in your files for "all_times_are_gmt_x_time_now_is_y" and you will see that it is parsed in the functions.php file, around line 4921. So, you need to do something similar for your own variable.
Line 4921: PHP Code:
|
#9
|
|||
|
|||
![]()
ah HA! that worked perfectly lynne. thanks for your time and patience!
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|