Page 1 of 1

Link Redirection in New window

PostPosted: Thu Jun 15, 2006 3:54 pm
Author: Unregistered
how can i make a Link Redirection open from a new window when u click it from the front end?

Re: Link Redirection in New window

PostPosted: Fri Jun 16, 2006 3:27 am
Author: Dr. Bantham
There is a small mod which takes care of this:
http://integrmod.com/home/viewtopic.php?t=975
The post above is from the IntegraMOD archive.

PostPosted: Fri Jun 16, 2006 3:09 pm
Author: Unregistered
i tried that.. its not workin.. the link opens from the same window.. any other way to fix this?

Re: Link Redirection in New window

PostPosted: Sat Jun 17, 2006 4:07 am
Author: Dr. Bantham
This should work (it worked for me):
Code: Select all
############################################################## ## MOD Title]http://rpgnet.clanmckeen.com#[/url]# MOD Description:##       This will open a new window for the forums link type which point##       to an external redirection (eg link starts with [url=http://]http://[/url], [url=ftp://]ftp://[/url], etc.)## MOD Version: 1.0.0## ## Installation Level: Easy## Installation Time: 2 Minutes## Files To Edit:####       includes/class_forums.php##       templates/subSilver/index_body.tpl#### Included Files: (n/a, or list of included/required files) ############################################################## ## For Security Purposes, Please Check: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] ############################################################## ## Author Notes: ## ############################################################## ## MOD History: ## ##   2004-10-13 - Version 1.0.0##      - first publication## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ################################################################-----[ OPEN ]------------------------------------------------#includes/class_forums.php##-----[ FIND ]------------------------------------------------## this is a partial search : the full line is longer#                 'HITS' => $this->data[$forum_id]['forum_link_hit_count'] ?##-----[ AFTER, ADD ]------------------------------------------#                 'S_TARGET' => preg_match('#^(mailto:|(news|(ht|f)tp(s?))://)#i', $this->data[$forum_id]['forum_link']) ? ' target="_blank"' : '',##-----[ OPEN ]------------------------------------------------#templates/subSilver/index_body.tpl##-----[ FIND ]------------------------------------------------## this is a partial search : the full line is longer#         <td><a href="{indexrow.link.U_VIEWFORUM}" class="forumlink"##-----[ IN-LINE FIND ]---------------------------------------- #href="{indexrow.link.U_VIEWFORUM}" class="forumlink"##-----[ IN-LINE AFTER, ADD ]---------------------------------- #  {indexrow.link.S_TARGET}##-----[ FIND ]------------------------------------------------## this is a partial search : the full line is longer#         <span><a href="{indexrow.link.U_VIEWFORUM}" class="forumlink"##-----[ IN-LINE FIND ]---------------------------------------- #href="{indexrow.link.U_VIEWFORUM}" class="forumlink"##-----[ IN-LINE AFTER, ADD ]---------------------------------- #  {indexrow.link.S_TARGET}##-----[ SAVE/CLOSE ALL FILES ]--------------------------------## EoM

Re: Link Redirection in New window

PostPosted: Sat Jun 17, 2006 6:58 am
Author: Unregistered
includes/class_forums.php <img>

am using 140 v2.0.20 and that file is surely not there..

Re: Link Redirection in New window

PostPosted: Sat Jun 17, 2006 11:10 am
Author: Dr. Bantham
Sorry - I think that was a different version. Try this one:
Code: Select all
############################################################## ## MOD Title]http://rpgnet.clanmckeen.com#[/url]# MOD Description:##           Forum link which are not mentioned as a phpBB prog will be opened in a new window#### MOD Version:       1.0.1## ## Installation Level:   Easy## Installation Time:    ~3 Minutes## Files To Edit:##           includes/functions_categories_hierarchy.php##           templates/subSilver/index_box.tpl#### Included Files:   n/a############################################################## ## For Security Purposes, Please Check: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] ############################################################## ## Author Notes: ## ############################################################## ## MOD History: ## ##   2004-07-21 - Version 1.0.1##      - compliance PHP v5.x.x## ##   2003-11-13 - Version 1.0.0##      - in respond of an often asked feature## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ################################################################-----[ OPEN ]------------------------------------------------#includes/functions_categories_hierarchy.php##-----[ FIND ]------------------------------------------------#<php> ($type == POST_FORUM_URL) ? append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$id") : append_sid("index.$phpEx?" . POST_CAT_URL . "=$id"),##-----[ AFTER, ADD ]------------------------------------------#//-- mod : new window on forum link ----------------------------------------------------------------//-- add                 'U_TARGET'               => ( ($tree['type'][$this_key] == POST_FORUM_URL) && !empty($tree['data'][$this_key]['forum_link']) && !$tree['data'][$this_key]['forum_link_internal']) ? 'target="_blank"' : '',//-- fin mod : new window on forum link ------------------------------------------------------------##-----[ OPEN ]------------------------------------------------#templates/subSilver/index_box.tpl##-----[ FIND ]------------------------------------------------#<BEGIN>##-----[ BEFORE, ADD ]-----------------------------------------#<mod>  ##-----[ FIND ]------------------------------------------------#             <td><a><img></a></td>##-----[ IN-LINE FIND ]---------------------------------------- #href="{catrow.forumrow.U_VIEWFORUM}"##-----[ IN-LINE AFTER, ADD ]---------------------------------- #  {catrow.forumrow.U_TARGET}##-----[ FIND ]------------------------------------------------#         <span><a>{catrow.forumrow.FORUM_NAME}</a><br></span>##-----[ IN-LINE FIND ]---------------------------------------- #href="{catrow.forumrow.U_VIEWFORUM}"##-----[ IN-LINE AFTER, ADD ]---------------------------------- #  {catrow.forumrow.U_TARGET}##-----[ SAVE/CLOSE ALL FILES ]--------------------------------## EoM