vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   I would like to print the PROPER URL on each (https://vborg.vbsupport.ru/showthread.php?t=270348)

tmanran123 09-15-2011 08:05 PM

I would like to print the PROPER URL on each
 
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

Code:

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/foru...roubleshooting

https://www.vbulletin.com/forum/foru...artyPartyParty

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:
Code:

{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:
Code:

{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?

Code:

{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.


All times are GMT. The time now is 07:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01049 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete