Page MenuHomeCode

hook_demo.php
No OneTemporary

hook_demo.php

<?php
/*
* Zed
* (c) 2010, Dereckson, some rights reserved
* Released under BSD license
*
* Story hook example code
*/
$class = "DemoStoryHook";
class DemoStoryHook extends StoryHook {
function initialize () {}
function update_description (&$description) {
//Performs the rot13 transform of the current description
$description = str_rot13($description);
//Appends a string to the current description
$description .= "\n\nWazzzzzzzzzzzzzzzzaaaaaaaaaaaaaaaaaaaaaa";
}
function get_choices_links (&$links) {
//Adds a link to /push
$links[] = array(lang_get("PushMessage"), get_url('push'));
}
function add_html () {
//Adds a html block
return '<div class="black">Lorem ipsum dolor</div>';
}
}
?>

File Metadata

Mime Type
text/x-php
Expires
Sat, Feb 22, 20:21 (15 h, 25 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23231
Default Alt Text
hook_demo.php (851 B)

Event Timeline