Keyword

Insert some code right before comments

  • CollectiveRay
  • CollectiveRay's Avatar Topic Author
  • Offline
  • New Member
More
8 years 8 months ago #146749 by CollectiveRay
Insert some code right before comments was created by CollectiveRay
Hi guys,

I've been using your excellent plugin for some time now and must say it's great - never had a hickup :)

I'd like to now add a small piece of code right before the comments / disqus panel on each article starts. Tried adding the widget to

/plugins/content/jw_disqus/jw_disqus/tmpl/article.php

right before <a id="startOfPage"></a> but it did not work. Can you guide me where I should place the code please for it to work as requested?

Thanks

www.collectiveray.com - CollectiveRay - We make Joomla and WordPress Easy! Tutorials, Tips and Tricks, and plenty of great content.

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #146755 by Lefteris
Replied by Lefteris on topic Insert some code right before comments
Hi,

It should work. This is the layout that is used in article page. Have you tried to clean Joomla! cache?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • CollectiveRay
  • CollectiveRay's Avatar Topic Author
  • Offline
  • New Member
More
8 years 7 months ago #146758 by CollectiveRay
Replied by CollectiveRay on topic Insert some code right before comments
Ah shoot - yes in fact it's working now. Thanks so much Lefteris!

www.collectiveray.com - CollectiveRay - We make Joomla and WordPress Easy! Tutorials, Tips and Tricks, and plenty of great content.

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #146795 by Lefteris
Replied by Lefteris on topic Insert some code right before comments
You are welcome.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #151499 by richardsonkane
Replied by richardsonkane on topic Insert some code right before comments
the template alteration method beacause I intended this function for a module so anybody can use it as soon as the module is enabled. I have now a clue though. I'm looking at the Administration Menu module. It seems that they were able to achieve this.

function YOURMODULENAME_page_process(&$children, $elements) {
// your code
$MY_CODE = 'HERE YOUR CODE';
// Insert custom_code after the opening body tag.
$children = preg_replace('@<body[^>]*>@', '$0' . $MY_CODE, $children, 1);
return $children;
}

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #151506 by Lefteris
Replied by Lefteris on topic Insert some code right before comments
@richardsonkane

I don't get what you mean. Are you facing an issue with the plugin?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum