HINT ALL THE TYPES. SIMPLE ALL THE EXTENSIONS.

This commit is contained in:
Shish
2012-02-08 11:24:25 +00:00
parent 9707c1f7ce
commit 4697e21fcd
43 changed files with 492 additions and 535 deletions

View File

@@ -8,7 +8,7 @@
*/
class Notes extends SimpleExtension {
public function onInitExt($event) {
public function onInitExt(InitExtEvent $event) {
global $config, $database;
// shortcut to latest
@@ -66,9 +66,7 @@ class Notes extends SimpleExtension {
}
}
public function onPageRequest($event) {
public function onPageRequest(PageRequestEvent $event) {
global $page, $user;
if($event->page_matches("note")) {
@@ -179,7 +177,7 @@ class Notes extends SimpleExtension {
/*
* HERE WE LOAD THE NOTES IN THE IMAGE
*/
public function onDisplayingImage($event) {
public function onDisplayingImage(DisplayingImageEvent $event) {
global $page, $user;
//display form on image event
@@ -191,7 +189,7 @@ class Notes extends SimpleExtension {
/*
* HERE WE ADD THE BUTTONS ON SIDEBAR
*/
public function onImageAdminBlockBuilding($event) {
public function onImageAdminBlockBuilding(ImageAdminBlockBuildingEvent $event) {
global $user;
if(!$user->is_anonymous()) {
$event->add_part($this->theme->note_button($event->image->id));
@@ -207,7 +205,7 @@ class Notes extends SimpleExtension {
/*
* HERE WE ADD QUERYLETS TO ADD SEARCH SYSTEM
*/
public function onSearchTermParse($event) {
public function onSearchTermParse(SearchTermParseEvent $event) {
$matches = array();
if(preg_match("/note=(.*)/i", $event->term, $matches)) {
$notes = int_escape($matches[1]);