Пример #1
0
 static function printRating($wrapperId = 'rating-wrapper')
 {
     if (!function_exists('printRating')) {
         return;
     }
     printRating(3, NULL, false);
     $table = "images";
     echo '<script>' . '$(window).load(function() { ' . '	$("#' . $wrapperId . ' .star-rating-live").click(function() { ' . '      if ( !zin.ALBUM_PAGE || !zin.ALBUM_PAGE.lastThumbSelection ) return false; ' . '		var id = images[zin.ALBUM_PAGE.lastThumbSelection.attr("index")]["object_id"];' . '    	var dataString = $("#' . $wrapperId . ' form").serialize(); ' . '      var idx = dataString.lastIndexOf("="); ' . '      var value = dataString.substring(idx + 1); ' . '      dataString = "star_rating-value_images_" + id + "=" + value; ' . '		$.ajax({ ' . '			type: "POST", ' . '			url: "' . WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/rating' . '/update.php", ' . '			data: dataString + "&id=" + id + ' . '"&table=images", ' . '			success: function() { ' . '				images[zin.ALBUM_PAGE.lastThumbSelection.attr("index")].rating = value; ' . '			}' . '      });' . '	}); ' . '});' . '</script> ';
 }
Пример #2
0
/**
 * @deprecated
 * @since 1.2.7
 */
function printAlbumRating($object = NULL)
{
    deprecated_functions::notify(gettext('Use printRating().'));
    global $_zp_current_album;
    if (is_null($object)) {
        $object = $_zp_current_album;
    }
    printRating(3, $object);
}
Пример #3
0
		<?php 
if (function_exists('printGoogleMap')) {
    ?>
<div class="section"><?php 
    setOption('gmap_width', 550, false);
    printGoogleMap();
    ?>
</div><?php 
}
?>
		<?php 
if (function_exists('printRating')) {
    ?>
<div class="section"><?php 
    printRating();
    ?>
</div><?php 
}
?>
		<?php 
if (function_exists('printCommentForm')) {
    ?>
<div class="section"><?php 
    printCommentForm();
    ?>
</div><?php 
}
?>
	</div>
	<div id="sidebar"<?php 
Пример #4
0
/**
 * Prints the image rating information for the current image
 *
 */
function printAlbumRating()
{
    printRating("album");
}