From: <var...@us...> - 2009-08-05 15:06:24
|
Revision: 7058 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7058&view=rev Author: vargenau Date: 2009-08-05 15:06:15 +0000 (Wed, 05 Aug 2009) Log Message: ----------- Add predefined icons (icons taken or adapted from Mediawiki commons) Modified Paths: -------------- trunk/lib/InlineParser.php Added Paths: ----------- trunk/pgsrc/Help%2FPredefinedIcons trunk/themes/default/images/ic_biggrin.png trunk/themes/default/images/ic_bluestar.png trunk/themes/default/images/ic_check.png trunk/themes/default/images/ic_cross.png trunk/themes/default/images/ic_danger.png trunk/themes/default/images/ic_greenstar.png trunk/themes/default/images/ic_handno.png trunk/themes/default/images/ic_handyes.png trunk/themes/default/images/ic_help.png trunk/themes/default/images/ic_info.png trunk/themes/default/images/ic_lightoff.png trunk/themes/default/images/ic_lighton.png trunk/themes/default/images/ic_minus.png trunk/themes/default/images/ic_plus.png trunk/themes/default/images/ic_redstar.png trunk/themes/default/images/ic_sad.png trunk/themes/default/images/ic_smile.png trunk/themes/default/images/ic_tongue.png trunk/themes/default/images/ic_wink.png trunk/themes/default/images/ic_yellowstar.png Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-08-05 09:48:51 UTC (rev 7057) +++ trunk/lib/InlineParser.php 2009-08-05 15:06:15 UTC (rev 7058) @@ -1019,6 +1019,36 @@ function markup ($match) { $page = substr($match,2,-2); + + // Check for predefined icons. + $predefinedicons = array(":)" => "ic_smile.png", + ":(" => "ic_sad.png", + ":P" => "ic_tongue.png", + ":D" => "ic_biggrin.png", + ";)" => "ic_wink.png", + "(y)" => "ic_handyes.png", + "(n)" => "ic_handno.png", + "(i)" => "ic_info.png", + "(/)" => "ic_check.png", + "(x)" => "ic_cross.png", + "(!)" => "ic_danger.png", + "(+)" => "ic_plus.png", + "(-)" => "ic_minus.png", + "(?)" => "ic_help.png", + "(on)" => "ic_lighton.png", + "(off)" => "ic_lightoff.png", + "(*)" => "ic_yellowstar.png", + "(*r)" => "ic_redstar.png", + "(*g)" => "ic_greenstar.png", + "(*b)" => "ic_bluestar.png", + "(*y)" => "ic_yellowstar.png", + ); + foreach ($predefinedicons as $ascii => $icon) { + if (trim($page) == $ascii) { + return LinkImage("/wiki/themes/default/images/$icon", $page); + } + } + if (strpos($page, "|") === false) { $imagename = $page; $alt = ""; Added: trunk/pgsrc/Help%FPredefinedIcons =================================================================== --- trunk/pgsrc/Help%2FPredefinedIcons (rev 0) +++ trunk/pgsrc/Help%2FPredefinedIcons 2009-08-05 15:06:15 UTC (rev 7058) @@ -0,0 +1,22 @@ +Date: Wed, 5 Aug 2009 18:54:09 +0000 +Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) +X-Rcs-Id: $Id$ +Content-Type: application/x-phpwiki; + pagename=Help%2FPredefinedIcons; + flags=PAGE_LOCKED%2CEXTERNAL_PAGE; + markup=2; + charset=iso-8859-1 +Content-Transfer-Encoding: binary + +Phpwiki allows you to easily include some **predefined icons** in your wiki pages. + +The following icons are available: + +|= Notation | ##~{{:)}}## | ##~{{:(}}## | ##~{{:P}}## | ##~{{:D}}## | ##~{{;)}}## | ##~{{(y)}}## | ##~{{(n)}}## | ##~{{(i)}}## | ##~{{(/)}}## | ##~{{(x)}}## | ##~{{(!)}}## +|= Image | {{:)}} | {{:(}} | {{:P}} | {{:D}} | {{;)}} | {{(y)}} | {{(n)}} | {{(i)}} | {{(/)}} | {{(x)}} | {{(!)}} + +----- + +|= Notation | ##~{{(+)}}## | ##~{{(-)}}## | ##~{{(?)}}## | ##~{{(on)}}## | ##~{{(off)}}## | ##~{{(*)}}## | ##~{{(*r)}}## | ##~{{(*g)}}## | ##~{{(*b)}}## | ##~{{(*y)}}## +|= Image | {{(+)}} | {{(-)}} | {{(?)}} | {{(on)}} | {{(off)}} | {{(*)}} | {{(*r)}} | {{(*g)}} | {{(*b)}} | {{(*y)}} + Property changes on: trunk/pgsrc/Help%2FPredefinedIcons ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/default/images/ic_biggrin.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_biggrin.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_bluestar.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_bluestar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_check.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_check.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_cross.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_cross.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_danger.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_danger.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_greenstar.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_greenstar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_handno.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_handno.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_handyes.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_handyes.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_help.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_help.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_info.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_info.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_lightoff.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_lightoff.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_lighton.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_lighton.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_minus.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_minus.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_plus.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_plus.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_redstar.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_redstar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_sad.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_sad.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_smile.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_smile.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_tongue.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_tongue.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_wink.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_wink.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_yellowstar.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_yellowstar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |