1. YuriBtr
  2. General Talk
  3. Sunday, 29 January 2012
  4.  Subscribe via email
Hi Daniel,
I've updated Compojoom comment system from 4.1.7 to 4.2.1 and found that my custom code which put comment quantity to preview of each article doesn't work. Further investigations showed that problem is in event, in pas it was "onPrepareContent", now I see that you've changed it to "onAfterDisplayContent" (I have J1.5).
In past I triggered event "onPrepareContent" at "components/com_content/views/category/view.html.php" and all work fine. Now, even if I change triggering on "onAfterDisplayContent", it gives nothing... Many hours I spend on this problem. I'm in dead end...

Is it possible for me to revert your code back to using "onPrepareContent"? Thanks in advance.


P.S. I found your message, you wrote there "onAfterContent" - is it wrong or not? In your code there "onAfterDisplayContent".
Re: upgrade from 4.1.7 to 4.2 gives template problems

Hey Kristof,

In compojoomComment 4.1 the comments were outputted onPrepareContent. This means:
the plugin gets the article $row and we attach the comments to the end of it. This is all good, but in a lot of cases we get conflicts with plugins that are also executed onPrepareContent - the best example is the e-mail cloaking plugin. It was transforming the emails in the comment form...

Since the onPrepareContent event is used to make changes to the article and since we don't do any changes to the article the best event for the comments is onAfterContent... And compojoomComment 4.2 does exactly this.

Now with your specific template the onAfterContent event is displayed way below after your article. What you need to do is a template override and move the <?php echo $this->onAfterContent; ?> tag to the place where you want the write comment to be.

Cheers,
Daniel
Responses (6)


There are %s replies to this question. If you want to see them you need a valid subscription.
If you have a valid subscription, please login now.
Visit store now

Last questions

Dowload all Hotspots entries
Hi there, I'm looking for a way to dowload all the Hotspots entries. I've got t...
0 Replies
Posted on Sunday, 06 April 2025
  • New
    • #kml
    • #download
    Set number of hotspots / user groups
    Hi, I'm working with Hotspots for my new website and I love it! After trying ...
    0 Replies
    Posted on Monday, 31 March 2025
    J5 compatibility for Hotspots
    Hi guys, Just started to update my old J3x website. Is there J5 compatibility p...
    1 Replies
    Posted on Monday, 24 February 2025
    • #Hotspots
    • #hotspots Joomla 5
    Text size in the comment input form
    Hello. How can I increase the font size in the comment input field? For examp...
    0 Replies
    Posted on Wednesday, 26 February 2025
    • #CComment 6
    Problem with enlarged image
    Hello. When you click on the image in the comments, it does not appear in the ce...
    1 Replies
    Posted on Wednesday, 26 February 2025