Switch Order of Page Titles - Posted (5357 Views)
Senior Member
bobby131313
Posts: 1163
1163
Tested only on version 3.04.05.
Since the page title is still very important in SEO and most search engines only look at the first 60-65 characters I decided to switch the order of my page titles for forums and topics.
Default setup is Forum Name (set in admin panel) then either the Topic Title or the Forum Title depending on the page. So if you have a long forum name and a long Topic Title or Forum Title, part of the Topic Title or Forum Title will be cut off in the page title (as far as SE's go). I would rather have the forum name cut off on the long ones. Your opinion may vary.
So here's how to change it....
Open inc_func_common.asp...
To change Topic Page Titles
Find:

Code:
Code:

					if intShowTopicTitle = 1 then strTempTopicTitle = " - " & chkString(ttopics("T_SUBJECT"),"display")
set ttopics = nothing
strNewTitle = strForumTitle & strTempTopicTitle


Replace it with:

Code:
Code:

					if intShowTopicTitle = 1 then strTempTopicTitle = chkString(ttopics("T_SUBJECT"),"display") & " - "
set ttopics = nothing
strNewTitle = strTempTopicTitle & strForumTitle

To change Forum Page Titles
Find:

Code:
Code:

					strNewTitle = strForumTitle & " - " & strTempForumTitle

Replace it with:

Code:
Code:

					strNewTitle = strTempForumTitle & " - " & strForumTitle

Very simple, always make backups!
<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Advanced Member
Etymon
Posts: 2396
2396
Thank you! smile<
Posted
Senior Member
bobby131313
Posts: 1163
1163


You're welcome.wink
My first mod, simple though it may be. clown
<
Posted
Advanced Member
Etymon
Posts: 2396
2396
Gotta take the plunge at some point. bigsmile<
Posted
Junior Member
Lon2
Posts: 151
151
Thank you for the code, bobby! [^]
Now if I can only figure out how to add page numbers to the Title Tag...<
Posted
Senior Member
leatherlips
Posts: 1838
1838
Posted
Senior Member
leatherlips
Posts: 1838
1838
I also like how it shows the name of the topic on the tab of the browser as well as the button in the taskbar (windows) if the page is minimized. smile
Posted
Senior Member
leatherlips
Posts: 1838
1838
I took mine a little further and changed the other forum pages too. If interested you can do this:

In inc_func_common.asp (3.4.06) look for:

Code:

      Case "members.asp"
strNewTitle = strForumTitle & " - Members"
Case "active.asp"
strNewTitle = strForumTitle & " - Active Topics"
Case "faq.asp"
strNewTitle = strForumTitle & " - Frequently Asked Questions"
Case "search.asp"
strNewTitle = strForumTitle & " - Search"
Case "pop_profile.asp"
if request.querystring("mode") = "display" then
strNewTitle = strForumTitle & " - View Profile"
elseif request.querystring("mode") = "edit" then
strNewTitle = strForumTitle & " - Edit Profile"
else
strNewTitle = strForumTitle & " - Profile"
end if
Case "register.asp"
strNewTitle = strForumTitle & " - User Agreement and Registration"
And replace it with this:

Code:

      Case "members.asp"
strNewTitle = "Members - " & strForumTitle
Case "active.asp"
strNewTitle = "Active Topics - " & strForumTitle
Case "faq.asp"
strNewTitle = "Frequently Asked Questions - " & strForumTitle
Case "search.asp"
strNewTitle = "Search - " & strForumTitle
Case "pop_profile.asp"
if request.querystring("mode") = "display" then
strNewTitle = "View Profile - " & strForumTitle
elseif request.querystring("mode") = "edit" then
strNewTitle = "Edit Profile - " & strForumTitle
else
strNewTitle = "Profile - " & strForumTitle
end if
Case "register.asp"
strNewTitle = "User Agreement and Registration - " strForumTitle
Posted
Senior Member
leatherlips
Posts: 1838
1838
I'm not sure if it has anything to do with this mod, but I just noticed that if you click to go to the last thread of a reply, it shows the id number twice in the browser title and tab:


What needs to be changed to remove that?
Posted
Senior Member
leatherlips
Posts: 1838
1838
Now I am getting the reply id three times in the browser header and tab!
[/img]
What is causing this?
Posted
Advanced Member
Carefree
Posts: 4224
4224
You must have a variable which isn't being reset, but is being regularly appended to.
You Must enter a message