WordPress.org

Forums

Category Grid View Gallery
I suggest you a fix on CatViewGrid.php (2 posts)

  1. webEng
    Member
    Posted 1 year ago #

    Hi,
    I'm the developer of sliding youtube gallery, another wordpress plugin.
    I found out that when a user don't insert a shortcode for your plugin, the generated javascript cause an error. "paginateVal is not defined" That's because when this script runs (CatViewGrid.php) like this:

    function cg_init_js(){
            global $paginateVal;
            echo '<script type="text/javascript">';
    	echo 'paginateVal = '.$paginateVal.';';
    	echo '</script>';
    	do_action('cg_init_js');
    }

    If $paginateVal is null then user will have javascript error causing other plugin break. I suggest you to modify the script like this:

    function cg_init_js(){
            global $paginateVal;
    	if (empty($paginateVal)) {
    		$paginateVal = 0;
    	}
    	echo '<script type="text/javascript">';
    	echo 'paginateVal = '.$paginateVal.';';
    	echo '</script>';
    	do_action('cg_init_js');
    }

    Thank you.

    Luca

    http://wordpress.org/plugins/category-grid-view-gallery/

  2. elitetester
    Member
    Posted 11 months ago #

    I confirm there were problems with simple-press forum and wp-polls. At least these two were having severe issues. When I applied the 'fix' as given above the issue appears to be resolved.

    I hope the author considers adding this to the plugin.

    Great job Luca!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic