WordPress.org

Ready to get started?Download WordPress

Forums

Thickbox Announcement
A few bugs and easy fixes (v1.07) (3 posts)

  1. jason_lane
    Member
    Posted 3 years ago #

    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/

  2. erkansahan
    Member
    Posted 2 years ago #

    @jason_lane Hi;

    Thank you so much for easy fixes.

    Erkan

  3. Anuradha Edirisuriya
    Member
    Posted 2 years ago #

    Thank you for the fix jason_lane

    But it shows only black screen when entered into website. No announcement is shown. Take a look.

    http://www.bandaranayake.sch.lk

    Do you know what is the issue? I'm running the latest WordPress.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic