Revision history for EnhancedImageActionInfo


Revision [18955]

Last edited on 2008-01-28 00:13:28 by DotMG [Modified links pointing to docs server]

No Differences

Revision [15365]

Edited on 2006-09-28 08:56:55 by DotMG [Make getimagesize configurable and optimize (checked once)]
Additions:
=====Enhanced Image Action Documentation=====
//Not Included in official Wikka version//

>>==See also:==
Development: EnhancedImageAction.>>This is the documentation page for the enhanced image action.::c::

===Why a modification to the image action?===
The aim of this enhancement to the official image action is to:
- support HEIGTH and WIDTH parameters
- allow to create a link opening a new html page to display a full size image

===Usage===
Just use the action as usual (AddingImages) and add the optional parameters:
- WIDTH to define the width of the image to be displayed
- HEIGTH to define the heigth of the image to be displayed
- OPENFULL will create an anchor link to the image URL that will open a new html page to display the full size image when clicking on the picture
All 3 new parameters are optionals - OPENFULL is considered as TRUE when different from nothing.

""{{image class="center" alt="blabla" title="blabla" width="25" heigth="12" openfull="whatever"}}""

===Debate===
& getimagesize() is nice, but should not be called each time page is rendered. It should be checked only when submitting the page. It must also be configurable, to avoid errormessage for people who use Wikka within an intranet (Generally, an intranet server is not connected to the external world, but client browsers are). -- DotMG.

----
Deletions:
=====Enhanced Image Action Documentation=====
//Not Included in official Wikka version//

>>==See also:==
Development: EnhancedImageAction.>>This is the documentation page for the enhanced image action.::c::

===Why a modification to the image action?===
The aim of this enhancement to the official image action is to:
- support HEIGTH and WIDTH parameters
- allow to create a link opening a new html page to display a full size image

===Usage===
Just use the action as usual (AddingImages) and add the optional parameters:
- WIDTH to define the width of the image to be displayed
- HEIGTH to define the heigth of the image to be displayed
- OPENFULL will create an anchor link to the image URL that will open a new html page to display the full size image when clicking on the picture
All 3 new parameters are optionals - OPENFULL is considered as TRUE when different from nothing.

""{{image class="center" alt="blabla" title="blabla" width="25" heigth="12" openfull="whatever"}}""

----


Revision [5323]

Edited on 2005-01-28 12:00:03 by NilsLindenberg [cat. changed]
Additions:
CategoryUserContributions
Deletions:
CategoryDocumentation


Revision [5309]

Edited on 2005-01-28 09:58:51 by ChristianBarthelemy [Simple enhancement to the image action]
Additions:
===Why a modification to the image action?===
The aim of this enhancement to the official image action is to:
- support HEIGTH and WIDTH parameters
- allow to create a link opening a new html page to display a full size image
===Usage===
Just use the action as usual (AddingImages) and add the optional parameters:
- WIDTH to define the width of the image to be displayed
- HEIGTH to define the heigth of the image to be displayed
- OPENFULL will create an anchor link to the image URL that will open a new html page to display the full size image when clicking on the picture
All 3 new parameters are optionals - OPENFULL is considered as TRUE when different from nothing.
""{{image class="center" alt="blabla" title="blabla" width="25" heigth="12" openfull="whatever"}}""
Deletions:
The code here below is just a quick modification to the offical image action code.
%%(php)
<?php
/*
"image" action
Parameters:
url - URL of image to be embedded
link - target link for image (optional). Supports URL, WikiName links, InterWiki links etc.
title - title text displayed when mouse hovers above image
class - a class for the image
alt - an alt text
width - optional width
heigth - optional heigth
openfull - if different from nothing it will link to open the full size image in a new window
*/
if (is_array($vars))
{
foreach ($vars as $param => $value)
{
if ($param == 'src' and $vars['url'] == '') {$vars['url']=$value;}
if ($param == 'title') {$title=$this->htmlspecialchars_ent($vars['title']);}
if ($param == 'class') {$class=$this->htmlspecialchars_ent($vars['class']);}
if ($param == 'alt') {$alt=$this->htmlspecialchars_ent($vars['alt']);}
if ($param == 'width') {$alt=$this->htmlspecialchars_ent($vars['width']);}
if ($param == 'heigth') {$alt=$this->htmlspecialchars_ent($vars['heigth']);}
}
}
$url = $this->cleanUrl(trim($vars['url']));
$output="";
if ($openfull) {$output.="<a href=\"".$url."\" target=\"_blank\" >";}
$output.="<img ";
if ($class) {$output.="class=\"".$class."\" ";}
$output.="src=\"".$url."\" ";
if ($alt) {$output.="alt=\"".$alt."\" ";}
if ($title) {$output.="title=\"".$title."\" ";}
if ($width) {$output.="width=\"".$width."\" ";}
if ($heigth) {$output.="heigth=\"".$heigth."\" ";}
$output.=" />";
if ($openfull) {$output.="<a>";}
// link?
if ($link = $vars['link'])
{
$output = $this->Link($link, "", $output, 1, 0, 0);
}
$output = $this->ReturnSafeHTML($output);
print($output);
?>
%%


