Revision history for SigAction


Revision [20610]

Last edited on 2009-05-12 09:41:35 by PezHore
Additions:
See PseudoFormatters for a better way of adding a signature...
Deletions:
=====Sig Action=====
----
Temporary holding place for a potential action...

**Description:** Action that displays signature based on either the logged in username (default), or a specified user ($user)

=====Features=====
----
Displays signature as "- UserName, mm/dd/yyy"

=====Code=====
----
%%(php;1)
<?php
/**
* Sig Action
*
* Usage:
* {{sig}} - Displays signature with default username
* {{age user="name goes here"}} - Displays signature with specified username
*
* Version 0.1
* @input string $user Optional: username
* @uses Wakka::ReturnSafeHTML()
* @todo Add more featuers?
*
* Changelog
* 0.1 Initial revision
*/

// Get user from parameter
$user = (string)trim($this->htmlspecialchars_ent($vars['user']));

if (!$user) {
$username = $this->FormatUser($this->reg_username); // Defaults to username
} else {
$username = $user; // Use passed user variable for username
}

// Get current year, month, and day.
list($this_year, $this_month, $this_day) = explode(' ',date('Y n j'));

// Set signature
$sig = "- ".$username.", ".$this_month."/".$this_day."/".$this_year;

echo $this->ReturnSafeHTML($sig);

?>

%%


Revision [20606]

Edited on 2009-05-11 09:57:27 by PezHore
Additions:
Temporary holding place for a potential action...


Revision [20605]

Edited on 2009-05-11 08:18:44 by PezHore
Additions:
----
----
----


Revision [20602]

The oldest known version of this page was created on 2009-05-11 08:14:40 by PezHore
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki