PDA

View Full Version : Where is the <title> tag being built from?


KW802
10-08-2004, 02:10 PM
I just noticed today that the <title> tag in the CMPS portal page is using a different value from the forums. I've modified my "x_powered_by_vbulletin" phrase so that I get a custom title when viewing the forums but how I do I get about getting it so also show up on the CMPS pages?

Thanks,
Kevin

Brian
10-08-2004, 02:19 PM
Admin CP => vBulletin Options => Site Name / URL / Contact Details => Homepage Name

Our Sponsors
 

KW802
10-08-2004, 02:34 PM
Admin CP => vBulletin Options => Site Name / URL / Contact Details => Homepage Name
I'm scratching my head on this one so bear with me a minute..... :p

Since the CMPS is using the VB setttings wouldn't it then by default use the same phrase for the title when it builds the page? Or is there some kind of logic in the VB code that says to use the phrase only when the current script is one of the VB scripts?

Brian
10-08-2004, 02:48 PM
I'm not sure I follow you... The CMPS just gets it's title from your 'Homepage Name' setting though.

Our Sponsors
 

KW802
10-08-2004, 06:18 PM
I'm not sure I follow you... The CMPS just gets it's title from your 'Homepage Name' setting though.
When in the forums the title tag is obtained from a phrase named "x_powered_by_vbulletin" which is different from the $vboptions[hometitle] variable. By modifying the value of the phrase "x_powered_by_vbulletin" the title can tag can be changed in the forums without having to change either the hometitle or bbtitle names in the ACP. Since the CMPS is using the same shell as VB I was assuming that the title tag would also then be driven from the phrase "x_powered_by_vbulletin" instead of $vboptions[hometitle] so I'm trying to see where/how does the code know which one to use at which point.

To give a better understanding: My hometitle is "Cool SciFi" and that is what appears in the footer, etcetra. My bbtitle is "Cool SciFi Forums" and that is what appears in the navigation bar, etcetra. My phrase "x_powered_by_vbulletin" has been changed to "{1} - An online community for all Sci-Fi fans!" and that is what the title gets changed to when viewing the forums. When viewing the CMPS pages, though, the title is just "Cool SciFi".

:o

Brian
10-08-2004, 11:06 PM
The forums still use the 'Forum Name' option rather than the 'Homepage Name' option, it's just a part of that setting so it should be "Forum Name - Powered by vBulletin". If you want the homepage to have the same name you could edit the 'adv_portal' template and add the text, or just use the same 'x_powered_by_vbulletin' phrase.

KW802
10-09-2004, 09:17 AM
The forums still use the 'Forum Name' option rather than the 'Homepage Name' option, it's just a part of that setting so it should be "Forum Name - Powered by vBulletin". If you want the homepage to have the same name you could edit the 'adv_portal' template and add the text, or just use the same 'x_powered_by_vbulletin' phrase.D'oh! I smack myeslf on the head for not browsing the templates first! For some reason I assumed it was being done in code. :p

The title in FORUMHOME is....<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
Any thoughts on why the same command would cause a problem in ADV_PORTAL? The desired result would be to use hometitle in there but it doesn't make a difference, the phrase is coming back blank.

Thanks,
Kevin

Brian
10-09-2004, 05:08 PM
There shouldn't be any reason why that wouldn't work...

KW802
10-09-2004, 10:36 PM
There shouldn't be any reason why that wouldn't work...
To help rule out whether I'm just having an off-week, would you mind trying it on one of your test sites to see if I'm cracking up or not? :D

Brian
10-10-2004, 09:41 AM
Just tryied it on my localhost and you're cracking up. :p

Can you post the contents of your 'adv_portal' template?

KW802
10-10-2004, 10:00 AM
Just tryied it on my localhost and you're cracking up. :p

Can you post the contents of your 'adv_portal' template?
Shoot! The SO said I was cracking up but I didn't believe her. :(

Here's my adv_portal contents.... $stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title><phrase 1="$vboptions[hometitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>

$headinclude

</head>
<body>

$header

$navbar

<table align="center" class="page" cellspacing="0" cellpadding="0"width="100%">
<tr valign="top">

<if condition="$show['left_column']">

<td width="$vba_options[portal_leftcolwidth]">

$home[leftblocks]

</td>

<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->

</if>


<if condition="$show['center_column']">
<td valign="top">

$home[centerblocks]

</td>
</if>


<if condition="$show['right_column']">

<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->

<td valign="top" width="$vba_options[portal_rightcolwidth]">

$home[rightblocks]

</td>
</if>

</tr>
</table>

$footer

</body>
</html>

You can see it in action at http://www.coolscifi.com versus http://www.coolscifi.com/forums.

Brian
10-10-2004, 10:22 AM
Hmm... Try searching for your 'x_powered_by_vbulletin' phrase and make sure it's in your 'GLOBAL' phrase group.

KW802
10-10-2004, 10:59 AM
Hmm... Try searching for your 'x_powered_by_vbulletin' phrase and make sure it's in your 'GLOBAL' phrase group.
Screen shot attached. :o

da prez
10-11-2004, 08:51 PM
why don't you just take out the phrase altogther ?

remove
<phrase 1="$vboptions[hometitle]">$vbphrase[x_powered_by_vbulletin]</phrase>
from the template and just put the text you want, that is what i did, and it works fine.

i.e.
<title>Cool Sci-Fi.com An online community for all Sci-Fi fans</title>

KW802
10-11-2004, 09:03 PM
why don't you just take out the phrase altogther ?
Because then it'd defeat the purpose of it. By using the phrase instead of a hard-coded value I'd be able to instantly change the title value in vBa CMPS, vBa Links, the vB forums, and anything else that I add on later (like vBa Gallery) without having to change the templates.

da prez
10-11-2004, 09:07 PM
fair enough,
but it could be changed now :D

KW802
10-11-2004, 10:46 PM
fair enough,
but it could be changed now :D
The real issue is why it doesn't work. Brian's already confirmed that it worked on his test site so that means it's either something unique to my site or to how I edited the phrase. I haven't had time to experiment yet but I want to find out what the issue is in case it comes up again in the future with other hacks & phrases. In the back of my head I keep wondering about the fact that I'm doing mine as a language translation. Hopefully this weekend will let me experiment some.

Brian
10-12-2004, 11:34 AM
Very strange... If you'd like to submit a support ticket I'll be glad to take a look and see if I can figure out what the problem is.

KW802
10-12-2004, 11:43 AM
Very strange... If you'd like to submit a support ticket I'll be glad to take a look and see if I can figure out what the problem is.
Thanks, but I'm holding off for a bit doing that until I have a chance to experiment a little bit first. Considering how much support you already give for a free product in the forums I don't like hitting you up directly for help unless I'm at the 'bang my head on the desk' stage of the problem. :D