[pmwiki-users] Simple TimeStamper "tool"

Sivakatirswami katir at hindu.org
Wed Sep 5 16:26:09 CDT 2007


Sivakatirswami wrote:
> Requirement:
> 
> A "tool" that posts a non-volatile date-time stamp
> at the location of the user's cursor. In bold...
> 
>   This wants to be an additional icon
> the existing GUI mark up icons in the edit window.


OK, I think I figured out how to do this...
at least the "method" but not all parts.


$GUIButtons['h2'] = array(400, '\\n!! ', '\\n', '$[Heading]',
                      '$GUIButtonDirUrlFmt/h2.gif"$[Heading]"');

http://pmwiki.org/wiki/Cookbook/GuiEdit

is fairly self-explanatory.

The only thing I don't know how to do is how to get
this to insert the current time stamp.

and apparently there is a "discussion" on this very need
begun on that page:

     * Signature/datestamp for discussion  (imageΔ only for 22x22 set)

    $GUIButtons['sig'] = array(460, '----\\n~~~:\\\\\\\\\n', '\\n 
~~~~\\n\\n', '',
                   '$GUIButtonDirUrlFmt/sig.gif"$[Stamp your name and 
current date]"');


I think I can get this working, but need help with this part:

in place of the "~~~" and "~~~~~" should we put the person's
Initials and some PHP variable(s) in the other?
And what if you just want a timestamp only (other wise
you need one button for each author...)


>  From the GUI buttons to set mark up from icons at the
> top of the page that targets selected text in the edit window
> one would infer this to be doable.
> 
> Context:
> 
> developers are making notes on web server admin pages, updates etc.
> 
> Typically we top post on "chronology" pages that log
> activity with links  to other pages if more detail is required.
> This constitutes a rather unstructured (occasionally chaotic)
> but effective "documentation"- we know the basics:
> what happened, when it happened and details as needed.
> if you need to look something up you can simply search the
> wiki...
> 
> This minimalist system requires at least one formal element:
> 
> A date stamp at the point where someone
> is making an entry.. this will typicallly be near the top.
> 
> But there are times when the entry could be anywhere
> down the page (as when someone is commenting today
> on an entry that may have been made 2 months ago...)
> 
> <Example: (this is a real entry)>
> 
> !!!Web Mirrors
> 
> '''Chronology, current issues'''
> 
> (latest entries on top, thank you)
> 
> --------
> 20070901-00:26 #time stamp here... I would prefer more human readable format
> 
> I went ahead and ran some commands to fix the file privs.
> I also installed a script and cronned it for 01:00 nightly.
> Commands that were run:
> 
> cd /Volumes/Varuna/WWW/*Sites
> chown -R :staff *
> chmod -R 664 *
> -------------
> </Example>
> 
> I could install EZdate
> 
> (:ezdate M j, Y h:i:s a:)
> 
> and get a human readable stamp: Apr 4, 2007 04:56:36 am
> 
>   but
> 
> 1) still requires manual entry- we need a hot link in the edit window.
> 2) it's not clear to me if the user returns to the page if the recipe 
> retains the date when
> it was first entered  (which is required)  or if the recipe will reflect 
> the current date
> 3) and I would prefer ISO standard: YYYY-MM-DD HH-MM-SS (which I believe 
> would
> be possible with simply swapping around the format variables)
> 
> Ideas?
> 
> TIA
> 
> Sivakatirswami
> 
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
> 

-- 
Om shanti
(In  Peace)

Sivakatirswami
www.himalayanacademy.com

Get Hinduism Today Digital Edition. It's Free!
http://www.hinduismtoday.com/digital/



More information about the pmwiki-users mailing list