Revision history for KickTheDonkey


Revision [23433]

Last edited on 2016-05-20 07:38:48 by BaxilDragon [Replaces old-style internal links with new pipe-split links.]
Additions:
Homepage: [[http://ktd.sytes.net | http://ktd.sytes.net]]
Deletions:
Homepage: [[http://ktd.sytes.net http://ktd.sytes.net]]


Revision [20896]

Edited on 2009-10-30 16:46:10 by BaxilDragon [Adding info on mod's v1.2 support]
Additions:
- For **version 1.1.6.6.** or above, it gets even simpler:
Find these lines in /libs/Wakka.class.php (lines 1048 & 1049 in 1.1.6.6; lines 1200 & 1201 in 1.2):
Deletions:
- For **version 1.1.6.6.**, it gets even simpler:
Find these lines in /libs/Wakka.class.php (lines 1048 & 1049):


Revision [20573]

Edited on 2009-04-24 10:57:54 by ErikAnderson [Update for version 1.1.6.6]
Additions:
- For **version 1.1.6.6.**, it gets even simpler:
Find these lines in /libs/Wakka.class.php (lines 1048 & 1049):
if ('' != $url)
{%%
and **insert** this code **below** it:
if($url_parts['host'] != $base_parts['host']) {$class = 'ext';} else {$class = '';}%%


Revision [19998]

Edited on 2008-06-04 03:58:47 by MasinAlDujaili [working versions]
Additions:
>>Working for 1.1.6.2 to 1.1.6.4 (latest)>>


Revision [18941]

Edited on 2008-01-28 00:13:24 by EdLucas [Modified links pointing to docs server]

No Differences

Revision [15403]

Edited on 2006-10-05 17:56:36 by EdLucas [Corrected location in the code to make this hack]
Additions:
Homepage: [[http://ktd.sytes.net http://ktd.sytes.net]]
Email: [email protected]

====Tricks I've learned====
Here are some nifty hacks I've done to Wikka:

- Preventing links to the current host as being marked as 'external'. For instance, you've got Wikka installed at ""http://some.host.com/wikka/"" and you link to a file ""http://some.host.com/files/file.txt"". I didn't like the fact that Wikka marked it as 'external'. Yes, its external to Wikka, but not external to the site. So, here's a little hack to make Wikka match my personal preference:


Find this line in /libs/Wakka.class.php (around line 660):
%%(php)
$external_link_tail = $this->GetConfigValue("external_link_tail");
return $url ? "<a class=\"ext\" href=\"$url\">$text</a>$external_link_tail" : $text;
%%

and replace with:
%%(php)
$url_parts = parse_url($url);
$base_parts = parse_url($this->config['base_url']);

if($url_parts['host'] != $base_parts['host'])
{
$external_link_tail = $this->GetConfigValue("external_link_tail");
return $url ? "<a class=\"ext\" href=\"$url\">$text</a>$external_link_tail" : $text;
}
else
{
return $url ? "<a href=\"$url\">$text</a>" : $text;
}
%%

Basically, this hack is getting the base host of the url in question, and comparing that against the base host of the Wikka install. If they're different, the link is identified as an external link. Otherwise, its presented as a regular link.
----
Deletions:
Homepage: [[http://ktd.sytes.net http://ktd.sytes.net]]
Email: [email protected]

Want a gmail invite? I've got'em in spades...

----
====Tricks I've learned====
Here are some nifty hacks I've done to Wikka:

- Preventing links to the current host as being marked as 'external'. For instance, you've got Wikka installed at ""http://some.host.com/wikka/"" and you link to a file ""http://some.host.com/files/file.txt"". I didn't like the fact that Wikka marked it as 'external'. Yes, its external to Wikka, but not external to the site. So, here's a little hack to make Wikka match my personal preference:


Find this line in wikka.php in the Wikka::Link method (around link 475, I believe):
%%(php)
$external_link_tail = $this->GetConfigValue("external_link_tail");
return $url ? "<a class=\"ext\" href=\"$url\">$text</a>$external_link_tail" : $text;
%%

and replace with:
%%(php)
$url_parts = parse_url($url);
$base_parts = parse_url($this->config['base_url']);

if($url_parts['host'] != $base_parts['host'])
{
$external_link_tail = $this->GetConfigValue("external_link_tail");
return $url ? "<a class=\"ext\" href=\"$url\">$text</a>$external_link_tail" : $text;
}
else
{
return $url ? "<a href=\"$url\">$text</a>" : $text;
}
%%

Basically, this hack is getting the base host of the url in question, and comparing that against the base host of the Wikka install. If they're different, the link is identified as an external link. Otherwise, its presented as a regular link.
----


Revision [4601]

Edited on 2005-01-13 18:21:20 by KickTheDonkey [added Category user link]
Additions:
Back to CategoryUsers
Deletions:
----


Revision [4518]

Edited on 2005-01-12 13:45:29 by KickTheDonkey [added external link hack]
Additions:
Want a gmail invite? I've got'em in spades...
----
====Tricks I've learned====
Here are some nifty hacks I've done to Wikka:
- Preventing links to the current host as being marked as 'external'. For instance, you've got Wikka installed at ""http://some.host.com/wikka/"" and you link to a file ""http://some.host.com/files/file.txt"". I didn't like the fact that Wikka marked it as 'external'. Yes, its external to Wikka, but not external to the site. So, here's a little hack to make Wikka match my personal preference:


Find this line in wikka.php in the Wikka::Link method (around link 475, I believe):
%%(php)
$external_link_tail = $this->GetConfigValue("external_link_tail");
return $url ? "<a class=\"ext\" href=\"$url\">$text</a>$external_link_tail" : $text;
%%
and replace with:
%%(php)
$url_parts = parse_url($url);
$base_parts = parse_url($this->config['base_url']);
if($url_parts['host'] != $base_parts['host'])
{
$external_link_tail = $this->GetConfigValue("external_link_tail");
return $url ? "<a class=\"ext\" href=\"$url\">$text</a>$external_link_tail" : $text;
}
else
{
return $url ? "<a href=\"$url\">$text</a>" : $text;
}
%%
Basically, this hack is getting the base host of the url in question, and comparing that against the base host of the Wikka install. If they're different, the link is identified as an external link. Otherwise, its presented as a regular link.
----
Deletions:
Want a gmail invite? I've got'em in spades...


Revision [2983]

The oldest known version of this page was created on 2004-12-08 16:00:54 by KickTheDonkey [added external link hack]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki