Revision history for OpenExternalInNewWindow
Additions:
%%(php) $external_link_new_window = $this->GetConfigValue("external_link_new_window");
if ($external_link_new_window = "0") {
$result = '<a class="'.$class.'" href="'.$url.'">'.$text.'</a>';
} else {
$result = '<a class="'.$class.'" href="'.$url.'" target=\"_new\">'.$text.'</a>';
}%%
if ($external_link_new_window = "0") {
$result = '<a class="'.$class.'" href="'.$url.'">'.$text.'</a>';
} else {
$result = '<a class="'.$class.'" href="'.$url.'" target=\"_new\">'.$text.'</a>';
}%%
Deletions:
Revision [20571]
Edited on 2009-04-24 09:45:39 by ErikAnderson [Instructions for Wikka Version 1.1.6.6 (more to come)]Additions:
====Step 1 for Wikka version =1.1.6.6====
%%(php) $result = '<a class="'.$class.'" href="'.$url.'">'.$text.'</a>';%%
In Wikka version 1.1.6.6, you can find the code in ##libs/Wakka.class.php## at line 1050.
**Replace** it with... (rest of instructions to follow shortly -EA)
====Step 1 for Wikka versions <1.1.6.6====
====Step 2====
%%(php) $result = '<a class="'.$class.'" href="'.$url.'">'.$text.'</a>';%%
In Wikka version 1.1.6.6, you can find the code in ##libs/Wakka.class.php## at line 1050.
**Replace** it with... (rest of instructions to follow shortly -EA)
====Step 1 for Wikka versions <1.1.6.6====
====Step 2====
Revision [19473]
Edited on 2008-01-28 00:16:35 by JasonHuebel [Modified links pointing to docs server]No Differences
Revision [17927]
Edited on 2008-01-24 21:47:54 by JasonHuebel [Modified links pointing to docs server]Additions:
**TODO:**
~- Need to add info on modifying ##actions/rss.php##, which should always be considered external
~- Need to add info on modifying ##actions/rss.php##, which should always be considered external
Revision [17923]
Edited on 2008-01-24 20:49:43 by JasonHuebel [added note about requiring XHTML Transitional]Additions:
**Note:** This modification also requires XHTML Transitional. XHTML Strict is not supported, since the target attribute is not allowed. If you don't understand this and/or haven't modified the DOCTYPE in ##actions/header.php##, then you don't need to worry about this.
Revision [17904]
Edited on 2008-01-15 01:09:37 by JasonHuebel [modified to include instructions for Wikka versions 1.1.6.2 or greater]Additions:
Locate this line in the source:
In Wikka versions <1.1.6.2, you can find the code in ##wikka.php##, somewhere around line 662.
In Wikka versions >=1.1.6.2, you can find the code in ##libs/Wakka.class.php##, somewhere around line 882.
**Replace** it with this:
%%(php)'external_link_new_window' => '1'%%
##'0'## (zero) turns off opening external links in a new window. Any non-zero value turns on opening external links in a new window.
In Wikka versions <1.1.6.2, you can find the code in ##wikka.php##, somewhere around line 662.
In Wikka versions >=1.1.6.2, you can find the code in ##libs/Wakka.class.php##, somewhere around line 882.
**Replace** it with this:
%%(php)'external_link_new_window' => '1'%%
##'0'## (zero) turns off opening external links in a new window. Any non-zero value turns on opening external links in a new window.
Deletions:
and **replace** it with this:
%%(php)"external_link_new_window" => "1"%%
##"0"## (zero) turns off opening external links in a new window. Any non-zero value turns on opening external links in a new window.
Revision [14478]
Edited on 2006-06-05 16:08:11 by JasonHuebel [added config file option for opening an external link in a new window]Additions:
and **replace** it with this:
%%(php) $external_link_new_window = $this->GetConfigValue("external_link_new_window");
if ($external_link_new_window = "0") {
return $url ? "<a class=\"ext\" href=\"$url\">$text</a>$external_link_tail" : $text;
} else {
return $url ? "<a class=\"ext\" href=\"$url\" target=\"_new\">$text</a>$external_link_tail" : $text;
}%%
Then add the following element to the ##wikka.config.php## wakkaConfig array:
%%(php)"external_link_new_window" => "1"%%
##"0"## (zero) turns off opening external links in a new window. Any non-zero value turns on opening external links in a new window.
%%(php) $external_link_new_window = $this->GetConfigValue("external_link_new_window");
if ($external_link_new_window = "0") {
return $url ? "<a class=\"ext\" href=\"$url\">$text</a>$external_link_tail" : $text;
} else {
return $url ? "<a class=\"ext\" href=\"$url\" target=\"_new\">$text</a>$external_link_tail" : $text;
}%%
Then add the following element to the ##wikka.config.php## wakkaConfig array:
%%(php)"external_link_new_window" => "1"%%
##"0"## (zero) turns off opening external links in a new window. Any non-zero value turns on opening external links in a new window.
Deletions:
%%(php) return $url ? "<a class=\"ext\" href=\"$url\" target=\"_new\">$text</a>$external_link_tail" : $text;%%
Revision [12269]
Edited on 2005-12-14 19:17:57 by JasonHuebel [removed comment, clarified the purpose of the modification]Additions:
This simple code modification will open //all// external links in a new window or tab, depending on your browser's configuration. This modification is useful to prevent users from navigating away from the wiki when they click an external link. External links are defined as any link that leaves the Wiki (even if they are on the same server).
Deletions:
~& Another alternative is to use this directly within the wikka page you are working on
~& %%(htmlstrict) <A href="http://google.com" TARGET="_blank">Google</A> %%
~& It will show up a normal link "" <A href="http://google.com" TARGET="blank">Google</A> ""
~& In this case the **TARGET="_blank"** bit is what does the trick.
~& Assuming this is what you were originally after, it has the advantage of no code changes. NickDamoulakis
Revision [11911]
Edited on 2005-11-19 12:13:36 by NickDamoulakis [removed comment, clarified the purpose of the modification]Additions:
~& Another alternative is to use this directly within the wikka page you are working on
~& %%(htmlstrict) <A href="http://google.com" TARGET="_blank">Google</A> %%
~& It will show up a normal link "" <A href="http://google.com" TARGET="blank">Google</A> ""
~& In this case the **TARGET="_blank"** bit is what does the trick.
~& Assuming this is what you were originally after, it has the advantage of no code changes. NickDamoulakis
~& %%(htmlstrict) <A href="http://google.com" TARGET="_blank">Google</A> %%
~& It will show up a normal link "" <A href="http://google.com" TARGET="blank">Google</A> ""
~& In this case the **TARGET="_blank"** bit is what does the trick.
~& Assuming this is what you were originally after, it has the advantage of no code changes. NickDamoulakis
Additions:
----
CategoryUserContributions
CategoryUserContributions
Additions:
Locate this line in ##wikka.php##, somewhere around line 662: