Support » Plugin: Thickbox Announcement » [Plugin: Thickbox Announcement] A few bugs and easy fixes (v1.07)

  • Fabien, I don’t know if you are still updating this code, but I’ll share my findings here anyway. I found your plugin very useful, but there were just a few minor bugs:

    Found/tested on WP 3.1 with MultiSite enabled with SubDomains option.

    1. In the Options page, when I clicked on the link to “Edit Now” (to edit the inline content) I got an invalid URL (404). The plugin was trying to take me to “… /wp-admin/page.php?action=edit&post=xyz” I changed ‘page’ to ‘post’ and then it worked properly. ie “… /wp-admin/post.php?action=edit&post=xyz”

    2. The Thickbox script was trying to load images (eg. the animated loading gif) from the wrong location, leading to a ton of 404 errors. It turns out this is a bug (sort of) with the built-in WP Thickbox script. See here: http://core.trac.wordpress.org/ticket/6453

    To fix this according to the instructions in that thread, I located the following line in fsThickboxAnnouncement.php (around line 242) :
    echo '<script>jQuery(document).ready(function(){tb_show("'.$t.'","'.$url.'","");});</script>';

    And I added the following lines just before that line:

    echo <<< END
    	<script type="text/javascript">
    	//<![CDATA[
    	var tb_pathToImage = "/wp-includes/js/thickbox/loadingAnimation.gif";
    	var tb_closeImage = "/wp-includes/js/thickbox/tb-close.png";
    	//]]>
    	</script>
    END;

    3. The plugin relies on WP_PLUGIN_URL to build the URL to load files from. However, I found that this constant is incorrectly set when using a SubDomain MultiSite installation. Instead, I replaced the WP_PLUGIN_URL constant with the plugins_url() function, and now the URL is correct.

    http://wordpress.org/extend/plugins/fsthickboxannouncement/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Thickbox Announcement] A few bugs and easy fixes (v1.07)’ is closed to new replies.