| Author | Profiles plugin |
|
¥åßßå
Posts : 43 Location : 127.0.0.1
Joined : 03/03/08 10:38 am
|
Posted on : 17/03/08 11:57 am
Triggers and parameters
Post triggers
PHP: | |
| $Plugins->trigger_event( 'UserAvatar', array( |
| 'user_ID' => $Item->creator_User->ID, |
| 'block_start' => '', |
| 'block_end' => '', |
| )); |
| |
| |
| $Plugins->trigger_event( 'UserTimezone', array( |
| 'block_start' => '', |
| 'block_end' => '', |
| 'display' => true, |
| 'localdatetime' => $Item->get( 'dateissued' ), |
| ) ); |
| |
| $Plugins->trigger_event( 'UserLocation', array( |
| 'user_ID' => $Item->creator_User->ID, |
| )); |
| |
| |
| $Plugins->trigger_event( 'UserTimezone', array( |
| 'block_start' => '<p class="userJoined">Joined : <span>', |
| 'block_end' => '</span></p>', |
| 'display' => true, |
| 'localdatetime' => $foo->get( 'datecreated' ), |
| ) ); |
| |
| |
| $foo = $Item->get_creator_User(); |
| echo '<p class="postCount">Posts : '.( $foo->get('num_posts') + $DB->get_var( 'select count(*) from T_comments where comment_status="published" and comment_author_ID='.$foo->ID ) ).'</p>'; |
| |
| |
| $Plugins->trigger_event( 'UserSignature', array( |
| 'user_ID' => $Item->creator_User->ID, |
| )); |
Comment triggers
PHP: | |
| $Plugins->trigger_event( 'UserAvatar', array( |
| 'user_ID' => $Comment->author_user_ID, |
| )); |
| |
| |
| $Plugins->trigger_event( 'UserTimezone', array( |
| 'block_start' => '', |
| 'block_end' => '', |
| 'display' => true, |
| 'localdatetime' => $Comment->get( 'date' ), |
| ) ); |
| |
| |
| $Plugins->trigger_event( 'UserLocation', array( |
| 'user_ID' => $Comment->author_user_ID, |
| )); |
| |
| |
| if( $Comment->author_user_ID ) |
| { |
| $UserCache = get_cache('UserCache' ); |
| global $DB; |
| $foo = $UserCache->get_by_ID( $Comment->author_user_ID, false ); |
| $Plugins->trigger_event( 'UserTimezone', array( |
| 'block_start' => '<p class="userJoined">Joined : <span>', |
| 'block_end' => '</span></p>', |
| 'display' => true, |
| 'localdatetime' => $foo->get( 'datecreated' ), |
| ) ); |
| } |
| |
| |
| if( $Comment->author_user_ID ) |
| { |
| $UserCache = get_cache('UserCache' ); |
| global $DB; |
| $foo = $UserCache->get_by_ID( $Comment->author_user_ID, false ); |
| echo '<p class="postCount">Posts : '.( $foo->get('num_posts') + $DB->get_var( 'select count(*) from T_comments where comment_status="published" and comment_author_ID='.$foo->ID ) ).'</p>'; |
| } |
| |
| |
| $Plugins->trigger_event( 'UserSignature', array( |
| 'user_ID' => $Comment->author_user_ID, |
| )); |
¥
I may have opened the door, but you entered of your own free will

|