Jump to content

How to use OA_Dal::factoryDO in deliveryAdRender plugin?


wioncy

Recommended Posts

I have a plugin which extends deliveryAdRender and hooks postAdRender for custom macros generation. I need to get a campaign name for this macros.
When I try to include lib/OA/Dal.php and call  OA_Dal::factoryDO('campaigns');
I see error Fatal error: Cannot redeclare _pear_call_destructors() in /usr/share/pear/PEAR.php on line 771

PHP version is 5.5.38

Maybe I do something wrong with configuration and you have some config option to pass DB object as dependency for my hook?


<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet type="text/xsl" href=""?>
<plugin>
    <name>tmCustomMacro</name>
    <creationDate>2016-12-01</creationDate>
    <author>123.com</author>
    <authorEmail>[email protected]</authorEmail>
    <authorUrl>http://www.example.com</authorUrl>
    <license><![CDATA[
        <a href="http://creativecommons.org/licenses/by-nd/3.0/">Creative Commons Attribution-No Derivative Works 3.0 Unported</a>
    ]]></license>
    <description>tmCustomMacro</description>
    <version>1.0.0</version>
    <oxversion>2.8.0</oxversion>
    <extends>deliveryAdRender</extends>
    <install>
        <files>
            <file path="{MODULEPATH}deliveryAdRender/tmCustomMacro/">tmCustomMacro.delivery.php</file>
        </files>
        <components>
            <component>
                <name>tmCustomMacro</name>
                <hook>postAdRender</hook>
            </component>
        </components>
    </install>
</plugin>
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...