Wiki source for ImageShackUpload


Show raw source

====Insert ""ImageShack"".us upload form on page in an iframe ====
by DavePreston

One of the ways I wanted to make life easier for my users was to try to make it easier for them to insert remotely-hosted images.

The first step was to create a simple action to insert an ""ImageShack"" upload form (see http://reg.imageshack.us/content.php?page=syndicate) on a wiki page thus...

%%(php)
<?php
/**
* imageshack.php
* Insert ImageShack.us upload form on page in an iframe
* for details, terms & conditions etc visit http://reg.imageshack.us/content.php?page=syndicate
*
* Usage {{imageshack txtcolor="224466" w="280" h="70"}}
* (All parameters are optional)
* (txtcolor takes an rgb colour without the # : default is ImageShack default)
* (w is iframe width : default is ImageShack default)
* (h is iframe height : default is ImageShack default)
*
* DavePreston (www.davepreston.me.uk)
*/

(!empty($vars['txtcolor'])) ? $txtcolor=$vars['txtcolor']: $txtcolor="111111";
(!empty($vars['w'])) ? $w=$vars['w']: $w="300";
(!empty($vars['h'])) ? $h=$vars['h']: $h="90";

echo "<iframe src=\"http://imageshack.us/iframe.php?txtcolor=$txtcolor&type=blank\" scrolling=\"no\" frameborder=\"0\" width=\"$w\" height=\"$h\"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>";

?>
%%

Then I created a page using this action to display the form and giving some help on using images hosted by ""ImageShack"" on wikka pages.

----
CategoryUserContributions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki