test
Viewing 1 post (of 1 total)
  • Author
    Posts
  • jkirsch Friend
    #166827

    Here are some corrections that need to be applied to the version 1.01 of the comment system plugin.

    Problem 1 : System Plugin not loading

    There is a name mismatch between the plugin name (“system_jacomment” in version 1.01 of the plugin) and the class name (“plgSystemJAComment”).
    In Joomla 1.6, if the plugin name is “system_comment” then the class name should necessary be “plgSystemSystem_JAComment” :
    – “plg” indicates that it’s a plugin,
    – “System” indicates that it is of the “System” category,
    – “System_JAComment” is the name of the plugin.

    To correct this, the line 25 should be replaced by

    class plgSystemSystem_JAComment extends JPlugin

    and the line 37 should be replaced by

    function plgSystemSystem_JAComment( &$subject ){

    For the same reason, in line 41, we need to use the correct name of the plugin and change the line to be

    $this->plugin = &JPluginHelper::getPlugin('system', 'system_jacomment');

    Problem 2 : All the comments attached to the custom component where listed on every articles without taking the article id in account

    It appears that :
    – the article id was store in the array $lists (element ‘contentid’)
    – the uninitialized variable (and then empty) $id was passed to the component

    The line 655 should be modified like this :

    url = "<?php echo JRoute::_('index.php?tmpl=component&option=com_jacomment&view=comments&contentoption=' . $lists['contentoption'] . '&contentid=' . $lists['contentid'] . '&ran=' . rand() ) ?>";

    With these modifications the system plugin is now working. I will update if I find something else.

Viewing 1 post (of 1 total)

This topic contains 1 reply, has 1 voice, and was last updated by  jkirsch 13 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum