Support » Plugin: AdRotate Banner Manager » [Plugin: AdRotate] jQuery problem (lightbox component)

  • Resolved ChowKaiDeng


    I’m not completely sure, but I think that AdRotate is breaking something in my jQuery library calls. This happens after WordPress upgraded to 3.3.1

    This is the problem: among my plugins, I have installed Rich Widget, which is a simple plugin that adds a FCKEditor like box to widgets, so you can edit the content of them in RTF.

    When AdRotate is activated, I can’t see no more the lightbox on the RTF editor of Rich Widget, and when deactivated, it shows ok.

    I thought it was something with the jQuery library version called by the updated WordPress, so I de-registered the jquery script and registered a specific version of jquery (older) on my functions file, but nothings happens.

    Is someone around here having a similar problem, maybe with other plugins that use similar lightbox scripts?


Viewing 4 replies - 1 through 4 (of 4 total)
  • AdRotate doesnt use or load jquery.

    So, what’s this?

    File: adrotate-functions.php (line 848)

    function adrotate_filemanager_admin_scripts() {

    (line 862)

    function adrotate_filemanager_admin_styles() {

    File: adrotate.php (line 675)

    <script language="JavaScript">
    			jQuery(document).ready(function() {
    				jQuery('#adrotate_image_button').click(function() {
    					formfield = jQuery('#adrotate_image').attr('name');
    					tb_show('', 'media-upload.php?type=image&TB_iframe=true');
    					return false;
    				window.send_to_editor = function(html) {
    					imgurl = jQuery('img',html).attr('src');

    That was just a quick search among obvious files, but I haven’t check them all properly.

    As I see, the AdRotate thickbox could be interfering with the Rich Widget thickbox. They both use jQuery.

    Oh duh.. forgot about those.
    However, those are WP api’s/functions used by many plugins.

    Yes indeed. After a few minutes I’ve figured out. The problem was caused by Rich Widget, not AdRotate.
    Rich Widget was doing this ugly thing:

    echo '<link href="' . RB_RICHWIDGET_BASEURL . '/thickbox/thickbox.css" rel="stylesheet" type="text/css" />';
    wp_enqueue_script('thickbox_custom', RB_RICHWIDGET_BASEURL . '/thickbox/thickbox.js');

    Instead of just simply this:


    I guess that Rich Widget was written in a time when thickbox was not part of the core scripts of WP, or something like that.

    I’ve changed the thing and everything it’s ok. I’m gonna post all this stuff on the Rich Widget forum.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: AdRotate] jQuery problem (lightbox component)’ is closed to new replies.