Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
617 views
in Plugins by

Hi,

I created a widget that will be display something on the left side.

I did like below:

1. In the plugin.php file:

- Create plugin: qa_register_plugin_module('widget', 'qa-filename.php', 'qa_pluginname', 'Title');

2. In the qa-filename.php:

class qa_pluginname{

function allow_template($template){

    return true;

}

 

function allow_region($region){

   return true;

}

public function output_widget($region, $place, $themeobject, $template, $request, $qa_content){

   echo 'HELLO, WORLD!';

}

}

I'm using Q2A v1.4.3

But nothing display as expected. Somebody can help?

Thank you very much.

 

Q2A version: 1.4.3

2 Answers

0 votes
by
The first file should be qa-plugin.php.
by
sure! Just my fault. The first file is exactly qa-plugin.php
But the result is the same.

Actually, my plugin includes a page and a side widget. The page display without error but the side widget.
by
have you enabled the widget in admin/layout?
by
I'm thinking of writing a "how to" manual here since I've been losing time trying to figure out how it works. I could not get anything in the sidebar either! I realized that while plugins autoinstall, the sidebar 'on-off' was not automatic. I was entering zero for items thinking that turned it off until i discovered this setting. It's in the right place. I think that having a better overall layout that separates these things will make it more obvious. For example, having a short list of options on the page as anchored lists (a shorter version of the way it works in plugins) would be ideal to quick jump to settings on a page. Just a thought on interface.
0 votes
by
Some themes do not render the regions in the sidebar and thats a reason for misssing widgets there. Check if this is the case with you, especially if using 3dr party theme.
...