Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

FoxShoutboxAlternative

Summary: An alternative Shoutbox
Version: v0.1
Prerequisites: Pmwiki 2.x, Fox
Status: Tested
Maintainer: Forceflow
Categories:Forms Fox

Questions answered by this recipe

  • How do I implement a basic shoutbox on my wiki, which allows user communication ?

Description

Fox forms shoutbox

Notes

The solution on Shoutbox is very nice, but I added some improvements due to problems I encountered whilst implementing it on a personal wiki:

  • Input checking: Checks whether or not sensible (non-spaces) input was given
  • Link to author profile: Adds a link to the author profile to the message
  • Success/Fail messages
  • Summary message in recentchanges

Don't want to steal the other author's thunder though ! :)

Installation

Copy the following code on a page which you will provide to your users for entering shoutbox content. (The Sidebar, for example). You can change ShoutBox to a name of a page you'd like to post shouts to. Be sure that the Fox security settings were configured properly.

>>font-size:10px<<
(:include ShoutBox lines=8:)
>><<

(:if ! equal {$Author} "":)
(:fox shoutbox put=top target=ShoutBox foxsuccess='Posted succesfully !':)
(:foxcheck shout regex='\w' msg='No sensible input':)
(:input hidden author value='{$Author}' :) 
(:input hidden csum value='posted shoutbox message':)
%center%(:input text class=shoutbox shout cols=20 rows=2:)
%center%(:input submit post Submit:)
%right%[[ShoutBox | more]]
(:foxtemplate "'''[[Profiles/{$$author}]]''': {$$shout} - [-''{(ftime fmt="%d/%m %H:%M")}''-] [[<<]]":)
(:foxend shoutbox:)
(:if:)
'-%red%(:foxmessage shoutbox list=check:)%%-'
'-%green%(:foxmessage shoutbox list=nocheck:)%%-'

Release Notes

  • 12/06/08
    • Initial release.
    • Added summary message to show up in Recent Changes

See Also

Contributors

Comments

Could you please provide an example of how it looks? (by the way, thanks for not locking this page's interaction as the author of regular shoutbox has). -Chris November 23, 2008, at 06:20 AM

22-Nov-2008 DaveG: Not sure what the intent of "cols" and "rows" on the INPUT tag is, but the correct attribute for INPUT tags would be "size" -- you can't really define 'rows' for INPUTs. Thus:

%center%(:input text class=shoutbox shout size=40:)

Edit - History - Print - Recent Changes - Search
Page last modified on November 22, 2008, at 08:43 PM