Previous Thread
Next Thread
Print Thread
Hop To
#266144 08/01/2024 5:22 PM
Joined: Aug 2024
Posts: 16
Likes: 2
Stranger
Stranger
Joined: Aug 2024
Posts: 16
Likes: 2
I'm trying to adjust header.tpl to display the subforum title (in addition to the topic) as part of the HTML <title> tag. It seems $forumTitle should do the trick (I see it defined in html.inc.php) but a null value gets displayed. Is there another string I can use?

BONUS Question:
I added
Code
<meta name="description" content="' . $ogDescription . '" />
to html.inc.php in order to define a meta description. Is there a way to move that functionality to header.tpl instead?

Last edited by toner; 08/01/2024 5:28 PM.

[Linked Image from web.atcomsystems.ca]
Looking for a VoIP Phone Canada provider? Put Atcom's valuable VoIP expertise to work for your business today!
toner #266145 08/02/2024 4:13 AM
Joined: Jun 2006
Posts: 16,370
Likes: 126
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,370
Likes: 126
We cannot provide support for sites not strictly using the stock code, and we only loosely do so at UBBDev, mod your forums at your own risk.

You should probably adjust titles through the script files (posts are served through /scripts/showflat.inc.php, thread index is served through /scripts/postlist.inc.php) versus the templates; a lot of thought went into max lengths of the title element through various search engines via what is served by default for SEO exposure.

Originally Posted by toner
BONUS Question:
I added
Code
<meta name="description" content="' . $ogDescription . '" />
to html.inc.php in order to define a meta description. Is there a way to move that functionality to header.tpl instead?
Only the thread view pages generate the description tag, unless you define a description for the forum pages (each forum has its own set of headers in the manage forum pages) CP -> Content -> Forums -> Details -> Custom Inserts tab -> "Use a Unique Header/Footer for this forum"


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
toner #266146 08/02/2024 1:57 PM
Joined: Aug 2024
Posts: 16
Likes: 2
Stranger
Stranger
Joined: Aug 2024
Posts: 16
Likes: 2
Thanks - I sent you an email directly. I had thought the intention with .tpl files was that we could modify them without breaking future updates too much?

As for the meta description, this gets built automatically:
<meta property="og:description" content="I have a possible new client

However, SEO folks all say this is super important:
<meta name="description" content="I have a possible new client

Hence the need for modification...


[Linked Image from web.atcomsystems.ca]
Looking for a VoIP Phone Canada provider? Put Atcom's valuable VoIP expertise to work for your business today!
toner #266147 08/03/2024 3:16 PM
Joined: Dec 2003
Posts: 6,633
Likes: 85
Joined: Dec 2003
Posts: 6,633
Likes: 85
Why not just use the html included in th cp


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
toner #266148 08/03/2024 10:45 PM
Joined: Aug 2024
Posts: 16
Likes: 2
Stranger
Stranger
Joined: Aug 2024
Posts: 16
Likes: 2
I thought using the HTML Include would cause the <title> tag to get generated twice, no? Also, what string could I use in there to insert the subforum title for the topic? Not to mention the same header would get generated for non-post pages... Maybe I'm missing something here?


[Linked Image from web.atcomsystems.ca]
Looking for a VoIP Phone Canada provider? Put Atcom's valuable VoIP expertise to work for your business today!
toner #266232 09/02/2024 11:47 AM
Joined: Aug 2024
Posts: 16
Likes: 2
Stranger
Stranger
Joined: Aug 2024
Posts: 16
Likes: 2
To bring this back up, I don't know why adjusting

<title>{if $inputTitle}{$inputTitle|strip_tags}{/if}{if $powered} - {$powered}{else} - {$config.COMMUNITY_TITLE}{/if}</title>
to
<title>{if $inputTitle}{$inputTitle|strip_tags}{/if}{if $powered} - {$powered}{else} - {$forumTitle|strip_tags}{/if}</title>
in the header.tpl template doesn't cause our HTML <title> to show the topic (dash) forum title.

I'm guessing the string $forumTitle isn't available to the template when it runs. Is there another string that would accomplish the same thing?


[Linked Image from web.atcomsystems.ca]
Looking for a VoIP Phone Canada provider? Put Atcom's valuable VoIP expertise to work for your business today!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
online table full
by ehill - 01/13/2025 9:23 AM
Newest Members box
by SenecaFlyer - 12/15/2024 3:35 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 7:50 AM
Another error
by Baldeagle - 10/07/2024 8:08 PM
Upgrade to version 8.0 fails
by Baldeagle - 08/31/2024 11:36 PM
Who's Online Now
1 members (Gizmo), 333 guests, and 146 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)