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

Language parameter in the link to the comment
Hello. 1) I have a multilingual website (3 languages). If someone added a comme...
1 Replies
Posted on Saturday, 06 April 2024
categories icon in header
Hi! I saw this in the promo, but I can't find how to set it up. https://compo...
0 Replies
Posted on Monday, 22 April 2024
  • New
    • #style
    • #Categories
    Questions on new installation...
    Working on getting this set up... https://eastend2024.joepolecheck.com/rumma...
    3 Replies
    Posted on Wednesday, 17 April 2024
  • Resolved
  • New
  • Changes to the Submission form
    Can you make changes to the Submission form? There are a few fields I'd like to ...
    0 Replies
    Posted on Thursday, 18 April 2024
  • New
  • Error received? Class "XMLReader" not fo
    Just installed the Pro version of Hotspots, but am getting an error when I try t...
    1 Replies
    Posted on Wednesday, 17 April 2024
  • Resolved
  • New