bitweaver
Wiki
wiki Home
List Pages
wiki Books
Orphan Pages
wiki Rankings
Photos
List Galleries
Forums
Browse forums
Files
List Galleries
Categories
List Categories
Sign In
Message Boards
»
08. Support - General talk
Newest
Oldest
Threaded
5
10
20
50
100
All
Messages
Unable to edit QuickTags; "__" in links
Post Reply
Dan
Joined: 30 Apr 2006
Unable to edit QuickTags; "__" in links
Posted:02 May 2006 (15:45 UTC)
xing
Joined: 07 Mar 2004
Posted:02 May 2006 (18:02 UTC)
Dan
Joined: 30 Apr 2006
Posted:03 May 2006 (14:45 UTC)
Dan
Joined: 30 Apr 2006
Posted:04 May 2006 (20:36 UTC)
Post Reply
Page 1 of 1
1
Post
Title
Login
If you are already registered, please enter your login credentials.
Your Name
Anonymous Post
Content Format
Tiki Wiki Syntax
Allow HTML
{quote format_guid="bbcode" comment_id="6458" user="Dan"}I came up with a kludge for this which seems to work. However, I wouldn't recommend it to anyone who doesn't have to worry about double underscores in their external links. The bold-insert Quicktag isn't affected. Just those links: In /liberty/plugins/format.tikiwiki.php (around line 1279), change [code:1:83aba0c86d] // Replace bold text $line = preg_replace("/__(.*?)__/", "<b>$1</b>", $line); $line = preg_replace("/\'\'(.*?)\'\'/", "<i>$1</i>", $line); // Replace definition lists $line = preg_replace("/^;([^:]+):([^\n]+)/", "<dl><dt>$1</dt><dd>$2</dd></dl>", $line); if (0) { $line = preg_replace("/\[([^\|]+)\|([^\]]+)\]/", "<a $class href='$1'>$2</a>", $line); // Segundo intento reemplazar los [link] comunes $line = preg_replace("/\[([^\]]+)\]/", "<a $class href='$1'>$1</a>", $line); $line = preg_replace("/\-\=([^=]+)\=\-/", "<div class='bitbar'>$1</div>", $line); } [/code:1:83aba0c86d] to [code:1:83aba0c86d] // BEGIN_kludge for problematic external links // ADDED_LINE: Temporarily replace "__"s in external links $line = preg_replace("/(\:\/\/\S+)__/", "$1DblUnDrScR", $line); // Replace bold text $line = preg_replace("/__(.*?)__/", "<b>$1</b>", $line); $line = preg_replace("/\'\'(.*?)\'\'/", "<i>$1</i>", $line); // Replace definition lists $line = preg_replace("/^;([^:]+):([^\n]+)/", "<dl><dt>$1</dt><dd>$2</dd></dl>", $line); if (0) { $line = preg_replace("/\[([^\|]+)\|([^\]]+)\]/", "<a $class href='$1'>$2</a>", $line); // Segundo intento reemplazar los [link] comunes $line = preg_replace("/\[([^\]]+)\]/", "<a $class href='$1'>$1</a>", $line); $line = preg_replace("/\-\=([^=]+)\=\-/", "<div class='bitbar'>$1</div>", $line); } // ADDED_LINE: Restore "__"s in external links $line = str_replace("DblUnDrScR", "__", $line); // ADDED_LINE: Remove <b>...</b> in external links' URIs $line = preg_replace("/(href='\S+)<b>(\S+|[^']+)<\/b>/", "$1__$2__", $line); // END_kludge [/code:1:83aba0c86d] Again, this is only a possibly dubious workaround for that very rare type of external link. Dan{/quote}
Recent Page Changes
welcome to bitweaver.org
Bitweaver Overview
ReleaseTwo Schema Changelog 2006
PressReleaseOne
Spider's Web
Press Release Two
BitcommercePackage
InfiniBand vs Ethernet Performance
InfiniBand for Dummies
Show More…