This is a component geared for communities offering a way to add comments on arbitrary
pages. It is primarily geared for dl'ed usage. Its regular welcome URL method only
shows the configuration interface, commenting the comments topic is prohibited as well.
The component stores the data in its own table, indexed by the object guid they are
bound to. There is no threading support, comments are ordered by creation date.
Commenting is currently only allowed for registered users for security reasons.
The user's name and E-Mail will be stored along with the created information in the
Metadata in case that the user gets deleted.
Install instructions
Just create a topic with this component assigned to it. I recommend dropping it out of
your navigation, as the component will by dynamically_loaded always, and the topic
itself is only there for configuration purposes.
In your component (or style), add a DL line like this wherever you want the comment
feature available:
Get the full configuration set active for a given topic.
If no topic is passed, the system wide default configuration is returned.
Be aware, that this call does not check if the passed topic is actually handled by
this component, as it is theoretically possible for components to drop configuration
information on other topics as well.
Delegate all watched operations, in two phases. First,
the general _on_watched_operation handler is called, to allow for handling
generic operations. After that, the individual watches are called, to allow
for more specific processing.
This function is triggered at the end of the request for each watched operation
that has been done during the request.
It will be called once per operation and unique object, where object uniqueness
is determined by the combination of object class and guid. The object has been
refreshed before being passed to this event handler.
Parameters
integer
$operation
The operation identifier (one of the MIDCOM_OPERATION constants)
which applies.
This function is triggered at the end of the request for each watched create operation
that has been done during the request.
It will be called once per operation and unique object, where object uniqueness
is determined by the combination of object class and guid. The object has been
refreshed before being passed to this event handler.
It is called after the generic _on_watched_operation event handler.
This function is triggered at the end of the request for each watched update operation
that has been done during the request.
It will be called once per operation and unique object, where object uniqueness
is determined by the combination of object class and guid. The object has been
refreshed before being passed to this event handler.
It is called after the generic _on_watched_operation event handler.
Reindex the given topic. The complete configuration set is already available in
$config. The original index records are already deleted, so you do not need to
bother about this.