vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Problem with tabip (https://vborg.vbsupport.ru/showthread.php?t=322085)

280ZX 03-11-2016 11:53 AM

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? :confused:

Thank you in advance.

Cheers,
Andre

Dave 03-11-2016 11:55 AM

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

280ZX 03-11-2016 12:06 PM

So it must be: private.php{session.sessionurl_q}?tabid=97 ?

Dave 03-11-2016 12:11 PM

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

Note that I changed sessionurl_q to sessionurl and left out the ampersand/question mark completely.

280ZX 03-11-2016 12:20 PM

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

Dave 03-11-2016 12:33 PM

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

280ZX 03-11-2016 12:39 PM

Thank you for the explanation.

Quote:

Originally Posted by Dave (Post 2567009)
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.

Dave 03-14-2016 12:30 PM

Why doesn't it work? What's the URL in your address bar?
Maybe you put the wrong tabid in the URL.

280ZX 03-14-2016 12:49 PM

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

Dave 03-14-2016 01:16 PM

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.

280ZX 03-14-2016 01:32 PM

"New topics" and "today's topics" are very similar and for "new topics" it works fine.

New topics: /search.php?do=getnew&contenttype=vBForum_Post&tabi d=49
Today's topic: /search.php?do=getdaily&contenttype=vBForum_Post&ta bid=49

I'm really not familiar with the hooks.


All times are GMT. The time now is 05:49 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.01027 seconds
  • Memory Usage 1,731KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete