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.

$Sender->Body?

edited September 2011 in Vanilla 2.0 - 2.8
when writing a plugin you can use $Sender->Head->AddString, but how adding String to the body?

-----
String add to here?
</body>
Tagged:

Best Answer

  • UnderDogUnderDog MVP
    Answer ✓
    Detailed code
    At least try something. You found out that $Sender->Head->AddString added a string to the Head section of the HTML document, right? How did you find out? Well... you looked in the source.
    In the source you see many many events. It's saying something like $Sender->FireEvent
    Welll... In order to do something using a plugin you will have to use one of those events, namely $Sender->AfterBody
    Look in the source of one of the plugins.
    You will see lots of functions, for example AfterBody_FireEvent_Handler
    That's what you need to add in your plugin.

    Also take a look here:
    http://vanillaforums.org/docs/pluginquickstart

    There was an error rendering this rich post.

Answers

  • SS ✭✭
    event 'AfterBody' will help you. It is theme's event.
  • edited September 2011
    I'm not a Coder.
    Detailed code

    How to print before the </body>
  • UnderDogUnderDog MVP
    Answer ✓
    Detailed code
    At least try something. You found out that $Sender->Head->AddString added a string to the Head section of the HTML document, right? How did you find out? Well... you looked in the source.
    In the source you see many many events. It's saying something like $Sender->FireEvent
    Welll... In order to do something using a plugin you will have to use one of those events, namely $Sender->AfterBody
    Look in the source of one of the plugins.
    You will see lots of functions, for example AfterBody_FireEvent_Handler
    That's what you need to add in your plugin.

    Also take a look here:
    http://vanillaforums.org/docs/pluginquickstart

    There was an error rendering this rich post.

Sign In or Register to comment.