Λίστα αναφοράς γεγονότων
Η ακόλουθη λίστα περιλαμβάνει όλα τα γεγονότα που υλοποιούνται στο DokuWiki Σύστημα γεγονώτων.
Σημειώσεις επεξήγησης
Το γεγονότα παρουσιάζονται σε αλφαβητική ονοματική λίστα χρησιμοποιώντας
την ακόλουθη μορφή:
Όνομα | Η συμβολοσειρά που χρησιμοποιείται για το όνομα του γεγονότος . Χρησιμοποιήσε αυτό το όνομα για να εγγραφείς για το γεγονός. Δες και δομή ονόματος για λεπτομέρειες για το πώς κατασκευάζονται τα ονόματα και τι σημαίνει το κάθε μέρος. |
Δεδομένα | Μια σύντομη περιγραφή των δεδομένων που είναι προσκολλημένα με την ιδιότητα data του γεγονότος. |
Ενέργεια | Η προκαθορισμένη ενέργεια που σηματοδοτείται από το γεγονός. Δεν έχουν όλα τα γεγονότα μια προκαθορισμένη ενέργεια, και αν έχουν μπορεί να εμποδιστεί η εκτέλεση της χρησιμοποιώντας την μέθοδο του γεγονότος ->preventDefault() . |
Αποτρέψιμο | Κατά πόσο η προκαθορισμένη ενέργεια του γεγονότος μπορεί να αποτραπεί. Γεγονότα χωρίς προκαθορισμένη ενέργεια θεωρούνται “μη αποτρέψιμα” . |
Σημείωσεις | Οποιαδήποτε επιπλέον πληροφορία/επεξήγηση που μπορεί να βοηθήσει στην κατανόηση του γεγονότος |
Δομή ονόματος
Το ονόματα των γεγονώτων ακολουθούνε την παρακάτω δομή:
<προέλευση>_<δεδομένα_γεγονότος>_<ενέργεια>
<προέλευση>
— σύντομο όνομα ή βοήθεια για αναγνώριση του μέρους του DokuWiki που δημιουργεί το γεγονός.
<δεδομένα_γεγονότος>
— σύντομο όνομα ή βοήθεια για αναγνώριση των δεδομένων που μεταφέρονται μαζί με το γεγονός
<ενέργεια_ή_κατάσταση>
— αν το γεγονός έχει μια προκαθορισμένη κατάσταση, αυτό το τμήμα του ονόματος θα υποδηλώνει ποιά είναι αυτή η ενέργεια, αν δεν υπάρχει προκαθορισμένη ενέργεια, θα υποδηλώνει την κατάσταση ή άλλο λόγο για τον οποίο ενεργοποιήθηκε το γεγονός.
π.χ
parser_handler_done
το γεγονός ενεργοποιήται από σενάρια parser (του συντακτικού αναλυτή)
το handler αντικείμενο είναι τα δεδομένα του γεγονότος,
δεν υπάρχει ενέργεια , και η κατάσταση του αναλυτή στο βήμα αυτό είναι done,(ολοκλήρωση) δηλ. ο αναλυτής έχει ολοκληρώσει την επεξεργασία τουthe handler has completed its processing.
action_headers_send
το γεγονός ενεργοποιήται στο σενάριο actions.php,
τα δεδομένα του γεγονότος είναι ένας πίνακας από επικεφαλίδες ( headers ),
η προκαθορισμένη ενέργεια είναι να σταλθούν send οι επικεφαλίδες.
Λίστα γεγονότων
ACTION_ACT_PREPROCESS
Όνομα | ACTION_ACT_PREPROCESS |
Δεδομένα | $ACT (η do μεταβλητή στη σειρά χαρακτήρων ερωτήματος - μη καθαρή) |
Ενέργεια | Η προεπεξεργασία της τιμής $ACT από το Dokuwiki |
Αποτρέψιμο | ναι |
Πυροδοτήθηκε από | act_dispatch() 1) πριν ξεκινήσει να επεξεργάζεται τη μεταβλητή $ACT |
Σημειώσεις | [1] Επίσης κοίταξε και το γεγονός TPL_ACT_UNKNOWN . |
Όνομα | ACTION_HEADERS_SEND |
Δεδομένα | ένας πίνακας από νήματοχαρακτήρες-(σειρές χαρακτήρων) επικεφαλίδων. |
Ενέργεια | έξοδος όλων των επικεφαλίδων σε σειρά με χρήση της συνάρτησης header(). |
Αποτρέψιμο | ναι |
Πυροδοτήθηκε από | action_dispatch() 2) αφού προετοιμαστούν οι επικεφαλίδες και πριν φορτωθεί το πρότυπο |
Σημειώσεις | [1] Υπάρχει μια επικεφαλίδα 'Content-Type: text/html; charset=utf-8'
[2] Χειριστές αυτού του γεγονότος μπορούν να προσθέσουν/τροποποιήσουν/διαγράψουν επικεφαλίδες των δεδομένων του γεγονότος. Τα The δεδομένα του γεγονότος πρέπει να παρεμείνουν σε πίνακα, ακόμαι και είναι άδειος. |
AJAX_CALL_UNKNOWN
Όνομα | AJAX_CALL_UNKNOWN |
Δεδομένα | the AJAX call Όνομα in $_POST['call'] |
Ενέργεια | Sends an “AJAX call <call> unknown! ” message. |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | Signaled from lib/exe/ajax.php if the AJAX call is not recognized. |
Σημειώσεις | Remember to use preventDefault() (and possibly stopPropagation() ) when handling an unknown AJAX event. This keeps other handlers from corrupting your returned Δεδομένα. Also use a unique AJAX call Όνομα to avoid collisions. |
DOKUWIKI_DONE
Όνομα | DOKUWIKI_DONE |
Δεδομένα | Κανένα |
Ενέργεια | Κανένα |
Αποτρέψιμο | ναι |
Πυροδοτήθηκε από | Αφού έχει ολοκληρωθεί όλη η επεξεργασία αυτό είναι η τελευταία ενέργεια του doku.php πριν τερματίσει. Είναι πιθανό υπό κάποιες συνθήκες το dokuwiki να τερματίσει χωρίς να επιστρέψει στο doku.php και αυτό το γεγονός μπορεί να μην πυροδοτήθηκε καν. |
Σημειώσεις | |
DOKUWIKI_STARTED
Όνομα | DOKUWIKI_STARTED |
Δεδομένα | Κανένα |
Ενέργεια | Κανένα |
Αποτρέψιμο | όχι |
Πυροδοτήθηκε από | Αυτό το γεγονός θα πυροδοτήθεί αφού το Dokuwiki έχει ολοκληρώσει την αρχικοποιησή του και πριν κλείσει την σύνοδο3). Θα έχουν δημιουργηθεί οι περισσότερες καθολικές μεταβλητές και αρχικοποιηθεί και η καθολική μεταβλητή $_SESSION θα υπάρχει ακόμα |
Σημειώσεις | [1] Ακόμα και αφού έχει κλείσει η $_SESSION ένα πρόσθετο μπορεί να την ξανανοίξει για αν αποκτήσει πρόσβαση δεδομένα συνόδου - εφόσον δεν έχουν σταλθεί ακόμα οι επικεφαλίδες. Για παράδειγμα μπορείς να δεις το lib/plugins/config/admin.php. |
FEED_ITEM_ADD
Όνομα | FEED_ITEM_ADD |
Δεδομένα | $Δεδομένα['item'] - The Feed Item object prepared for insertion in the feed
$Δεδομένα['opt'] - associative array of feed options
$Δεδομένα['ditem'] - the raw item Δεδομένα as it was given to the rss_BuildItems function
$Δεδομένα['rss'] - the full feed creator object
|
Ενέργεια | Adds the feed item to the RSS/Atom feed |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | by rss_BuildItems() 4) when the feed is build |
Σημειώσεις | You can use this to manipulate feed items before they are added to the feed. Eg. you could add advertising banners or add additional links in the description |
Όνομα | HTML_CONFLICTFORM_OUTPUT |
Δεδομένα | A Doku_Form object containing the form components |
Ενέργεια | Triggered by the conflict form printing routine |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | by html_form() 5) when called via html_conflict() |
Σημειώσεις | Use this to inject additional form elements6) into the form. |
Όνομα | HTML_DRAFTFORM_OUTPUT |
Δεδομένα | A Doku_Form object containing the form components |
Ενέργεια | Triggered by the draft form printing routine |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | by html_form() 7) when called via html_draft() |
Σημειώσεις | Use this to inject additional form elements8) into the form. |
replaces former HTML_EDITFORM_INJECTION event
Όνομα | HTML_EDITFORM_OUTPUT |
Δεδομένα | A Doku_Form object containing the form components |
Ενέργεια | Triggered by the edit form printing routine |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | by html_form() 9) when called via html_edit() |
Σημειώσεις | Use this to inject additional form elements10) into the form. |
replaces former HTML_LOGINFORM_INJECTION event
Όνομα | HTML_LOGINFORM_OUTPUT |
Δεδομένα | A Doku_Form object containing the form components |
Ενέργεια | Triggered by the login form printing routine |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | by html_form() 11) when called via html_login() |
Σημειώσεις | Use this to inject additional form elements12) into the form. |
HTML_PAGE_FROMTEMPLATE
Όνομα | HTML_PAGE_FROMTEMPLATE |
Δεδομένα | $Δεδομένα[0] - ID of the page to be created
|
Ενέργεια | load an existing Όνομαspace template, replace some variables and return it to the edit box |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | by html_edit() 13) when a new page is to be created (loaded into the editor) |
Σημειώσεις | The event Όνομα will probably change when html_edit() is refactored |
replaces former HTML_REGISTERFORM_INJECTION event
Όνομα | HTML_REGISTERFORM_OUTPUT |
Δεδομένα | A Doku_Form object containing the form components |
Ενέργεια | Triggered by the register form printing routine |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | by html_form() 14) when called via html_register() |
Σημειώσεις | Use this to inject additional form elements15) into the form. |
Όνομα | HTML_RESENDPWDFORM_OUTPUT |
Δεδομένα | A Doku_Form object containing the form components |
Ενέργεια | Triggered by the resend password form printing routine |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | by html_form() 16) when called via html_resendpwd() |
Σημειώσεις | Use this to inject additional form elements17) into the form. |
Όνομα | HTML_UPDATEPROFILEFORM_OUTPUT |
Δεδομένα | A Doku_Form object containing the form components |
Ενέργεια | Triggered by the update profile form printing routine |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | by html_form() 18) when called via html_updateprofile() |
Σημειώσεις | Use this to inject additional form elements19) into the form. |
Όνομα | MEDIA_UPLOAD_FINISH |
Δεδομένα | an array which hold various informations about the uploaded file |
Ενέργεια | Triggered when uploading a file |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | by media_upload() 20) |
Σημειώσεις | Use this to inspect/change/modify uploaded files |
Όνομα | MEDIA_SENDFILE |
Δεδομένα | 'file' The fileΌνομα of the file about to be delivered, can be modified by your plugin
'mime' The Mime-Type of the file, can be modified by your plugin
'cache' The wanted cache behavior (-1 = cache forever, 0 = never cache, >0 cache time in seconds), can be modified by your plugin
'orig' Images only: fileΌνομα before resizing
'ext' Extension of the file
'width' Images only: the wanted width as specified in the request
'height' Images only: the wanted height as specified in the request
|
Ενέργεια | Triggered when downloading a file |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | in the main code of fetch.php 21), wraps around sendFile() |
Σημειώσεις | Can be used to intercept or modify downloaded files and images |
develonly
IO_NAMESPACE_CREATED
Όνομα | IO_NAMESPACE_CREATED |
Δεδομένα | $Δεδομένα[0] ns: The colon separated Όνομαspace path minus the trailing page Όνομα.
$Δεδομένα[1] ns_type: 'pages' or 'media' Όνομαspace tree.
|
Ενέργεια | The Όνομαspace is created. |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | By io_createΌνομαspace() 22) after creating Όνομαspaces. |
Σημειώσεις | Events are called “inside out” so parent Όνομαspace created events are called before their children. |
IO_NAMESPACE_DELETED
Όνομα | IO_NAMESPACE_DELETED |
Δεδομένα | $Δεδομένα[0] ns: The colon separated Όνομαspace path minus the trailing page Όνομα.
$Δεδομένα[1] ns_type: 'pages' or 'media' Όνομαspace tree.
|
Ενέργεια | The Όνομαspace is deleted. |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | By io_sweepNS() 23) after deleting a Όνομαspace. |
Σημειώσεις | Child Όνομαspaces are deleted before their parents. |
IO_WIKIPAGE_READ
Όνομα | IO_WIKIPAGE_READ |
Δεδομένα | $data[0] Οι ακατέργαστες παράμετροι για την io_readFile σαν πίνακας.Μην το αλλάζετε.
$data[1] ns: Το μονοπάτι του χώρου ονόματος (με το διαχωριστικό ':') πλην το τελικό όνομα σελίδας (ψευδές αν ο χώρος ονομάτων 'ns' είναι ο root )
$data[2] page_name: Το όνομα της σελίδας wiki .
$data[3] rev: Η αναθεώρηση της σελίδας ( ψευδές για τρέχουσες βικισελίδες)
|
Ενέργεια | Διαβάζει την βικι σελίδα. |
Αποτρέψιμο | όχι |
Πυροδοτήθηκε από | io_readWikiPage() 24). |
Σημειώσεις | Το περιεχόμενο της σελίδας μπορεί να τροποποιηθεί από action plugins ανάμεσα στον δίσκο και το DokuWiki. |
IO_WIKIPAGE_WRITE
Όνομα | IO_WIKIPAGE_WRITE |
Δεδομένα | $Δεδομένα[0] The raw arguments for io_saveFile as an array. Do not change file path.
$Δεδομένα[0][0] is the file path.
Note, $Δεδομένα[0][1] is the content to be saved, and may be modified.
$Δεδομένα[1] ns: The colon separated Όνομαspace path minus the trailing page Όνομα. (false if root ns)
$Δεδομένα[2] page_Όνομα: The wiki page Όνομα.
$Δεδομένα[3] rev: The page revision, false for current wiki pages.
|
Ενέργεια | Writes out wiki page. |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | By io_writeWikiPage() 25). |
Σημειώσεις | The page content may be modified by Ενέργεια plugins between DokuWiki and the disk.
Page creation may be detected by checking if the file already exists and the revision is false.
Page deletion may be detected by checking for empty page content. On update to an existing page this event is called twice, once for the transfer of the old version to the attic (rev will have a value) and once to write the new version of the page into the wiki (rev is false). |
MAIL_MESSAGE_SEND
Όνομα | MAIL_MESSAGE_SEND |
Δεδομένα | mail_send parameters: to, subject, body, from, cc, bcc, headers, params |
Ενέργεια | send message using DokuWiki's internal mailing function |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | by calling DokuWiki's mail_send function26) |
Σημειώσεις | |
Can be used to replace DokuWiki's mail function with another mailing mechanism.
PARSER_CACHE_USE
Όνομα | PARSER_CACHE_USE |
Δεδομένα | a cache object27) |
Ενέργεια | determine whether or not cached Δεδομένα should be used |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | by cache versions of parser wrapper functions28) |
Σημειώσεις | For handling of above event, key properties of the cache object are:
- page, if present the wiki page id,
may not always be present, e.g. when called for locale xhtml files
- file, source file
- mode, renderer mode (e.g. 'xhtml') or 'i' for instructions
- depends, array of dependencies used to determine cache validity
|
Syntax plugins can use this event to provide their own assistance to DokuWiki's cache validity logic when the syntax extension adds other dependencies to the rendered page.
PARSER_HANDLER_DONE
Όνομα | PARSER_HANDLER_DONE |
Δεδομένα | the handler object |
Ενέργεια | None |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | by the handler within its _finalisation() method29), as it finalises the instruction list. |
Σημειώσεις | [1] At the time of signalling the instruction list is complete
except for two instructions, document_start & document_end.
|
Syntax plugins could register for this event to finalise processing of their Δεδομένα knowing it is complete, e.g. an alternate footnote plugin.
Όνομα | PARSER_METADATA_RENDER |
Δεδομένα | page metaΔεδομένα |
Ενέργεια | refresh the metaΔεδομένα with the metaΔεδομένα renderer |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | by p_render_metaΔεδομένα30) before instantiating the metaΔεδομένα renderer |
Σημειώσεις | [1] the metaΔεδομένα includes both the ''current'' and ''persistent'' arrays.
[2] Ενέργεια plugins can use this event to update/refresh metaΔεδομένα they may have set elsewhere.
|
PARSER_WIKITEXT_PREPROCESS
Όνομα | PARSER_WIKITEXT_PREPROCESS |
Δεδομένα | the raw wiki text |
Ενέργεια | None |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | In p_get_instructions() 31) immediately before DokuWiki hands the text to the parser for processing allowing the event handler to inspect or modify the Δεδομένα before it is parsed. |
Σημειώσεις | |
RENDERER_CONTENT_POSTPROCESS
Όνομα | RENDERER_CONTENT_POSTPROCESS |
Δεδομένα | Δεδομένα[0] the format of the renderer output (e.g. xhtml, meta)
Δεδομένα[1] the output produced by the renderer
|
Ενέργεια | None |
Αποτρέψιμο | no |
Πυροδοτήθηκε από | In p_render() 32) immediately after the renderer completes, allowing the event handler to inspect or modify its output before it is passed back to DokuWiki |
Σημειώσεις | |
Όνομα | TOOLBAR_DEFINE |
Δεδομένα | an array containing the Δεδομένα of already defined toolbar buttons |
Ενέργεια | None |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | In toolbar_JSdefines() 33) before and after the standard toolbar is being filled |
Σημειώσεις | Useful for adding additional buttons to the toolbar. |
TPL_ACT_RENDER
Όνομα | TPL_ACT_RENDER |
Δεδομένα | $ACT |
Ενέργεια | XHTML έξοδος για την δοσμένη ενέργεια $ACT [1] |
Αποτρέψιμο | ναι |
Πυροδοτήθηκε από | tpl_content() 34) |
Σημειώσεις | [1] Η έξοδος αντιστοιχεί σε´αυτήν της συνάρτησης tpl_content() και εμφανίζεται μέσα σε <div id=“page” στο προκαθορισμένο πρότυπο dokuwiki .
[2] Χειριστές γεγονότος μπορούν να δώσουν σαν έξοδο XHTML πριν και/ή μετά την κύρια έξοδο της σελίδας Dokuwiki και μπορούν ακόμα να αποτρέψουν την προκαθορισμένη δημιουργία της σελίδας dokuwiki από το να συμβεί.
[3] Η ενδιάμεση αποθήκευση εξόδου είναι ενεργή κατά τη διάρκεια αυτού του γεγονότος, και η πιασμένη έξοδος δίνεται στο γεγονός TPL_CONTENT_DISPLAY |
Παραδείγματα χρήσης:
TPL_ACT_UNKNOWN
Όνομα | TPL_ACT_UNKNOWN |
Δεδομένα | $ACT (based on the do variable in the query string) |
Ενέργεια | Display an “unknown Ενέργεια” message |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | By tpl_content() 35) if it does not recognise the $ACT value. |
Σημειώσεις | [1] also refer Ενέργεια_ACT_PREPROCESS event.
[2] Handlers of this event can output XHTML which will be displayed in the main dokuwiki window - ie. where the wiki page would normally be displayed. |
TPL_CONTENT_DISPLAY
Όνομα | TPL_CONTENT_DISPLAY |
Δεδομένα | the XHTML output produced by tpl_content_core() |
Ενέργεια | Send the XHTML output to browser |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | by tpl_content() 36) after receiving the output on completion of the TPL_ACT_RENDER event |
Σημειώσεις | Event handlers can post process the XHTML output before it is sent to the client browser. |
Όνομα | TPL_METAHEADER_OUTPUT |
Δεδομένα | An array of meta headers |
Ενέργεια | Render the array Δεδομένα to XHTML and send it to the browser |
Αποτρέψιμο | yes |
Πυροδοτήθηκε από | by tpl_metaheaders() 37) after preparing the default meta headers |
Σημειώσεις | Eventhandlers can modify the header array and add new ones |
*/