PDA

View Full Version : Slight code hicup



ChemicalKicks
06-11-2011, 09:49 AM
When removing the vBulletin branding and searching for the following in bold, look at the double closing bracket at the end in red.

<title> {vb:rawphrase x_powered_by_vbulletin,{vb:raw vboptions.bbtitle}}

It's easy to fix so just thought I would highlight it.

KW802
06-11-2011, 10:22 AM
When removing the vBulletin branding and searching for the following in bold, look at the double closing bracket at the end in red.

<title> {vb:rawphrase x_powered_by_vbulletin,{vb:raw vboptions.bbtitle}}

It's easy to fix so just thought I would highlight it.
You had me going there for a minute! :p That is actually not a mistake since there are two variables, x_powered_by_vbulletin & vboptions.bbtitle.

To clarify, when a template invokes the phrase x_powered_by_vbulletin it needs to pass in a text value that should be shown. It does like this...
{vb:rawphrase x_powered_by_vbulletin, MY TEXT}
The above will result in "MY TEXT - powered by vBulletin" as the page title. Normally the vB forum title is used and that phrase name in templates is the vboptions.bbtitle phrase. Since that itself is a phrase it is inclosed with brackets. So to pass in the vB forum title to the page title phrase it done by putting one phrase inside of the another...
{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}
To hightlight it, I changed the colors below to make it stand out a bit more.. The purple phrase is being passed into the red phrase so the final bracket is red.

{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle} }

Our Sponsors
 

ChemicalKicks
06-11-2011, 11:55 AM
Ah that makes sense. It was easy for me to fix anyway. I just deleted tge extra bracket :)

imported_Mark.B
06-12-2011, 09:07 AM
Er, yes, but now you need to put it back, it's supposed to be there....

You're likely to get an error somewhere if you don't.

Our Sponsors
 

ChemicalKicks
06-12-2011, 09:30 AM
Nah everything is working fine. If you leave it in you end up with a "}" in your page title. Do you know any other way to get rid of that without just deleting it?

EDIT: Try it yourself.

imported_Mark.B
06-13-2011, 06:10 AM
There's another error in your code then, since that syntax is correct.

imported_Mark.B
06-13-2011, 06:12 AM
My V3ARCADE_MAIN template looks like this:


<title>{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}} - {vb:raw vboptions.arcadename}
<vb:if condition="$categoryid != -1"> - {vb:raw categoryname}</vb:if></title>

ChemicalKicks
06-13-2011, 09:40 AM
I'll dig up mine, two ticks.

ChemicalKicks
06-13-2011, 09:57 AM
This is from the v3ARCADE_MAIN template


<title> {vb:raw vboptions.bbtitle} - {vb:raw vboptions.arcadename}<vb:if condition="$categoryid != -1"> - {vb:raw categoryname}</vb:if></title>

What your suggesting I dois have it look like the following? :)


<title> {vb:raw vboptions.bbtitle} - {vb:raw vboptions.arcadename}}<vb:if condition="$categoryid != -1"> - {vb:raw categoryname}</vb:if></title>

If I do that though I have a random bracket in my page title dude.

imported_Mark.B
06-13-2011, 10:33 AM
That's different code, you haven't got the phrase code in there.

ChemicalKicks
06-13-2011, 10:46 AM
That's the code I'm using in my title, I'be removed all branding from my site, both vBulletin and v3. Are we talking about two different things?

KW802
06-13-2011, 12:08 PM
Guys, I think what is going on is that ChemicalKicks is removing his vBulletin branding so he started off with...
{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle} }
... and removed the "powered by vBulletin" phrase which left him with...
{vb:raw vboptions.bbtitle} }
... which would have left him with an extra curly closing bracket at the end. ;)

ChemicalKicks
06-13-2011, 12:26 PM
Thank you Kevin