Revision history for AbbreviationAction


Revision [18389]

Last edited on 2008-01-28 00:11:14 by DarTar [Modified links pointing to docs server]

No Differences

Revision [8123]

Edited on 2005-05-14 10:12:44 by DarTar [Adding link]
Additions:
=====Abbreviation Action=====

>>==See also:==
~-Documentation: AbbreviationActionInfo
~-Alternative approach: AcronymFormatter
>>This is the development page for the abbreviation action.::c::

The php code:
%%(php)
<?php
/**
* Create a <abbr> or <acronym> link.
*
* Usage: {{abbr type="acronym" short="IMHO" long="In My Humble Opinion"}}
*
* @package Actions
* @subpackage
* @name abbr
*
* @author {@link http://wikka.jsnx.com/ChristianBarthelemy Christian Barthelemy} - original idea and code.
* @version 0.1
* @since Not (yet?) part of offical Wikka release
*
* @input string $type optional: the type of abbreviation
* default is abbr any other value means acronym - will be used as the html tag and as the name of the class too
*
* @input string $short required: the short writting that needs to be explained
*
* @input string $long optional: the long text to explain the meaning of the short one
* default is empty - it assumes that it has been previously provided in the same page
*
* @todo Nothing I can think about for now.
*
*/

// set defaults
$type = "abbr";
$output = "";

// ***** PARAMETERS Interface *****
$uType = $vars['type'];
if ($uType) $type = "acronym";

$uShort = $vars['short'];
if ($uShort) $short = $uShort;

$uLong = $vars['long'];
if ($uLong) $long = $uLong;
// ***** end PARAMETERS Interface *****

// ***** HTML code generation *****
// if short parameter hasn't been provided nothing is done
if ($short) {
$output="<".$type." class=\"".$type."\" ";
if ($long) {$output.="TITLE=\"".$long."\">";}
$output.=$short."</".$type.">";
}
// ***** end HTML code generation *****
print $output;
?>
%%

The added css (example):
%%(css)
.abbr {
color: red;
cursor: hand;
}

.acronym {
color: red;
cursor: hand;
}
%%
----
Deletions:
=====Abbreviation Action=====

>>==See also:==
Documentation: AbbreviationActionInfo.>>This is the development page for the abbreviation action.::c::

The php code:
%%(php)
<?php
/**
* Create a <abbr> or <acronym> link.
*
* Usage: {{abbr type="acronym" short="IMHO" long="In My Humble Opinion"}}
*
* @package Actions
* @subpackage
* @name abbr
*
* @author {@link http://wikka.jsnx.com/ChristianBarthelemy Christian Barthelemy} - original idea and code.
* @version 0.1
* @since Not (yet?) part of offical Wikka release
*
* @input string $type optional: the type of abbreviation
* default is abbr any other value means acronym - will be used as the html tag and as the name of the class too
*
* @input string $short required: the short writting that needs to be explained
*
* @input string $long optional: the long text to explain the meaning of the short one
* default is empty - it assumes that it has been previously provided in the same page
*
* @todo Nothing I can think about for now.
*
*/

// set defaults
$type = "abbr";
$output = "";

// ***** PARAMETERS Interface *****
$uType = $vars['type'];
if ($uType) $type = "acronym";

$uShort = $vars['short'];
if ($uShort) $short = $uShort;

$uLong = $vars['long'];
if ($uLong) $long = $uLong;
// ***** end PARAMETERS Interface *****

// ***** HTML code generation *****
// if short parameter hasn't been provided nothing is done
if ($short) {
$output="<".$type." class=\"".$type."\" ";
if ($long) {$output.="TITLE=\"".$long."\">";}
$output.=$short."</".$type.">";
}
// ***** end HTML code generation *****
print $output;
?>
%%

The added css (example):
%%(css)
.abbr {
color: red;
cursor: hand;
}

.acronym {
color: red;
cursor: hand;
}
%%
----


Revision [5315]

Edited on 2005-01-28 10:43:38 by NilsLindenberg [cat. changed]
Additions:
CategoryUserContributions
Deletions:
CategoryDevelopment


Revision [5303]

Edited on 2005-01-28 07:09:23 by ChristianBarthelemy [How to display an explanation for an abbreviation when mouse over it]
Additions:
=====Abbreviation Action=====
Documentation: AbbreviationActionInfo.>>This is the development page for the abbreviation action.::c::
The php code:
%%(php)
<?php
/**
* Create a <abbr> or <acronym> link.
*
* Usage: {{abbr type="acronym" short="IMHO" long="In My Humble Opinion"}}
*
* @package Actions
* @subpackage
* @name abbr
*
* @author {@link http://wikka.jsnx.com/ChristianBarthelemy Christian Barthelemy} - original idea and code.
* @version 0.1
* @since Not (yet?) part of offical Wikka release
*
* @input string $type optional: the type of abbreviation
* default is abbr any other value means acronym - will be used as the html tag and as the name of the class too
*
* @input string $short required: the short writting that needs to be explained
*
* @input string $long optional: the long text to explain the meaning of the short one
* default is empty - it assumes that it has been previously provided in the same page
*
* @todo Nothing I can think about for now.
*
*/
// set defaults
$type = "abbr";
$output = "";
// ***** PARAMETERS Interface *****
$uType = $vars['type'];
if ($uType) $type = "acronym";
$uShort = $vars['short'];
if ($uShort) $short = $uShort;
$uLong = $vars['long'];
if ($uLong) $long = $uLong;
// ***** end PARAMETERS Interface *****
// ***** HTML code generation *****
// if short parameter hasn't been provided nothing is done
if ($short) {
$output="<".$type." class=\"".$type."\" ";
if ($long) {$output.="TITLE=\"".$long."\">";}
$output.=$short."</".$type.">";
}
// ***** end HTML code generation *****
print $output;
?>
%%
The added css (example):
%%(css)
.abbr {
color: red;
cursor: hand;
}
.acronym {
color: red;
cursor: hand;
}
%%
Deletions:
=====Enhances Image Action=====
Documentation: EnhancedImageActionInfo.>>This is the development 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 [5301]

The oldest known version of this page was created on 2005-01-28 06:56:28 by ChristianBarthelemy [How to display an explanation for an abbreviation when mouse over it]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki