Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

Parent name in child board page title

Aloittaja Robster, maaliskuu 07, 2014, 05:37:11 AP

« edellinen - seuraava »

Robster

I've started using child boards on my forum, and noticed that only the name of the child board is in the HTML page title.

I would like to change it so that it matches the breadcrumb trail ie: <title>Site Name - Parent Name - Child Name</title>

What's the easiest/cleanest way to do this?

margarett

It needs some custom coding, I can try to peek later today.

I'm moving this to Coding ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

So, here it goes.

Sources/MessageIndex.php
Find:
// 'Print' the header and board info.
$context['page_title'] = strip_tags($board_info['name']);

Replace with:
//A trick to show forum name + all board structure in window title :)
$w_title = $context['forum_name_html_safe'];
foreach ($context['linktree'] as $key => $value)
if (strpos($value['url'], 'index.php?board=') !== false)
$w_title .= ' - ' . $value['name'];
// 'Print' the header and board info.
$context['page_title'] = strip_tags($w_title);
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Robster


Advertisement: