registerFunction( 'onBeforeDisplayContent', 'botVoting' ); function botVoting( &$row, &$params, $page=0 ) { global $mosConfig_live_site, $mosConfig_absolute_path, $cur_template; global $Itemid; $id = $row->id; $option = 'com_content'; $task = mosGetParam( $_REQUEST, 'task', '' ); $html = ''; if ($params->get( 'rating' ) && !$params->get( 'popup' )){ $html .= '
'; $img = ''; // look for images in template if available $mainframe = mosMainFrame::getInstance(); $starImageOn = $mainframe->ImageCheck( 'rating_star.png', '/images/M_images/' ); $starImageOff = $mainframe->ImageCheck( 'rating_star_blank.png', '/images/M_images/' ); for ($i=0; $i < $row->rating; $i++) { $img .= $starImageOn; } for ($i=$row->rating; $i < 5; $i++) { $img .= $starImageOff; } $html .= ''; $html .= T_('User Rating') . ':' . $img . ' / '; $html .= intval( $row->rating_count ); $html .= "\n
\n"; $url = @$_SERVER['REQUEST_URI']; $url = ampReplace( $url ); if (!$params->get( 'intro_only' ) && $task != "blogsection") { $html .= ''; $html .= T_('Poor'); $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= T_('Best'); $html .= ' '; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; } $html .= "
\n"; } return $html; } ?>