Revision [16809]

This is an old revision of SmiliesAction made by JsnKs3 on 2007-05-31 10:49:59.

 

New image action


This is a general purpose image action but since it was created out of the need to add emoticons or smilies in Wikka I named the page Smilies Action.





This new image action improves:
  1. simpler syntax (debatable you might say) - don't need to specify parameter names
  1. smaller code in database
  1. more readable (older version looks a lot like html code)
  1. don't need to remember image's extension or folder
  1. can be configured to add more image directories or image extensions

disadvantages:
  1. not standard way to pass and handle parameters (does this have any other implications)
  1. add more if like

Compare the two actions that result to the same thing.

the integrated image action:
DVD logo


the new image action:
Unknown action ""i""



here is the action save it as actions/i.php
%%(php)
<?php
? is there a better way to do this
foreach ($vars as $param => $value) {
list($src,$title,$link,$class,$alt)=explode(";",$value);
}

icon dirs and extension to check
$iconDirs = array("smilies", "images","flags");
$exts = array("gif","jpg","png");

if ($src
There are 2 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki