mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
uniqueId option added to rate class.
This commit is contained in:
@@ -69,10 +69,17 @@ class rater {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$template = vartrue($options['template'], " STATUS |RATE|VOTES");
|
$template = vartrue($options['template'], " STATUS |RATE|VOTES");
|
||||||
|
|
||||||
|
$identifier = $table.'-'.$id;
|
||||||
|
|
||||||
|
if(!empty($options['uniqueId']))
|
||||||
|
{
|
||||||
|
$identifier .= '-'.$options['uniqueId'];
|
||||||
|
}
|
||||||
|
|
||||||
$TEMPLATE['STATUS'] = " <span class='e-rate-status e-rate-status-{$table}' id='e-rate-{$table}-{$id}' style='display:none'>".$label."</span>";
|
$TEMPLATE['STATUS'] = " <span class='e-rate-status e-rate-status-{$table}' id='e-rate-{$identifier}' style='display:none'>".$label."</span>";
|
||||||
$TEMPLATE['RATE'] = "<div class='e-rate e-rate-{$table}' id='{$table}-{$id}' data-hint=\"{$datahint}\" data-readonly='{$readonly}' data-score='{$score}' data-url='".e_HTTP."rate.php' data-path='{$path}'></div>";
|
$TEMPLATE['RATE'] = "<div class='e-rate e-rate-{$table}' id='{$identifier}' data-hint=\"{$datahint}\" data-readonly='{$readonly}' data-score='{$score}' data-url='".e_HTTP."rate.php' data-path='{$path}'></div>";
|
||||||
$TEMPLATE['VOTES'] = "<div class='muted e-rate-votes e-rate-votes-{$table}' id='e-rate-votes-{$table}-{$id}'><small>".$this->renderVotes($votes,$score)."</small></div>";
|
$TEMPLATE['VOTES'] = "<div class='muted e-rate-votes e-rate-votes-{$table}' id='e-rate-votes-{$identifier}'><small>".$this->renderVotes($votes,$score)."</small></div>";
|
||||||
|
|
||||||
$tmp = explode("|",$template);
|
$tmp = explode("|",$template);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user