MyBB Community Forums

Full Version: How Do I Add target="_blank" To Forum Links?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When you create a forum, there's an option to redirect that forum to another website. When you click on one of these forum links, they don't open up in a new window. How do I add the target="_blank" attribute?
1. Download Template Conditionals: http://mybbhacks.zingaburga.com/showthread.php?tid=464 and activate it
2. In forumbit_depth2_forum template add this code to the <a>:
<if $forum['linkto'] then>target="_blank"</if>
Idk why you need template conditional for this.
If you add target="_blank" after the a href ="{$forum_url}, it works too.

<strong><a href ="{$forum_url}" target="_blank">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>

Sry for reviving this thread, but i just found this and this way is easier.^^
(2016-03-01, 10:54 PM)thelovelyone Wrote: [ -> ]Idk why you need template conditional for this.

to open only those redirect forum links in a new window.. your method simply opens all forums in a new window..