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

Complete Uninstall to Work in J4??
We have recently updated a site from Joomlav3 to v4 (4.4.2). Now when we go to m...
4 Replies
Posted on Tuesday, 30 April 2024
  • New
  • verschiedene URL's für Kursübersicht einer Kategor
    Hallo, ich habe eine Frage in Bezug auf SEO: ein externer Spezialist macht die...
    1 Replies
    Posted on Monday, 29 April 2024
  • New
  • Google no index für bestimmte Seiten/Details
    Hallo ich habe eine kleine Frage: wo kann ich einstellen, dass Google die Seite...
    1 Replies
    Posted on Wednesday, 24 April 2024
    Changes to Submission Form?
    Are you able to make changes to the Hotspot submission form? There are several f...
    0 Replies
    Posted on Friday, 26 April 2024
  • New
  • Question regarding custom fields
    How do I access custom fields after I have created them?...
    0 Replies
    Posted on Wednesday, 24 April 2024
    • #custom fields