JComments...is it possible?

0
I have Music Collection 2.1 installed and I would like to replace the existing commenting system with JComments. Is it possible?
Responses (8)
  • Accepted Answer

    Tuesday, February 08 2011, 06:20 AM - #Permalink
    0
    no... for now only JomComment is supported.

    we'll try to work on this in the future!

    Germi
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 08 2011, 06:22 PM - #Permalink
    0
    That sucks. Didn't Jom Comment get unpublished...and why?

    http://extensions.joomla.org/extensions/676/details
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 08 2011, 08:29 PM - #Permalink
    0
    WTF.. :S :S :S I didn't know that!!

    we'll definitely try to work with JComments for now on...
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 08 2011, 08:43 PM - #Permalink
    0
    Thanks, Germi. I saw that and was wondering myself :/

    I'm glad I brought it up to your attention. Besides, JComments is way batter!
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 08 2011, 11:52 PM - #Permalink
    0
    Instructions for version 2.1

    Edit the file

    administrator/components/com_muscol/config.xml

    search for the "commentsystem" param and add

    option value="jcomments"JComments comment engine/option

    (reason for edit: could not post html. Exactly before option put a less_than_symbol and after "jcomments" put a greater_than_symbol and before /option put a less_than_symbol and after /option put a greater_than_symbol. Check the other two "option" elements, if that is not clear. Most stupid edit ever...)

    below the second option (that is below the "jomcomment" option). This enables jcomments as an option for "Comment engine" at the Parameters at the administrator part of Music Collection. Go on select it and click Save. Now the built-in comment engine should appear where comments appear, since this is the default comment engine. This calls for a change in every view where comments appear, if we want to have jcomments working. Let's start with the "artist" view. Edit the file

    components/com_muscol/views/artist/tmpl/common.php

    search for "commentsystem" and below this piece of code:

    case 'jomcomment':
    echo $this->jomcomment;
    break;

    insert this piece of code:

    case 'jcomments':
    $commentsPath = JPATH_BASE . '/components/com_jcomments/jcomments.php';
    if (file_exists($commentsPath)) {
    require_once($commentsPath);
    echo JComments::showComments($this->artist->id, 'com_muscol_artist', $this->artist->artist_name);
    }
    break;

    Now jcomments should be working for the "artist" (and the "songs", since they share a... common php file) view! Check it before proceeding! The "album" and the "song" view should still have the built-in system but two more changes and everything should be working fine!

    To cut a long story short, edit the file

    components/com_muscol/views/album/tmpl/default.php

    search for "commentsystem" and below this piece of code:

    case 'jomcomment':
    echo $this->jomcomment;
    break;

    insert this piece of code:

    case 'jcomments':
    $commentsPath = JPATH_BASE.'/components/com_jcomments/jcomments.php';
    if (file_exists($commentsPath)) {
    require_once($commentsPath);
    echo JComments::showComments($this->album->id, 'com_muscol', $this->album->name);
    }
    break;

    Now edit the file

    components/com_muscol/views/song/tmpl/default.php

    and after this piece of code:

    case 'jomcomment':
    echo $this->jomcomment;
    break;

    insert this piece of code:

    case 'jcomments':
    $commentsPath = JPATH_BASE . '/components/com_jcomments/jcomments.php';
    if (file_exists($commentsPath)) {
    require_once($commentsPath);
    echo JComments::showComments($this->song->id, 'com_muscol_song', $this->song->name);
    }
    break;

    Now check the "album" and the "song" views!

    This is not entirely my work, since it was heavily based on http://www.joomlatune.com/forum/index.php/topic,1549.0.html but the current approach works perfectly as a backwards-compatible extension and nothing else is needed for JComments 2.2.0.2 to work! Check it out and leave your feedback! Three more points, mainly for Germi:

    1. Check out the strings used in JComments, that is com_muscol_artist, com_muscol and com_muscol_song. I don't know why in the aforementioned link they used the second one for album comments and not something like com_muscol_album. Please reply to this guide as far as your technical decisions are concerned, since your future patches will have an impact on customised code.

    2. The number of comments is not counted, e.g. in the "artist" view. I haven't cared to deal with this yet. If someone else does, please share it with us!

    3. This code may need MVCing! :)
    The reply is currently minimized Show
  • Accepted Answer

    luftkaffe
    luftkaffe
    Offline
    Tuesday, February 15 2011, 11:29 PM - #Permalink
    0
    Great, it worked fine! Thanks!
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 21 2011, 09:36 PM - #Permalink
    0
    xnakos many thanks for this turorial, nice work and good stuff.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 12 2011, 02:44 AM - #Permalink
    0
    Germi, is this something that could be added to a realease of 2.2?

    Also, regarding comments, is the staked "quote" style comments used in the demo part of the template you're using or something else. I think it is pretty slick.
    The reply is currently minimized Show
Your Reply