Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

BaseUserAction Class Reference
[Base Objects]

Inheritance diagram for BaseUserAction:

MyObject BaseObject MyModule BaseModule List of all members.

Detailed Description

Actions are to give the user more ways to interact.

Through this simple interface, they can give each other high fives, kisses, slaps, thumbs up/down and more. You can easily add your own options too. Its integrated with the Alert system.

Definition at line 11 of file base-user-action.inc.php.

Public Member Functions

 __construct ($data=null, $table= 'user_actions')
 construct our action.
 drawActionsBox ($user)
 draw the action box for a user.
 getPagesXml ()
 add in our custom pages
 initDoActionPage ()
 prep our do action page.
 drawDoActionPage ()
 draw our do action page
 initMessagePage ()
 Prep our message adding page.
 drawMessagePage ()
 draw our message adding page
 createMessageForm ()
 get our form for adding messages to the action
 canView ()
 you can only view it if you are the recipient
 initViewPage ()
 prep our view page
 drawViewPage ()
 draw our view page.
 drawRow ()
 draw our row with a link to view
 getMessage ()
 get the action text and message
 getRssItem ()
 automatic RSS of user actions!
 getPublicData ()
 easy api access too...
 getCreateFieldsArray ()
 not to mention it will show you how to create the db too
 getCreateIndexesArray ()
 we need indexes too

Static Public Member Functions

 cleanAction ($action)
 clean an action key for display

Static Public Attributes

 $actions
 this holds all of the actions that one can do.

Protected Member Functions

 getDeletePageXml ()
 no delete page
 getEditPageXml ()
 no edit page


Member Function Documentation

BaseUserAction::__construct data = null,
table = 'user_actions'
 

construct our action.

you'll want to add any custom actions in here.

See also:
BaseObject::__construct()

Reimplemented from BaseObject.

Definition at line 39 of file base-user-action.inc.php.

BaseUserAction::canView  ) 
 

you can only view it if you are the recipient

Returns:
bool if you can view it

Reimplemented from BaseObject.

Definition at line 220 of file base-user-action.inc.php.

BaseUserAction::cleanAction action  )  [static]
 

clean an action key for display

Parameters:
$action the text of the action
Returns:
the action with underscores removed ready for display

Definition at line 66 of file base-user-action.inc.php.

BaseUserAction::createMessageForm  ) 
 

get our form for adding messages to the action

Returns:
a Form for adding the message in

Definition at line 196 of file base-user-action.inc.php.

References BaseModule::getUrl().

Referenced by drawDoActionPage(), and drawMessagePage().

BaseUserAction::drawActionsBox user  ) 
 

draw the action box for a user.

Parameters:
$user a BaseUser derived object.

Definition at line 51 of file base-user-action.inc.php.

References BaseModule::getLink().

Referenced by drawViewPage().

BaseUserAction::drawDoActionPage  ) 
 

draw our do action page

Definition at line 136 of file base-user-action.inc.php.

References createMessageForm(), BaseModule::params(), and BaseObject::save().

BaseUserAction::drawMessagePage  ) 
 

draw our message adding page

Definition at line 177 of file base-user-action.inc.php.

References createMessageForm(), and BaseObject::save().

BaseUserAction::drawRow  ) 
 

draw our row with a link to view

Reimplemented from BaseObject.

Definition at line 261 of file base-user-action.inc.php.

References BaseModule::getLink(), and getMessage().

BaseUserAction::drawViewPage  ) 
 

draw our view page.

note that this also deletes it. it self destructs after you view it.

Definition at line 243 of file base-user-action.inc.php.

References drawActionsBox(), and getMessage().

BaseUserAction::getCreateFieldsArray  ) 
 

not to mention it will show you how to create the db too

Reimplemented from BaseObject.

Definition at line 318 of file base-user-action.inc.php.

BaseUserAction::getCreateIndexesArray  ) 
 

we need indexes too

Reimplemented from BaseObject.

Definition at line 336 of file base-user-action.inc.php.

BaseUserAction::getDeletePageXml  )  [protected]
 

no delete page

Reimplemented from BaseObject.

Definition at line 76 of file base-user-action.inc.php.

BaseUserAction::getEditPageXml  )  [protected]
 

no edit page

Reimplemented from BaseObject.

Definition at line 84 of file base-user-action.inc.php.

BaseUserAction::getMessage  ) 
 

get the action text and message

Returns:
a string like "Foo gave you a bar and said 'sdfasd'"

Definition at line 272 of file base-user-action.inc.php.

References $s, and Linkify::bbcode().

Referenced by drawRow(), drawViewPage(), getPublicData(), and getRssItem().

BaseUserAction::getPagesXml  ) 
 

add in our custom pages

doaction - send an action to a user message - add a message to an action

Reimplemented from BaseObject.

Definition at line 95 of file base-user-action.inc.php.

References $actions.

BaseUserAction::getPublicData  ) 
 

easy api access too...

Reimplemented from BaseObject.

Definition at line 300 of file base-user-action.inc.php.

References getMessage().

BaseUserAction::getRssItem  ) 
 

automatic RSS of user actions!

Reimplemented from BaseObject.

Definition at line 287 of file base-user-action.inc.php.

References getMessage().

BaseUserAction::initDoActionPage  ) 
 

prep our do action page.

Definition at line 121 of file base-user-action.inc.php.

References BaseModule::assertLogin(), and BaseModule::params().

BaseUserAction::initMessagePage  ) 
 

Prep our message adding page.

Definition at line 161 of file base-user-action.inc.php.

References BaseModule::assertLogin(), and BaseModule::params().

BaseUserAction::initViewPage  ) 
 

prep our view page

Definition at line 230 of file base-user-action.inc.php.

References BaseModule::assertLogin().


Member Data Documentation

BaseUserAction::$actions [static]
 

Initial value:

 array(
        'high_five' => '/lib/img/actions/highfive.gif',
        'holler' => '/lib/img/actions/holler.gif',
        'hug' => '/lib/img/actions/hug.gif',
        'kiss' => '/lib/img/actions/kiss.gif',
        'laugh' => '/lib/img/actions/laugh.gif',
        'poke' => '/lib/img/actions/poke.gif',
        'slap' => '/lib/img/actions/slap.gif',
        'thumbs_down' => '/lib/img/actions/thumbsdown.gif',
        'thumbs_up' => '/lib/img/actions/thumbsup.gif',
        'wave' => '/lib/img/actions/wave.gif',
        'wink' => '/lib/img/actions/wink.gif',
        'yawn' => '/lib/img/actions/yawn.gif',
    )
this holds all of the actions that one can do.

The key is the name of the action (underscores get replaced with spaces) and the value is the path to the action image.

Definition at line 18 of file base-user-action.inc.php.

Referenced by getPagesXml().


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:41 2006 for BaseJumper by doxygen 1.3.9.1