MyBB Community Forums

Full Version: Controlling the <TITLE> tags (changing the forum name in them)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having a difficult time with the templates (probably because I'm making it harder than it really is).

The HTML <title></title> tag for most of the pages on my forums looks like this...

[FORUM NAME] - [CATEGORY] (for category pages)
or
[POST TITLE] (for post pages)

What would I change in order to get the FORUM NAME separated by a pipe at the end of all the titles? So it would look like this...

[CATEGORY] | [FORUM NAME]
and
[POST TITLE] | [FORUM NAME]

Basically I want a pipe and the forum name to appear at the end of all the titles.
Categories

1. Admin CP > Templates & Style > Templates > Your Template Set > Forum Display Templates > forumdisplay.

2. Find:

<title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>

3. Replace with:

<title>{$foruminfo['name']} | {$mybb->settings['bbname']}</title>

Post titles (assuming you mean thread titles)

1. Admin CP > Templates & Style > Templates > Your Template Set > Show Thread Templates > showthread.

2. Find:

<title>{$thread['subject']}</title>

3. Replace with:

<title>{$thread['subject']} | {$mybb->settings['bbname']}</title>
You will need to alter the templates for forumdisplay and showthread pages. Open up 'forumdisplay' template and change the title to:
<title>{$foruminfo['name']} | {$mybb->settings['bbname']}</title>

And in template 'showthread':
<title>{$thread['subject']} | {$mybb->settings['bbname']}</title>

[EDIT]
faviouz was first Smile
You guys rock! It works perfectly.

BTW, do the developers know there's an extra space before the closing title tag in the default forumdisplay template?

<title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>
Yes, there is.
You can report it in the dev site, but it's not really a big issue because spaces don't show in the title. Toungue
<title>{$thread['subject']} - {$foruminfo['name']}</title>

i edit in showthread but at ne dont show forumino :/
That variable won't work there. Use this instead:

<title>{$thread['subject']} - {$forum['name']}</title>
thx works great
how to replace bbname to Homepage name ??