Strict Standards: Declaration of action_plugin_discussion::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/opinian/public_html/wiki/lib/plugins/discussion/action.php on line 16

Strict Standards: Declaration of action_plugin_translation::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/opinian/public_html/wiki/lib/plugins/translation/action.php on line 90

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /home/opinian/public_html/wiki/inc/cache.php on line 289

Warning: Cannot modify header information - headers already sent by (output started at /home/opinian/public_html/wiki/lib/plugins/discussion/action.php:16) in /home/opinian/public_html/wiki/inc/auth.php on line 295

Strict Standards: Only variables should be passed by reference in /home/opinian/public_html/wiki/doku.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /home/opinian/public_html/wiki/lib/plugins/discussion/action.php:16) in /home/opinian/public_html/wiki/inc/actions.php on line 495

Warning: Cannot modify header information - headers already sent by (output started at /home/opinian/public_html/wiki/lib/plugins/discussion/action.php:16) in /home/opinian/public_html/wiki/inc/actions.php on line 495
====== Implementing JavaScript module ====== First, you have to put Opinian Cross-domain communication messenger file on your server. Depending on what server side programming language you use, copy appropriate file to your server (.asp, .php, ...).\\ Download it here {{:opinian_xdm_receiver20090831.zip|opinian_xdm_receiver}} \\ After that, you have to include Opinian javascript library file. The beginning of your tag is a good place for that. \\ Then you have to call init method of Opinian class to init your application with second argument representing relative path to the Opinian Cross-domain communication messenger you downloaded: \\ And that's it! You are ready to call [[the_list_of_opinian_api_methods_for_user_actions|methods]] for Opinian user actions! \\ Very basic whole example could look something like this: getItem(array("slug"=>"paris-hilton", "category_id"=>323)); if (!empty($Opinian->last_error)) die($Opinian->last_error); echo "
"; echo $item['Item']['title']; echo "
"; echo "
"; echo "General rating is: ".round($item['Item']['rating_sum']/$item['Item']['rating_count'], 2); echo "
"; ?> Rate: 1 2 3 4 5 6 7 8 9 10
\\ It will produce the simple page like this:\\ Paris Hilton\\ General rating is: 6\\ Rate: __1__ __2__ __3__ __4__ __5__ __6__ __7__ __8__ __9__ __10__\\ \\ More complex example with general rating and all other ratings with stars and boxes can be found here.\\ {{:opinian_api_ratings_example.zip|}}