Modules

Conjecture - replacement for comments

Mithrandir  31-Oct-2006 10:54 11915 Reads   21 Comment(s) 

How to extend with more modules:

1) Add a file in modules/conjecture/class/ called [moduledirname].php
2) include_once(XOOPS_ROOT_PATH."/modules/conjecture/class/comments.php");
3) Make a new class called Conjecture[Moduledirname]Handler that extends ConjectureCommentsHandler
4) Make a constructor that calls the parent's constructor
5) Add $this->pages['filename'] = array('param' => 'param_name', 'handler' => 'handler_name'); replacing filename with the name of the accessed script in the module. param_name is e.g. id, itemid or storyid. handler_name is the name of the handler, handling the objects
6) If no param is set, you MUST override the getId() class function to set $this->item_id
7) If no handler is set, you MUST override the getTitle() class function to set the title of the forum topic properly

You can add several $this->pages indexes if you have multiple item types with comments.

The module should automatically pick up the new available class if the module is installed.
« 1 (2)
Rating 0/5
Rating: 0/5 (0 votes)
Voting is disabled!


Login

Who's Online

402 user(s) are online (28 user(s) are browsing Publisher)


Members: 0


Guests: 402


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits

Categories