news4ward-rateit integriert
This commit is contained in:
parent
90a65bcc43
commit
19feefda83
@ -67,6 +67,7 @@ $GLOBALS['TL_LANG']['tl_rateit_type_options']['faq'] = 'FAQ';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_type_options']['ce'] = 'Inhaltselement';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_type_options']['module'] = 'Modul';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_type_options']['galpic'] = 'Galerie-Bild';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_type_options']['news4ward'] = 'Beitrag';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_order_options']['rating desc'] = 'Bewertung';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_order_options']['title'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_order_options']['typ'] = 'Typ';
|
||||
|
@ -67,6 +67,7 @@ $GLOBALS['TL_LANG']['tl_rateit_type_options']['faq'] = 'FAQ';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_type_options']['ce'] = 'Content element';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_type_options']['module'] = 'Module';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_type_options']['galpic'] = 'Gallery picture';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_type_options']['news4ward'] = 'Blog entry';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_order_options']['rating desc'] = 'Rating';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_order_options']['title'] = 'Title';
|
||||
$GLOBALS['TL_LANG']['tl_rateit_order_options']['typ'] = 'Type';
|
||||
|
@ -90,6 +90,7 @@
|
||||
.mod_rateit table.rating td.type-faq { background-color:#ffe0aa; }
|
||||
.mod_rateit table.rating td.type-article { background-color:#ffcce0; }
|
||||
.mod_rateit table.rating td.type-galpic { background-color:#ffe066; }
|
||||
.mod_rateit table.rating td.type-news4ward { background-color:#ffe011; }
|
||||
.mod_rateit table.rating td.active-1, .mod_rateit table.rating td.type-page { background-color:#e0ffe0; }
|
||||
.mod_rateit table.rating td.
|
||||
|
||||
|
@ -212,7 +212,7 @@ function doRateIt() {
|
||||
getStarPercent: function(id) {
|
||||
/* Format = anyStringHere-<id>-<float(currentStars)>_(scale);
|
||||
* Example: RateItRatings-5-3_5 //Primary key id = 5, 3/5 stars. */
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
if (stars != null) {
|
||||
var score = stars[3].toFloat();
|
||||
var scale = stars[4].toFloat();
|
||||
@ -236,17 +236,17 @@ function doRateIt() {
|
||||
},
|
||||
|
||||
getRatableId: function(id) {
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
return stars != null ? stars[1] : '';
|
||||
},
|
||||
|
||||
getRatableType: function(id) {
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
return stars != null ? stars[2] : '';
|
||||
},
|
||||
|
||||
getRatableMaxValue: function(id) {
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
return stars != null ? stars[4].toInt() : 0;
|
||||
},
|
||||
|
||||
@ -451,7 +451,7 @@ function doRateIt() {
|
||||
getStarPercent: function(id) {
|
||||
/* Format = anyStringHere-<id>-<float(currentStars)>_(scale);
|
||||
* Example: RateItRatings-5-3_5 //Primary key id = 5, 3/5 stars. */
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
if (stars != null) {
|
||||
var score = parseFloat(stars[3]);
|
||||
var scale = parseFloat(stars[4]);
|
||||
@ -475,17 +475,17 @@ function doRateIt() {
|
||||
},
|
||||
|
||||
getRatableId: function(id) {
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
return stars != null ? stars[1] : '';
|
||||
},
|
||||
|
||||
getRatableType: function(id) {
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
return stars != null ? stars[2] : '';
|
||||
},
|
||||
|
||||
getRatableMaxValue: function(id) {
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);
|
||||
return stars != null ? parseInt(stars[4]) : 0;
|
||||
},
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -98,7 +98,7 @@ class RateIt extends \Frontend {
|
||||
}
|
||||
|
||||
//Make sure that the ratable type is 'page' or 'ce' or 'module'
|
||||
if (!($type === 'page' || $type === 'article' || $type === 'ce' || $type === 'module' || $type === 'news' || $type === 'faq' || $type === 'galpic')) {
|
||||
if (!($type === 'page' || $type === 'article' || $type === 'ce' || $type === 'module' || $type === 'news' || $type === 'faq' || $type === 'galpic' || $type === 'news4ward')) {
|
||||
header(RETURN_AJAX_HEADER);
|
||||
echo $GLOBALS['TL_LANG']['rateit']['error']['invalid_type'];
|
||||
exit;
|
||||
|
@ -66,25 +66,17 @@
|
||||
</div>
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://data-vocabulary.org/Review-aggregate" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<?php if ($this->showBefore) : ?>
|
||||
<div id="<?php echo $this->descriptionId; ?>" class="ratingText"><?php echo $this->description; ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrapper">
|
||||
<div class="rateItRating-selected" style="display: block;"></div>
|
||||
<div class="rateItRating-hover"></div>
|
||||
</div>
|
||||
<?php if ($this->showAfter) : ?>
|
||||
<div id="<?php echo $this->descriptionId; ?>" class="ratingText"><?php echo $this->description; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<span class="rating-microdata" itemprop="itemreviewed"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://data-vocabulary.org/Rating" itemscope="" itemprop="rating">
|
||||
<span itemprop="average"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="best"><?php echo $this->maxRating; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<?php if ($this->showBefore) : ?>
|
||||
<div id="<?php echo $this->descriptionId; ?>" class="ratingText"><?php echo $this->description; ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrapper">
|
||||
<div class="rateItRating-selected" style="display: block;"></div>
|
||||
<div class="rateItRating-hover"></div>
|
||||
</div>
|
||||
<?php if ($this->showAfter) : ?>
|
||||
<div id="<?php echo $this->descriptionId; ?>" class="ratingText"><?php echo $this->description; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
Loading…
Reference in New Issue
Block a user