MyBB Community Forums

Full Version: If you set a forum as link to open in a new window
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

The titel is that I want, I have create a new forum but this is a link, and now if members click on that forum you go to the link in the same window, I want if people click on the the forum thats is a link that this one opens in a new window.

Is this possible and how do I do that?

Thanks

Unfortunately, you'd have to have every forum open in a new window IIRC.
but is it not possible to edit a code or something to make that possible ? or a plugin ?
I'll dig a bit deeper into the MyBB core but I don't think it's gonna be possible :\
Ok, this might work:
In inc/functions_forumlist.php around line 262:

Replace
if($forum['linkto'] != '' || $hideinfo == true)
              {
                  $lastpost = "<div style=\"text-align: center;\">-</div>";
                  $posts = "-";
                  $threads = "-";
              }

With

if($forum['linkto'] != '' || $hideinfo == true)
              {
                  $lastpost = "<div style=\"text-align: center;\">-</div>";
                  $posts = "-";
                  $threads = "-";
                  $target = 'target="_blank"';
              }

And then edit the templates forumbit_depth1_cat, forumbit_depth2_cat, forumbit_depth1_forum, and forumbit_depth2_forum

Find
<a href="{$forum_url}">
and replace with
<a href="{$forum_url}" {$target}>

That should work, no promises though.
(2012-02-01, 10:07 PM)Paul H. Wrote: [ -> ]Ok, this might work:
In inc/functions_forumlist.php around line 262:

Replace
if($forum['linkto'] != '' || $hideinfo == true)
              {
                  $lastpost = "<div style=\"text-align: center;\">-</div>";
                  $posts = "-";
                  $threads = "-";
              }

With

if($forum['linkto'] != '' || $hideinfo == true)
              {
                  $lastpost = "<div style=\"text-align: center;\">-</div>";
                  $posts = "-";
                  $threads = "-";
                  $target = 'target="_blank"';
              }

And then edit the templates forumbit_depth1_cat, forumbit_depth2_cat, forumbit_depth1_forum, and forumbit_depth2_forum

Find
<a href="{$forum_url}">
and replace with
<a href="{$forum_url}" {$target}>

That should work, no promises though.

WORKS!!! but I have only edit the functions_forumlist.php and the forumbit_depth2_forum of my template and thats was enough


Thanks!!
You're welcome Smile