PDA

View Full Version : Problem with tabip


280ZX
03-11-2016, 11:53 AM
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&contenttype=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&content type=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&content type=vBForum_Post&tabi d=49

280ZX
03-11-2016, 12:39 PM
Thank you for the explanation.

The search.php URL should work like this:
search.php?{session.sessionurl}do=getdaily&content type=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&tabid=49
Today's topic: /search.php?do=getdaily&contenttype=vBForum_Post&tabid=49

I'm really not familiar with the hooks.