Support » Plugins » Plugin to Widget issue

  • I’m trying to convert a plugin i acquired called Adicons Server, it’s enabled and working but i want to widgetify it so i can place it in a proper position in my sidebar rather than at the bottom. The sidebar is dynamic so i can’t just paste the php function where i like, it’s either top of the sidebar or bottom, i want middle.

    To that end, i got something called custom widgets that takes the function of the plugin calls it in a widget, but my problem is i can’t really determine what function to call and if i need any variables (i assume i don’t since theyre just images to be clicked)

    I can’t contact the original plugin owner since his site is non-existant.

    The code i pasted in my sidebar is:

    <?php AI_Interface::adIconShow(); ?>

    I’ve tried pasting the function as:

    nothing works.

    If needed i have the plugin files as well.

Viewing 1 replies (of 1 total)
  • That’s probably the one – not having seen the code.

    Try the statement:

    global $AI_Interface;

    before the method call. I assume there’s a global declaration inside the plugin, but if not, add one there.

    (P.S. – Don’t forget an if_function_exists(some_plugin_function) and/or if ($AI_Interface) call before, so you don’t get errors when/if the plugin is deactivated.)

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin to Widget issue’ is closed to new replies.