Revision [5298]

Edited on 2005-01-28 06:52:39 by ChristianBarthelemy [Simple enhancement to the image action]
Additions:
=====Enhanced Image Action Documentation=====
//Not Included in official Wikka version//
Development: EnhancedImageAction.>>This is the documentation page for the enhanced image action.::c::
The code here below is just a quick modification to the offical image action code.
%%(php)
<?php
/*
"image" action
Parameters:
url - URL of image to be embedded
link - target link for image (optional). Supports URL, WikiName links, InterWiki links etc.
title - title text displayed when mouse hovers above image
class - a class for the image
alt - an alt text
width - optional width
heigth - optional heigth
openfull - if different from nothing it will link to open the full size image in a new window
*/
if (is_array($vars))
{
foreach ($vars as $param => $value)
{
if ($param == 'src' and $vars['url'] == '') {$vars['url']=$value;}
if ($param == 'title') {$title=$this->htmlspecialchars_ent($vars['title']);}
if ($param == 'class') {$class=$this->htmlspecialchars_ent($vars['class']);}
if ($param == 'alt') {$alt=$this->htmlspecialchars_ent($vars['alt']);}
if ($param == 'width') {$alt=$this->htmlspecialchars_ent($vars['width']);}
if ($param == 'heigth') {$alt=$this->htmlspecialchars_ent($vars['heigth']);}
}
}
$url = $this->cleanUrl(trim($vars['url']));
$output="";
if ($openfull) {$output.="<a href=\"".$url."\" target=\"_blank\" >";}
$output.="<img ";
if ($class) {$output.="class=\"".$class."\" ";}
$output.="src=\"".$url."\" ";
if ($alt) {$output.="alt=\"".$alt."\" ";}
if ($title) {$output.="title=\"".$title."\" ";}
if ($width) {$output.="width=\"".$width."\" ";}
if ($heigth) {$output.="heigth=\"".$heigth."\" ";}
$output.=" />";
if ($openfull) {$output.="<a>";}
// link?
if ($link = $vars['link'])
{
$output = $this->Link($link, "", $output, 1, 0, 0);
}
$output = $this->ReturnSafeHTML($output);
print($output);
?>
%%
Deletions:
[[WikkaDocumentation Wikka Documentation]]
=====xxxxx Action Documentation=====
//Included in Wikka since version X.X.X.X//
Development: xxxxxAction.>>This is the documentation page for the xxxxx action.::c::
//This page is a **template**. It belongs to CategoryTemplate (which contains more handy templates). To create an **action documentation** page, [[http://wikka.jsnx.com/ActionInfoTemplate/clone clone this page]] to a page called **xxxxxActionInfo** (where xxxxx is the (capitalized) name of the action), replace all occurrences of 'xxxxx' with the name of the action and replace this paragraph with the actual content.//
__Note__: Please **remove** the "Wikka Documentation" link at the top and the "included in Wikka" note unless and until the action is part of the official Wikka distribution!


Revision [5294]

The oldest known version of this page was created on 2005-01-28 06:37:18 by ChristianBarthelemy [Simple enhancement to the image action]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki