GuiEditDateButton-Talk

Summary: Talk page for GuiEditDateButton.
Maintainer: noe
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

  • Not requiring a full calendar application, but just a method to quickly insert the current date and time, the following button definition works for me.
 $GUIButtons['sig'] = array(660, '\\n\\n* Change Log on $CurrentTime by $Author\\n\\n->', '\\n\\n', '$[Log Entry]',
                    '$GUIButtonDirUrlFmt/sig.gif"$[Insert Change Log on <CurrentTime> by <Author>]"');
Just append to /local/config.php, mod the text and formating to suite. It will insert at the current cursor location. Use whatever icon you like. $CurrentTime I believe is a standard variable set in pmwiki.php with the following:
$Now=time();
$TimeFmt = '%B %d, %Y, at %I:%M %p';
SDV($CurrentTime,strftime($TimeFmt,$Now));
$Author may also be a standard variable, but I'm not 100% sure what it will return if you don't have logins enable as our site has. Note, however, that the $CurrentTime variable will be set at the time the edit window was initialized and does not increment during the session. Hope this is a useful solution for different needs.

Advice: If you are using this element as a GUI button, then don't forget to copy the calendar.js, calendar-win2k-cold-1.css, jscalendar-pmwiki.js and the lang directory into the directory of the skin that you are using or you will never get it to work. A must have on all wikisites!Real Chris October 27, 2008, at 07:36 AM


Talk page for the GuiEditDateButton recipe (users?).