Jump to the post that solved this thread.
Solved: 5 Years, 7 Months, 3 Weeks ago [How To?] Redirected forum opens in new window
#1
Solved: 5 Years, 7 Months, 3 Weeks ago
Hello,

I have made a forum as link, and now if someone clicks on it it opens. Now I want that if someone click on that forum the page that is linked on the forum is open on a tab or new window.

Wich file do I need to edit and with wich code??

Thanks again
Reply
#2
Solved: 5 Years, 7 Months, 3 Weeks ago
Add "_blank" as a target attribute.

<a href="http://www.google.com" target="_blank">link</a>
Reply
#3
Solved: 5 Years, 7 Months, 3 Weeks ago
(2016-01-24, 08:35 PM)nth Wrote: Add "_blank" as a target attribute.

<a href="http://www.google.com" target="_blank">link</a>

Thanks but not a link in a post or thread, I mean a forum as link. U can not use codes only urls
I think also that I need to edit a template for it but wich and wich code
Reply
#4
Solved: 5 Years, 7 Months, 3 Weeks ago
it depends, where you want to place it? header or footer?
Owner of ForumAnime.PT
Reply
#5
Solved: 5 Years, 7 Months, 3 Weeks ago
(2016-01-27, 10:12 AM)Blackbeard Wrote: it depends, where you want to place it? header or footer?

Header or footer I think u don't understand the meaning.... U have forums like, feedback, about us etc and in the forums u make you can post threads or posts... U can make a forum a forum or category but also as link.

So if u click on a forum or forum category u can post thinks but if u click on the forum u set as link u go straid to the link. The forum that is set as link need to be open at a new tab or window. So nothing about in threads or posts or headers or footers, it need to be the forum that is set as link.

Thanks
Reply
#6
Solved: 5 Years, 7 Months, 3 Weeks ago
I could hardly understand what you mean, but I guess it's in the forumdisplay.php: https://github.com/mybb/mybb/blob/80d89d...y.php#L169
header("Location: {$foruminfo['linkto']}");
It's not possible to make it redirect to a new tab.

You could use a conditional in the forumbit_depth2_forum template though. Something like:
<a href="<if $forum['linkto'] then>{$forum['linkto']}" target="_blank<else>{$forum_url}</if>">{$forum['name']}</a>
should work.
Reply
#7
Solved: 5 Years, 7 Months, 3 Weeks ago
Nope all above is not working and I know this is really possible. So I have search and found the working sollution..


U need to do this to get it works...

Go to Templates >> Forum Bit Templates >> forumbit_depth2_cat

Then find the code:

<strong><a href="{$forum_url}">{$forum['name']}</a></strong>


Change it to:
<strong><a href="{$forum_url}" target="_blank">{$forum['name']}</a></strong>


Then your selected forum that is select as link opens in a new window..
Reply
#8
Solved: 5 Years, 7 Months, 3 Weeks ago
That's exactly what I mentioned above, but only for forums that are actually redirects, which seemed to be the initial question.
Reply
#9
Solved: 5 Years, 7 Months, 3 Weeks ago
(2016-02-02, 12:32 PM)Destroy666 Wrote: That's exactly what I mentioned above, but only for forums that are actually redirects, which seemed to be the initial question.

A oke haha, Thanks annyway for helping me to the sollution!
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)