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

Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2016, 11:53 AM
280ZX 280ZX is offline
 
Join Date: Mar 2016
Location: Germany
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Problem with tabip

Hi everyone,

I'm having a little problem to mark some tabs as active. I've reorganized the links to eliminate the "what's new" tab and moved the links to "Forum". I also moved some Links from "Forum" to a new tab "My area". There are no new links, only the links from the stock menu. To set the moved tab active I added tabid=xxx to the URL and in most cases it works fine. But there are a few links where it didn't work or gives you an error message. Here are some examples:

Private messages:
private.php{session.sessionurl_q}&tabid=97
Error message: The requested URL /vbtest/private.php&tabid=97 was not found on this server.

Aktivit?ten
activity.php{session.sessionurl_q}&tabid=49
Error message: The requested URL /vbtest/activity.php&tabid=49 was not found on this server.

Picures
album.php{session.sessionurl_q}&tabid=97
Error message: The requested URL /vbtest/album.php&tabid=97 was not found on this server.

Today's topic
search.php?{session.sessionurl}&do=getdaily&co ntenttype=vBForum_Post&tabid=49
Ignoring tabid and "What's new" is still active.

Anyone here, who has an idea how to fix this?

Thank you in advance.

Cheers,
Andre
Reply With Quote
  #2  
Old 03-11-2016, 11:55 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's because when you add a parameter to an URL and it's the first one, you have to use a question mark ? and not the ampersand &.
Reply With Quote
  #3  
Old 03-11-2016, 12:06 PM
280ZX 280ZX is offline
 
Join Date: Mar 2016
Location: Germany
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So it must be: private.php{session.sessionurl_q}?tabid=97 ?
Reply With Quote
  #4  
Old 03-11-2016, 12:11 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try:
private.php?{session.sessionurl}tabid=97

Note that I changed sessionurl_q to sessionurl and left out the ampersand/question mark completely.
Reply With Quote
  #5  
Old 03-11-2016, 12:20 PM
280ZX 280ZX is offline
 
Join Date: Mar 2016
Location: Germany
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

private.php{session.sessionurl_q}?tabid=97 This one worked. But to understand what you said, what is the difference between sessionurl and sessionurl_q?

And how do I have to modify this URL?
search.php?{session.sessionurl}do=getdaily&con tenttype=vBForum_Post&tabid=49
Reply With Quote
  #6  
Old 03-11-2016, 12:33 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sessionurl contain "s=sessionhash&"
sessionurl_q contains "?s=sessionhash"
sessionurl_js contains "s=sessionhash&"

In case you weren't using any other parameters, sessionurl_q would of been fine to use but since you want to add another parameter to the URL and you don't know whether the sessionurl is set or not, you have to make use of sessionurl so you're sure the URL will come out the right way.

The search.php URL should work like this:
search.php?{session.sessionurl}do=getdaily&con tenttype=vBForum_Post&tabi d=49
Reply With Quote
Благодарность от:
280ZX
  #7  
Old 03-11-2016, 12:39 PM
280ZX 280ZX is offline
 
Join Date: Mar 2016
Location: Germany
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the explanation.

Quote:
Originally Posted by Dave View Post
The search.php URL should work like this:
search.php?{session.sessionurl}do=getdaily&con tenttype=vBForum_Post&tabid=49
No, that didn't work. The search is ok, but the wrong tab is active.
Reply With Quote
  #8  
Old 03-14-2016, 12:30 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why doesn't it work? What's the URL in your address bar?
Maybe you put the wrong tabid in the URL.
Reply With Quote
  #9  
Old 03-14-2016, 12:49 PM
280ZX 280ZX is offline
 
Join Date: Mar 2016
Location: Germany
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The search result is alright, but the wrong tab is activated. tabid=49 is right, it is the same tab I used for the other links and there it worded fine. The URL shown in the address bar after clicking the link is: .../vbtest/search.php?searchid=1736
Reply With Quote
  #10  
Old 03-14-2016, 01:16 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's because when you search something, vBulletin stores all the search information in the database for caching purposes and then redirects you to that URL.

You will not be able to fix that with a template modification, not entirely sure if it's possible with a hook in vBulletin either.
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 01:10 AM.


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.06792 seconds
  • Memory Usage 2,244KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_quote
  • (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
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete