Made Some Changes / Cleanup / Question

When I installed and setup the pop-up plugin, one option that didn't immediately seem obvious was the ability to set the height and width AND use javascript to center that vertically and horizontally. When that javascript option was checked, it would resize the popup bigtime. I ended up altering the popover-load-js.php "po_loadMessageBox()" function like this:

Add this at line 105 (after the "if( data['usejs'] ) ... loop)

// JCC: Just use JQ to center it, not size it.
jQuery('#' + data['name']).css('top', (jQuery(window).height() / 2) - (jQuery('#message').outerHeight() / 2) );
jQuery('#' + data['name']).css('left', (jQuery(window).width() / 2) - (jQuery('#message').outerWidth() / 2) );

This keeps my dimensions and centers it in the middle of the screen.

Also, I didn't like how it just "appeared", so I changed lines 263 and 264 in the "popoverajax.php" application to use "display:none" instead of "visibility:hidden"

This allows me to do stuff like:

jQuery('#' + data['name']).show('slow');

in the po_loadMessageBox() function so that the popover sort of fades in nicely.

Granted, I hacked the plugin to get exactly what I want, but I would be awesome if you could code that sort of stuff into the settings as options ... what easing to use when showing the plugin, keep the dimensions on center, colors, rounded corners, padding, background colors, etc.

That way, we can totally get the look and feel that we want without having to hack. More options the better!

Another question is all of the .js and .css files. Seems to be a lot of duplication and I wasnt sure of which to modify/override.

Thanks for listening.

John Cokos

  • Kimberly
    • Champion of Loops

    Hi John!

    Welcome to the Dev community!

    I'm going to go ahead and mark this as a feature request and see about getting the developers input here. The more bells and whistles the better, I totally agree :slight_smile:

    As far as which files to modify, I think it would depend on which features you're trying to add or change. The automatic center and resize box is JavaScript stuff in the other manual settings are more CSS-ish

    Perhaps Barry can comment on that as well



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.