I'm wanting to make a change in the template -- specifically the page title shown in the
<title></title> tags.
$thread[title] is part of the title.
What I'm attempting to do is capitalize each word using
ucwords(), but adding PHP into the
<title> doesn't work.
I thought adding a quick plugin would solve this, and I could instead call up the alternate variable (
$captitle) in the
<title>.
Before adding
ucwords(), I thought I'd try a simple swap, using a new plugin with this code:
Code:
$captitle = $thread['title'];
The title ends up removed.
I tried it on both the global_start and showthread_start -- no effect.
I asked this question in an existing (unanswered) thread at vBulletin.com, but this was the response:
Quote:
If you want to use $captitle in the template, then you will need to first register the variable for use in the template. The best place to be asking for help with this is over on vbulletin.org, the modification site.
|
I read this post:
https://vborg.vbsupport.ru/showthrea...74#post1524774
Quote:
Originally Posted by Opserty
Create a Plugin (AdminCP > Plugins & Products > Add New Plugin) with the PHP code:
PHP Code:
eval('$customvar = "'. fetch_template('customtemplate') .'";');
Choose an appropriate hook location like global_start or something.
Then use $customvar where you want.
|
But not sure I understand what goes where.
So ... what am I missing here? :erm: