The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Opening a topic loads a different topic/ category

2 posters

Go down

Solved Opening a topic loads a different topic/ category

Post by Kami-sama January 22nd 2017, 2:39 pm

Technical Details


Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
Forum link : ( link is hidden, you must reply to see )

Description of problem

Hey everybody!

So basically what I want to do:
- user clicks on a TOPIC A name to open it
- when the TOPIC A is opened (or instantly) user is redirected to TOPIC B

Do you think this is possible?
Links in the name do not work Smile
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

Solved Re: Opening a topic loads a different topic/ category

Post by Kami-sama January 22nd 2017, 2:49 pm

Sorry, for double posting, but just figured it out myself Very Happy
Easier, then expected:

Code:
//Code by KamiSama
$(document).ready(function(){
if(document.URL.indexOf("TOPIC A LINK") >= 0){
   window.location = "TOPIC B LINK";      
}
});

We can close this case then, if no one has a better solution Wink
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

Solved Re: Opening a topic loads a different topic/ category

Post by Ape January 22nd 2017, 3:10 pm

Thank you for showing us how this can be done Good work Wink
Have a great weekend Smile
Problem solved & topic archived.
Please read our forum rules: ESF General Rules


Opening a topic loads a different topic/ category Left1212Opening a topic loads a different topic/ category Center11Opening a topic loads a different topic/ category Right112
Opening a topic loads a different topic/ category Ape_b110
Opening a topic loads a different topic/ category Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19470
Reputation : 2013
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum