Opening a topic loads a different topic/ category

Go down

Solved Opening a topic loads a different topic/ category

Post by Kami-sama on 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
avatar
Kami-sama
Forumember

Female Posts : 405
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 on 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
avatar
Kami-sama
Forumember

Female Posts : 405
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 on 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



avatar
APE
Administrator
Administrator

Male Posts : 12477
Reputation : 1305
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

Back to top


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