Hello! I need some help to integrate JLex Review instead of jDownloads rating, below is the instructions could anyone help to modify to work on jDownloads items as Rating and Review:
Integration Into Other ExtensionsSame as popular components like as JLex Comment, JComment, Komento... JLex Review allow you integrate it to your component. It contain two parts:
Mini-star IconUsing to display average rating (or criterias) of item
<?php
$loader = JPATH_ROOT . '/components/com_jlexreview/load.php';
if (file_exists ( $loader )) {
require_once $loader;
echo JLexReviewLoad::quick_init ( $extension, $id );
}
Parameters:
$extension: (type:string) - name of component (without com_ prefix) : k2, virtuemart or easyblog ....
$id: (type:integer} - ID of item (maybe is article, blog item...)
Example:
<?php
$loader = JPATH_ROOT . '/components/com_jlexreview/load.php';
if (file_exists ( $loader )) {
require_once $loader;
echo JLexReviewLoad::quick_init ( 'k2', $item->id);
}
Review BodyPut code bellow where you want show review body.
<?php
$loader = JPATH_ROOT . '/components/com_jlexreview/load.php';
if (file_exists ( $loader )) {
require_once $loader;
echo JLexReviewLoad::init ( $title, $extension, $id , $section_id );
}
Parameters:
1.
$title (type:string) - name of reviewed item. If this param is blank, the JLex Review will find title automatically
2.
$extension (type:string) - name of component (without com_ prefix) : k2, virtuemart or easyblog ....
3.
$id (type:integer} - ID of item (maybe is article, blog item...)
4.
$section_id (type:integer | default:0} - Use it if you want create multiple different review/commenting systems
Example:<?php
$loader = JPATH_ROOT . '/components/com_jlexreview/load.php';
if (file_exists ( $loader )) {
require_once $loader;
echo JLexReviewLoad::init ( $this->item->title, 'k2', $this->item->id , $this->item->category->id );
}
I really appreciate the help and support you’ve given me.Referance:
https://www.jlexart.com/articles/jlex-review-documentation-1ps#use-2Thank You
