That was me!
what I've done:
Linked the JS of the Starbox to the view
Then I wrote a own little JavaScript function to open the AJAX
request to call the rating function within my Controller-Class.
like that:
var video_id = info.identity;
ajax = new Ajax.Request(main_uri+'/channel/rateVideo/'+video_id+'/',
{asynchronous:true, evalScripts:true, method:'get' ,parameters:info});
Then in the view the creation ot the Starbox is made like this:
<?php echo $ajax->div('starX'); ?>
<script language='javascript' type='text/javascript'>
new Starbox('starX', <?=$rating?>, {indicator: 'the
indicator',
locked:false, identity:'<?=$video["Video"]["id"]?>',rated: 0,onRate:
go, rerate: true, max: 5, stars: 5, buttons: 10, total: <?=
$ratingCount?>, ghosting: true});
</script>
<?php echo $ajax->divEnd('starX'); ?>
With a newer version ot the Starbox this may be done in a better way.
But I did not migrate yet.
Hope this helps a little
On 15 Apr., 17:26, foxmask <[EMAIL PROTECTED]> wrote:
> I saw in this
> posthttp://groups.google.com/group/cake-php/browse_thread/thread/fc6927c7...
> that someone spoke aboutStarboxwith CakePHP.
>
> Can someone provides us some example on how to useStarboxwith
> CakePHP ?
>
> Kind Regards.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---