Differences

This shows you the differences between the selected revision and the current version of the page.

punbb13:extensions:pun_admin_events 2009/07/13 09:52 punbb13:extensions:pun_admin_events 2020/02/06 11:04 current
Line 1: Line 1:
-====== Forum's events registration (pun_admin_events) ======+====== API for events registration (pun_admin_events) ======
[[punbb13:extensions#Official extensions|PunBB 1.3 official extension]] [[punbb13:extensions#Official extensions|PunBB 1.3 official extension]]
  * Status: **under development**   * Status: **under development**
-  * Current version: **[[http://punbb.informer.com/extensions/pun_admin_events/pun_admin_events.zip|0.8]]**+  * Current version: **[[https://punbb.informer.com/extensions/pun_admin_events/pun_admin_events.zip|0.8.2]]** 
===== General idea ===== ===== General idea =====
-Adds an gear to logging events and GUI for browsing logs.+Adds event logging and a GUI for browsing logs.
===== Specification ===== ===== Specification =====
==== Functionality ==== ==== Functionality ====
-Extension allow to use API for events registration. +The extension allows to use API for registration of events.
==== Interface ==== ==== Interface ====
-  * Link "Events" at the "Management" tab in administration menu.+  * Link "Events" in the "Management" tab in administration menu.
  * "Events page":   * "Events page":
-    * At this page all registered events are shown. +    * On this page all registered events are shown. 
-    * Filters for events:+    * Event filters:
      * By date from       * By date from
      * By date to       * By date to
Line 22: Line 23:
      * Sort by       * Sort by
      * Sort direction       * Sort direction
-    * Fields of table with events:+    * Fields of the event table:
      * IP       * IP
      * Event type       * Event type
      * Event's comment       * Event's comment
      * Event date       * Event date
-      * Username of user, who rouse the event+      * Username of the one who triggers the event
==== Database ==== ==== Database ====
Line 44: Line 45:
**pun_admin_event** **pun_admin_event**
-Register an event.+Registers an event.
//void// pun_admin_event(string //$type//, [string //$comment// = '', [bool //$search_user// = true]]) //void// pun_admin_event(string //$type//, [string //$comment// = '', [bool //$search_user// = true]])
    *  string  $type: Type of registered events. (Example: "Topic")     *  string  $type: Type of registered events. (Example: "Topic")
-    *  string  $comment: Comment of registered events. (Example: "Topic under ID 100 has been deleted.") +    *  string  $comment: Comments of registered events. (Example: "Topic under ID 100 has been deleted.") 
-    *  bool $search_user: If set to true function try to determine user, who cause the event.+    *  bool $search_user: If set to true, the function tries to determine the user, who caused the event.
==== Examples ==== ==== Examples ====
== Example 1 == == Example 1 ==
-First example show how to register posts and topics deletion at your forum. +The first example shows how to register posts and topics deletion at your forum. 
-Add this peace of code after line 92 of "<FORUM_ROOT>/delete.php".+Add this piece of code after line 92 of "<FORUM_ROOT>/delete.php".
<code php> <code php>
-<?php 
include FORUM_ROOT.'extensions/pun_admin_events/pun_admin_events.php'; include FORUM_ROOT.'extensions/pun_admin_events/pun_admin_events.php';
pun_admin_event('Topic', 'Topic under ID '.$cur_post['tid'].' has been deleted.', true); pun_admin_event('Topic', 'Topic under ID '.$cur_post['tid'].' has been deleted.', true);
-?> 
</code> </code>
-Add this after after line 102 of "<FORUM_ROOT>/delete.php".+Add this after line 102 of "<FORUM_ROOT>/delete.php".
<code php> <code php>
-<?php 
include FORUM_ROOT.'extensions/pun_admin_events/pun_admin_events.php'; include FORUM_ROOT.'extensions/pun_admin_events/pun_admin_events.php';
pun_admin_event('Post', 'Post under ID '.$cur_post['tid'].' has been deleted.', true); pun_admin_event('Post', 'Post under ID '.$cur_post['tid'].' has been deleted.', true);
-?> 
</code> </code>
== Example 2 == == Example 2 ==
-You can use this extension not only for registration of forum's events, and for other purposes. This example shows how to register file downloading via php script:+You can use this extension not only for registration of forum events, but also for other purposes. This example shows how to register file downloading using a php script:
<code php> <code php>
<?php <?php
Line 101: Line 98:
?> ?>
</code> </code>
- 
===== Screenshots ===== ===== Screenshots =====
{{:punbb13:extensions:pun_admin_events.png|}} {{:punbb13:extensions:pun_admin_events.png|}}

Personal Tools