Plugin development - output to home page?

2 posts / 0 new
Last post
holmesg
Plugin development - output to home page?

From looking at existing plugin code, I can see how to put the output into the sidebar:

    function HookEvents()
    {
        return array(
                "EVENT_REQUEST_SIDEBAR_CONTENT" => "GenerateFeaturedBox",
                );
    }

How do I instead output the content to the home page?  Or some other arbitrary location?

 

chalpin
Re: Plugin development - output to home page?

We're currently in the process of adding an EVENT_HTML_INSERTION_POINT designed for exactly the use-case you describe. However, we're still in the process of testing and refining it internally. The 3.1.0 release had an insertion point on the FullRecord page, and we'll be adding them to other pages over the course of the next releases.

If you need an insertion point at palce we don't yet provide one, you can create a custom local interface version of that page, and add:

<?PHP  $GLOBALS["AF"]->SignalEvent("EVENT_HTML_INSERTION_POINT",
        array($GLOBALS["AF"]->GetPageName(), "MyInsertionPointName"));  ?>

... in the location where you want to be able to insert HTML.

In your plugin, you'd then hook that event in your plugin, and have the plugin function output the HTML at the appropriate PageName and Location.

Please let us know where you're adding these, and we'll consider them for inclusion in our default interface.