https://www.icyphoenix.com/viewtopic.php?f=26&t=4407&p=30295#p30295 ----------------------------------- whiskey_pete Tue 05 Aug, 2008 00:09 Re: Integration Of JS Rating Widget ----------------------------------- Knowing what Artie told me it's really not hard to integrate the rating widget. [url=http://worldbiology.net/album.php]Demo site - may change with time Please note that I don't have much experience with html or php, so the code below [b]may contain errors[/b] (though its working fine on my test site). You are [b]highly advised to back up[/b] the files you edit when installing this widget! [b]OPEN[/b] includes/album_mod/album_hierarchy_sql.php [b]FIND[/b] [code linenumbers=false]'PIC_ID' => $picrow[$j]['pic_id'],[/code] [b]AFTER ADD[/b] [code linenumbers=false]'U_PIC_FULL_URL' => $server_path . ALBUM_UPLOAD_PATH . $picrow[$j]['pic_filename'],[/code] [b]FIND[/b] [code linenumbers=false]$template->assign_block_vars('index_pics_block.picrow.pic_detail', array([/code] [b]BEFORE ADD[/b] [code linenumbers=false]// server_path required for JS-Kit's Ratings widget $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; $server_name = trim($board_config['server_name']); $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; $script_name = preg_replace('/^/?(.*?)/?$/', '1', trim($board_config['script_path'])); $script_name = ( $script_name == '' ) ? '' : $script_name . '/'; $server_path = $server_protocol . $server_name . $server_port . $script_name;[/code] [b]OPEN[/b] templates/mg_themes/album_showpage_body.tpl [b]FIND[/b] [code linenumbers=false] {L_RATING}: {PIC_RATING}
 

[/code] [b]REPLACE WITH[/b] [code linenumbers=false] {L_RATING}:
[/code] [b]OPEN[/b] templates/mg_themes/album_cat_body.tpl [b]FIND[/b] [code linenumbers=false] {index_pics_block.picrow.pic_detail.RATING} [/code] [b]REPLACE WITH[/b] [code linenumbers=false]
[/code] For customisations like how to change the default stars with your own images please see here: http://js-kit.com/ratings/custom.html To increase reliability of the widget you can upload te ratings.js in to you root directory (I'm not very sure though if this is not a copyright violation) You can suposedly also edit the .js file itself to localize it for your forum language. Just open the file in a text edittor and translate the variables you need in your language.