Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to add custom code just under the post
I want to know how to add custom code just under the post,like this:
I know the plugin adsense can Realize the effect of the above,but It can't add custom code,and the plugin Pockets does not work neither.
Any one has idea of it?
thanks?
0
Best Answer
-
peregrine MVP
you could write a plugin to insert code using this event
<?php $Sender->FireEvent('AfterCommentBody'); ?>or you can modify helper_functions.php -
if so, you can modify helper_functions.php in the applications/vanilla/views/discussion.
and put what you want after this:
echo $Object->FormatBody;I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
1
Answers
You can achieve this by either making a plugin, making your theme hookable or directly editing the views. If you need more info just say the word!
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
pockets plugin should do the trick, if it is only google ads.
grep is your friend.
thank you kasperisager and x00
I have tried to edit the views yestoday,but I can't find the Exact position is,could you tell me which views file and which position I will edit.
pockets plugin can't insert code in that position.
you could write a plugin to insert code using this event
<?php $Sender->FireEvent('AfterCommentBody'); ?>or you can modify helper_functions.php -
if so, you can modify helper_functions.php in the applications/vanilla/views/discussion.
and put what you want after this:
echo $Object->FormatBody;
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
see if this plugin works for you
"Comment Body Insert"
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
thank you very much peregrine,it works great~
glad it works for you.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.