COMMUNITY FORUM
- Forum
- Free Joomla Extensions & Templates
- DISQUS Comments for Joomla!
- Insert some code right before comments
Insert some code right before comments
- CollectiveRay
- Topic Author
- Offline
- New Member
Less
More
9 years 3 months ago #146749
by CollectiveRay
www.collectiveray.com - CollectiveRay - We make Joomla and WordPress Easy! Tutorials, Tips and Tricks, and plenty of great content.
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
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.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
9 years 3 months ago #146755
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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?
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
- Topic Author
- Offline
- New Member
9 years 3 months ago #146758
by CollectiveRay
www.collectiveray.com - CollectiveRay - We make Joomla and WordPress Easy! Tutorials, Tips and Tricks, and plenty of great content.
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.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
9 years 3 months ago #146795
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
- richardsonkane
- Offline
- New Member
8 years 8 months 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;
}
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.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
8 years 8 months ago #151506
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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?
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.
- Forum
- Free Joomla Extensions & Templates
- DISQUS Comments for Joomla!
- Insert some code right before comments