Revision history for SigAction
Additions:
See PseudoFormatters for a better way of adding a signature...
Deletions:
----
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);
?>
%%
Additions:
Temporary holding place for a potential action...
Additions:
----
----
----
----
----