View Full Version : I would like to print the PROPER URL on each
tmanran123
09-15-2011, 08:05 PM
I would simply like to print the entire "CORRECT" url on the page.
e.g. vbulletin ignores everything after the number in the below link
vbulletin.com/forum/forumdisplay.php/153-SPONGE-BOB
so i'd like to simply display the correct link. e.g.
vbulletin.com/forum/forumdisplay.php/153-vBulletin-4
https://vborg.vbsupport.ru/external/2011/09/15.gif
Digital Jedi
09-15-2011, 08:39 PM
I'm not sure what you mean by "correct" URL. You mean you want it to print it without the SEO? That's neither correct, nor incorrect, but you could just put
http://www.vbulletin.com/forum/forumsdisplay/$forum[forumid]
where you want it in the template.
tmanran123
09-15-2011, 08:43 PM
thanks
e.g. I want to print the "correct" "nice name"
e.g. "sponge bob square pants" is not the correct "nice name" for the forum in question.
so i'd like to print the correct one - e.g. the one in the database
Lynne
09-15-2011, 10:30 PM
What do you mean "the one in the database"? There is no URL kept in the database.
Can you give actual links and such for us to understand what you want?
tmanran123
09-15-2011, 11:38 PM
oh it's not in the database...?
oh...ok...
well i guess i'd like to print the output of whatever process derives the "seo title" then.
e.g. here are two links:
https://www.vbulletin.com/forum/forumdisplay.php/153-vBulletin-4-Questions-Problems-and-Troubleshooting
https://www.vbulletin.com/forum/forumdisplay.php/153-PartyPartyPartyPartyPartyParty
so, on my forum, i would like to print the string:
vbulletin.com/forum/forumdisplay.php/153-vBulletin-4-Questions-Problems-and-Troubleshooting
Despite the different formations in the above two links.
Digital Jedi
09-16-2011, 12:45 AM
Well, I may be misunderstanding you, so I'll post both ways and hopefully that will cover your question. My vB4 installation is a little older, but it should still work the same.
To keep the SEO title in the URL you can use:
{vb:raw vboptions.bburl}/{vb:link forum, {vb:raw forum}}
e.g. https://www.vbulletin.com/forum/forumdisplay.php/153-vBulletin-4-Questions-Problems-and-Troubleshooting
To REMOVE the SEO title, you can use:
{vb:raw vboptions.bburl}/forumdisplay.php/{vb:raw foruminfo.forumid}
e.g. https://www.vbulletin.com/forum/forumdisplay.php/153
One of those should work for you, depending on what you were trying to achieve.
tmanran123
09-16-2011, 01:05 AM
Thanks
What the first line of code does, is merely reprint the "nice SEO name" portion of the URL.
I seem to be confusing people
;(
I am very sorry.
I'll try to be more clear.
Suppose you have a forum like this:
vbulletin.com/forumdisplay.php/176-vBulletin-Mobile-Suite
Now, upon creation of this forum, a "nice seo name" was created. That SEO name is "vBulletin-Mobile-Suite"
Hence, I would like the created string (vBulletin-Mobile-Suite), to print on the page, REGARDLESS of what people ACTUALLY link to.
e.g. if someone arrives to FORUM 176 via any of the below links:
vbulletin.com/forum/forumdisplay.php/176
vbulletin.com/forum/forumdisplay.php/176-PartyPartyParty
vbulletin.com/forum/forumdisplay.php/176-TheWorstForumEver
vbulletin.com/forum/forumdisplay.php/176-DontGoToThisForumOrYouDie
vbulletin.com/forum/forumdisplay.php/176-vBulletin-Mobile-Suite
I would like vBulletin to always print the words "vBulletin-Mobile-Suite"
Why is this important
I would like to eventually put this string into the canonical tag
http://www.youtube.com/watch?v=Cm9onOGTgeM
Digital Jedi
09-16-2011, 03:16 AM
Okay, I see now. The second line of code will do what you want.
tmanran123
09-16-2011, 03:31 AM
You mean this line?
{vb:raw vboptions.bburl}/forumdisplay.php/{vb:raw foruminfo.forumid}
This line merely prints the number of the forum.
I need to print the "nice seo name" e.g. "vBulletin-Mobile-Suite" too.
Digital Jedi
09-16-2011, 05:06 AM
Hey, okay then. The first line will do that, no matter what they typed in to get there.
tmanran123
09-16-2011, 05:41 AM
correct
the first line of code above, will display the string in the URL -- no matter what is typed in.
But, I would like to display the "nice seo name" that vBulletin is ACTUALLY currently using. (Despite, the string used to arrive there.)
e.g. if someone arrives to FORUM 176 via any of the below links:
vbulletin.com/forum/forumdisplay.php/176
vbulletin.com/forum/forumdisplay.php/176-PartyPartyParty
vbulletin.com/forum/forumdisplay.php/176-TheWorstForumEver
vbulletin.com/forum/forumdisplay.php/176-DontGoToThisForumOrYouDie
vbulletin.com/forum/forumdisplay.php/176-vBulletin-Mobile-Suite
I would like vBulletin to always print the ACTUAL "nice seo name" of the forum:
which is:
vbulletin.com/forum/forumdisplay.php/176-vBulletin-Mobile-Suite
Digital Jedi
09-16-2011, 07:51 AM
Yes, the first block of code I posted will do that.
{vb:raw vboptions.bburl}/{vb:link forum, {vb:raw forum}}
No matter what, the URL will always be displayed as whatever the name of the forum is.
tmanran123
09-16-2011, 08:04 AM
i double checked it again.
that line of code merely prints whatever is in the URL
e.g. forumdisplay.php/176-TheWorstForumEver
still prints "TheWorstForumEver"
I need to print
forumdisplay.php/176-vBulletin-Mobile-Suite
Digital Jedi
09-16-2011, 08:17 AM
Are you using the Mod Rewrite Friendly URLs option? Since that option requires rewrite rules by your server, it could be why it doesn't change in the template output. It works for me on all the Friendly URL settings, except that one, which I can't even test because I don't have my server configured for it.
tmanran123
09-16-2011, 08:31 AM
hi
i tried it on a vbulletin 4.1.4 install with the default theme.
on the FORUMDISPLAY template
i dont remember setting or changing any "mod rewrite" command. so i assume its using the default...
Lynne
09-16-2011, 03:31 PM
{vb:raw vboptions.bburl}/{vb:link forum, {vb:raw foruminfo},null,'forumid','title_clean'}
tmanran123
09-16-2011, 06:37 PM
YAY!!!!!!!!!!!
Thanks!!!!!!!!!!!!!!
https://vborg.vbsupport.ru/
for future people, this is the line I used:
<link rel="canonical" href="{vb:raw vboptions.bburl}/{vb:link forum, {vb:raw foruminfo},null,'forumid','title_clean'}" />
This video describes why its important:
http://www.youtube.com/watch?v=Cm9onOGTgeM
This issue wont be troublesome for many. But for me, I have over 2,000 forums in my vbulletin install. And the names of the forums tend to change.
This could also be an issue for someone who moves from "non-seo" to seo'd URLs - e.g. someone who perhaps does a VBulletin upgrade.
anyway, Thanks everyone!
Majora
11-22-2013, 04:00 PM
YAY!!!!!!!!!!!
Thanks!!!!!!!!!!!!!!
http://happy-pictures.net/wp-content/uploads/2011/09/Happy-Cat.jpg
for future people, this is the line I used:
<link rel="canonical" href="{vb:raw vboptions.bburl}/{vb:link forum, {vb:raw foruminfo},null,'forumid','title_clean'}" />
This video describes why its important:
http://www.youtube.com/watch?v=Cm9onOGTgeM
This issue wont be troublesome for many. But for me, I have over 2,000 forums in my vbulletin install. And the names of the forums tend to change.
This could also be an issue for someone who moves from "non-seo" to seo'd URLs - e.g. someone who perhaps does a VBulletin upgrade.
anyway, Thanks everyone!
Thanks! :)
What's the canonical-tag for page 2..3...and so on?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.