[TYPO3-english] ext: ratings and mootools

Antonio Willybiro keiser_soze at hotmail.com
Mon Nov 3 22:55:32 CET 2008


Hi there,

i certainly just dont it but i cant get the extension ratings to work with 
the tip from http://bugs.typo3.org:80/view.php?id=8918

what i did:

1. deleted all the content in the rating.js file and replaced it with:
var myAjax = new Ajax("index.php?eID=tx_ratings_ajax", {
         method: 'post',
         data: 'ref=' + id + '&rating=' + rating + '&data=' + ajaxData +
 '&check=' + check,
         update: 'tx-ratings-' + id
     });
myAjax.request();
2. I already had t3mootools intalled and confirgured with Ajax3. when it 
says Include mootools in Ext: class.tx_ratings_api.php, function 
addHeaderParts()(Explanation in t3mootools-manual, section "Configuration") 
I went to the file typo3conf/ext/ratings/class.tx_ratings_api.php There i 
search for the function function addHeaderParts() and added the piece of 
code from 
http://typo3.org/documentation/document-library/extension-manuals/t3mootools/1.2.3/view/1/3/My 
final function addHeaderparts looks like the following: protected function 
addHeaderParts($ref, $template, $conf) {  $subPart = 
$this->cObj->getSubpart($template, '###HEADER_PARTS###');  $key = 
'tx_ratings_' . md5($subPart);  if 
(!isset($GLOBALS['TSFE']->additionalHeaderData[$key])) {   if 
($conf['additionalCSS']) {    $subSubPart = 
$this->cObj->getSubpart($template, '###ADDITIONAL_CSS###'); 
$subParts['###ADDITIONAL_CSS###'] = 
trim($this->cObj->substituteMarker($subSubPart,      '###CSS_FILE###', 
$GLOBALS['TSFE']->tmpl->getFileName($conf['additionalCSS'])));   }   else 
{    $subParts['###ADDITIONAL_CSS###'] = '';   } 
$GLOBALS['TSFE']->additionalHeaderData[$key] = 
$this->cObj->substituteMarkerArrayCached($subPart, array( 
'###SITE_REL_PATH###' => t3lib_extMgm::siteRelPath('ratings'),    ), 
$subParts);  }        // checks if t3mootools is loaded  if 
(t3lib_extMgm::isLoaded('t3mootools'))    { 
require_once(t3lib_extMgm::extPath('t3mootools').'class.tx_t3mootools.php'); 
  }    // if t3mootools is loaded and the custom Library had been created 
if (defined('T3MOOTOOLS')) {   tx_t3mootools::addMooJS();  // if none of the 
previous is true, you need to include your own library  // just as an 
example in this way  } else { 
$GLOBALS['TSFE']->additionalHeaderData['rgsmoothgallery'] =   '<script 
src="'.$this->getPath($this->conf['pathToMootools']).'" 
type="text/javascript"></script>';  }   }And the plugin does not work. In 
the FE i see the message: "Not rated yet. Be the first who rates this item! 
Click the rating bar to rate this item. "With some empty stars and that's 
it. No way to rate anything.Any help/hint is welcomed.ThanksAntonio 




More information about the TYPO3-english mailing list