We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

What is the difference between OW_FloatBox and OW.ajaxFloatBox? | Forum

Maxim Kotov
Maxim Kotov Dec 3 '13
What should I use?
Daisy Team
Daisy Dec 10 '13
Maxim, please download our Plugin Skeleton plugin, this plugin will help you to understand the difference. Here is URL to the Store item: http://www.oxwall.org/store/item/695
Maxim Kotov
Maxim Kotov Dec 10 '13
I downloaded by didn't get the difference in usage even after few hours of looking into source code.

The Forum post is edited by Maxim Kotov Dec 10 '13
Daisy Team
Daisy Feb 4 '14
Maxim, have you found the difference yet? If no, let me explain it.

The main difference is these two floatboxes is that if you need to add a form or an existing component to the floatbox (for ex: skeleton, photo, sign in, invite users to the event/groups components, etc.) you should use the OW.ajaxFloatBox method by passing the specific parameters.

Let's take the Skeleton plugin as an example of ajax floatbox. If you check /ow_plugins/skeleton/controllers/floatbox.php file, you will see that by calling the OW.ajaxFloatBox the developer simply declares the SKELETON_CMP_Floatbox component with the specific parameters and there is no need to describe the behavior of the entire component.

If you take a look at the /ow_plugins/contact_importer/classes/email_provider.php file you will see that the developer manually describes the behavior of the floatbox.

The easiest and best way to call the specific floatbox is using the OW.ajaxFloatBox method unless your floatbox should simply contain some text.