Topic: Displaying forum name in topic <TITLE>

Just if anyone is interested, not really a mod per se.

When PunBB generates page titles for topic posts within a specific forum, the page <TITLE> tag generated by viewtopic.php reads something like:

BOARD TITLE / TOPIC SUBJECT

This is good, but it would be better if viewtopic.php by default also showed in the page <TITLE> the forum name, as well as the topic subject, like so:

BOARD TITLE / FORUM NAME / TOPIC SUBJECT

eg so one would see:

MY CHEESE FORUM / DANISH CHEESES / HAVARTI SUPPLY PROBLEMS

instead of the present default <TITLE> of the topic post, which would be

MY CHEESE FORUM / HAVARTI SUPPLY PROBLEMS

This matches up with the breadcrumb navigation links, and may also help a tiny bit in SEO.

If you want to do this, amend line 163 in viewtopic.php from this:

$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_topic['subject']);

to this:

$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_topic['forum_name'].' / '.$cur_topic['subject']);

Re: Displaying forum name in topic <TITLE>

Sounds like a nice addition to wiki.punres.org to me.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: Displaying forum name in topic <TITLE>

I just added this. No doubt it will make a difference. Cheers.