Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 09-15-2011, 08:05 PM
tmanran123 tmanran123 is offline
 
Join Date: Nov 2009
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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


Reply With Quote
  #2  
Old 09-15-2011, 08:39 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 09-15-2011, 08:43 PM
tmanran123 tmanran123 is offline
 
Join Date: Nov 2009
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 09-15-2011, 10:30 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #5  
Old 09-15-2011, 11:38 PM
tmanran123 tmanran123 is offline
 
Join Date: Nov 2009
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 09-16-2011, 12:45 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 09-16-2011, 01:05 AM
tmanran123 tmanran123 is offline
 
Join Date: Nov 2009
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 09-16-2011, 03:16 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, I see now. The second line of code will do what you want.
Reply With Quote
  #9  
Old 09-16-2011, 03:31 AM
tmanran123 tmanran123 is offline
 
Join Date: Nov 2009
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 09-16-2011, 05:06 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, okay then. The first line will do that, no matter what they typed in to get there.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04276 seconds
  • Memory Usage 2,250KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete