Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F391104
hook_demo.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
851 B
Subscribers
None
hook_demo.php
View Options
<?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\n
Wazzzzzzzzzzzzzzzzaaaaaaaaaaaaaaaaaaaaaa"
;
}
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
Details
Attached
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)
Attached To
rZED Zed
Event Timeline
Log In to Comment