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

Hotspots Pro 6.0.13 compatability with Joomla 5.3.
Running Hotspots Pro 6.0.13 on Joomla 4.4.13 and want to upgrade to Joomla 5.3.1...
2 Replies
Posted on Friday, 04 July 2025
  • New
  • some questions on Hotspots
    Hi, On Hotspots extension : 1) is it possible to add our own map layer / v...
    0 Replies
    Posted on Thursday, 03 July 2025
  • New
  • Trying to resize the image in the comments
    Hey everyone, Basically I am trying to make the images in the comments smalle...
    9 Replies
    Posted on Wednesday, 12 August 2009
    J5 compatibility for Hotspots
    Hi guys, Just started to update my old J3x website. Is there J5 compatibility p...
    2 Replies
    Posted on Monday, 24 February 2025
    • #Hotspots
    • #hotspots Joomla 5
    error message when adding/cofiguring email address
    When configuring the email plugin that send a email message to admin when a new ...
    0 Replies
    Posted on Friday, 09 May 2025