Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
107e32c3be | |||
38d4df8232 | |||
9cef234103 | |||
c63c4dd127 | |||
08fd8c1319 | |||
93e4d2dd63 | |||
d15a1b43d2 | |||
ff5be550eb | |||
02cf727e11 | |||
7915541c6e | |||
c1f05e556c | |||
b1d3d540bb | |||
b922fe527c | |||
2a4001f77c | |||
fe9436a16f | |||
fb9540fe2e | |||
8ca4aad975 | |||
11e3e2817c | |||
d0359fa26a | |||
a832e33012 | |||
96b6bc3bf4 | |||
e73e6a8563 |
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/.project
|
||||
|
||||
/vendor
|
@ -1,142 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Contao Open Source CMS
|
||||
* Copyright (C) 2005-2011 Leo Feyer
|
||||
*
|
||||
* Formerly known as TYPOlight Open Source CMS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program. If not, please visit the Free
|
||||
* Software Foundation website at <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* PHP version 5
|
||||
* @copyright cgo IT, 2013
|
||||
* @author Carsten Götzinger (info@cgo-it.de)
|
||||
* @package rateit
|
||||
* @license GNU/LGPL
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
namespace cgoIT\rateit;
|
||||
|
||||
/**
|
||||
* Class RateItTopRatingsModule
|
||||
*/
|
||||
class RateItTopRatingsModule extends RateItFrontend
|
||||
{
|
||||
//protected $intStars = 5;
|
||||
|
||||
/**
|
||||
* Initialize the controller
|
||||
*/
|
||||
public function __construct($objElement) {
|
||||
parent::__construct($objElement);
|
||||
|
||||
$this->strKey = "rateit_top_ratings";
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a wildcard in the back end
|
||||
* @return string
|
||||
*/
|
||||
public function generate() {
|
||||
if (TL_MODE == 'BE') {
|
||||
$objTemplate = new \BackendTemplate('be_wildcard');
|
||||
|
||||
$objTemplate->wildcard = '### Rate IT Best/Most Ratings ###';
|
||||
$objTemplate->title = $this->name;
|
||||
$objTemplate->id = $this->id;
|
||||
$objTemplate->link = $this->name;
|
||||
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
|
||||
|
||||
return $objTemplate->parse();
|
||||
}
|
||||
|
||||
$this->strTemplate = $this->rateit_template;
|
||||
|
||||
$this->arrTypes = deserialize($this->rateit_types);
|
||||
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/rateit.min.css||static';
|
||||
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
|
||||
case 'hearts' :
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/heart.min.css||static';
|
||||
break;
|
||||
default:
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/star.min.css||static';
|
||||
}
|
||||
|
||||
return parent::generate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the module/content element
|
||||
*/
|
||||
protected function compile() {
|
||||
$this->Template = new \FrontendTemplate($this->strTemplate);
|
||||
|
||||
$this->Template->setData($this->arrData);
|
||||
|
||||
$this->import("\\Database", "Database");
|
||||
$arrResult = $this->Database->prepare("SELECT i.id AS item_id,
|
||||
i.rkey AS rkey,
|
||||
i.title AS title,
|
||||
i.typ AS typ,
|
||||
i.createdat AS createdat,
|
||||
i.active AS active,
|
||||
IFNULL(AVG(r.rating),0) AS best,
|
||||
COUNT( r.rating ) AS most
|
||||
FROM tl_rateit_items i
|
||||
LEFT OUTER JOIN tl_rateit_ratings r
|
||||
ON (i.id = r.pid)
|
||||
WHERE
|
||||
typ IN ('".implode("', '", $this->arrTypes)."')
|
||||
GROUP BY rkey, title, item_id, typ, createdat, active
|
||||
ORDER BY ".$this->rateit_toptype." DESC")
|
||||
->limit($this->rateit_count)
|
||||
->execute()
|
||||
->fetchAllAssoc();
|
||||
|
||||
$objReturn = array();
|
||||
foreach ($arrResult as $result) {
|
||||
$return = new \stdClass();
|
||||
$return->title = $result['title'];
|
||||
$return->typ = $result['typ'];
|
||||
|
||||
// ID ermitteln
|
||||
$stars = $this->percentToStars($result['best']);
|
||||
$return->rateItID = 'rateItRating-'.$result['rkey'].'-'.$result['typ'].'-'.
|
||||
$stars.'_'.intval($GLOBALS['TL_CONFIG']['rating_count']);
|
||||
$return->descriptionId = 'rateItRating-'.$result['rkey'].'-description';
|
||||
|
||||
$return->rateit_class = 'rateItRating';
|
||||
|
||||
// Beschriftung ermitteln
|
||||
$rating = array();
|
||||
$rating['totalRatings'] = $result['most'];
|
||||
$rating['rating'] = $result['best'];
|
||||
$return->description = $this->getStarMessage($rating);
|
||||
|
||||
$return->rating = $result['best'];
|
||||
$return->count = $result['most'];
|
||||
$return->rel = 'not-rateable';
|
||||
$objReturn[] = $return;
|
||||
}
|
||||
|
||||
$this->Template->arrRatings = $objReturn;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,8 +1,9 @@
|
||||
{
|
||||
"name":"cgo-it/rate-it",
|
||||
"description":"RateIt extension for the Contao Open Source CMS",
|
||||
"keywords":["contao", "rating", "rateit", "bewertung"],
|
||||
"type":"contao-module",
|
||||
"name":"cgo-it/contao-rate-it-bundle",
|
||||
"description":"RateIt extension for the Contao Open Source CMS as contao 4 bundle",
|
||||
"keywords":["contao", "rating", "rateit", "bewertung", "bundle"],
|
||||
"type":"contao-bundle",
|
||||
"homepage":"https://cgo-it.de",
|
||||
"license":"LGPL-3.0+",
|
||||
"authors":[
|
||||
{
|
||||
@ -13,35 +14,41 @@
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"email": "info@cgo-it.de",
|
||||
"issues": "https://bitbucket.org/cgo-it/contao-rate-it/issues?status=new&status=open",
|
||||
"issues": "https://git.cgo-it.de/contao/rate-it/issues",
|
||||
"forum": "https://community.contao.org/de/showthread.php?38471-Rate-It",
|
||||
"source": "https://bitbucket.org/cgo-it/contao-rate-it/src"
|
||||
"source": "https://git.cgo-it.de/contao/rate-it.git"
|
||||
},
|
||||
"require":{
|
||||
"php":">=5.3",
|
||||
"contao/core":">=3.0",
|
||||
"contao-community-alliance/composer-plugin": "~2.0",
|
||||
"leounglaub/contao-simple-ajax":"3.2.x-dev",
|
||||
"cgo-it/xls_export":"3.0.0"
|
||||
"php":">=7.0",
|
||||
"contao/core-bundle": "^4.4",
|
||||
"cgo-it/contao-xls_export-bundle": "^4.0",
|
||||
"richardhj/contao-simple-ajax": "^1.3"
|
||||
},
|
||||
"replace": {
|
||||
"cgo-it/rate-it": "<3.4.3"
|
||||
"require-dev": {
|
||||
"contao/manager-plugin": "^2.0"
|
||||
},
|
||||
"conflict": {
|
||||
"contao/core": "2.11.*"
|
||||
"contao/core": "*",
|
||||
"contao/manager-plugin": "<2.0 || >=3.0"
|
||||
},
|
||||
"extra":{
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"cgoIT\\rateit\\": "src/"
|
||||
},
|
||||
"classmap": [
|
||||
"src/Resources/contao/"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"src/Resources/contao/config/",
|
||||
"src/Resources/contao/dca/",
|
||||
"src/Resources/contao/languages/",
|
||||
"src/Resources/contao/templates/"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"contao": {
|
||||
"sources":{
|
||||
"":"system/modules/rateit"
|
||||
"runonce": ["src/Resources/contao/runonce/create-initial-data.php"]
|
||||
},
|
||||
"transifex":{
|
||||
"project": "rateit",
|
||||
"prefix": "core-",
|
||||
"languages_cto": "languages",
|
||||
"languages_tx": "languages"
|
||||
}
|
||||
}
|
||||
"contao-manager-plugin": "cgoIT\\rateit\\ContaoManagerPlugin"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
|
||||
;;
|
||||
; Configure what you want the autoload creator to register
|
||||
;;
|
||||
register_namespaces = true
|
||||
register_classes = true
|
||||
register_templates = true
|
@ -1,73 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Contao Open Source CMS
|
||||
*
|
||||
* Copyright (c) 2005-2014 Leo Feyer
|
||||
*
|
||||
* @package Rateit
|
||||
* @link https://contao.org
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Register the namespaces
|
||||
*/
|
||||
ClassLoader::addNamespaces(array
|
||||
(
|
||||
'cgoIT',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
* Register the classes
|
||||
*/
|
||||
ClassLoader::addClasses(array
|
||||
(
|
||||
// Classes
|
||||
'cgoIT\rateit\DcaHelper' => 'system/modules/rateit/classes/DcaHelper.php',
|
||||
'cgoIT\rateit\RateItArticle' => 'system/modules/rateit/classes/RateItArticle.php',
|
||||
'cgoIT\rateit\RateItBackend' => 'system/modules/rateit/classes/RateItBackend.php',
|
||||
'cgoIT\rateit\RateItCE' => 'system/modules/rateit/classes/RateItCE.php',
|
||||
'cgoIT\rateit\RateItFaq' => 'system/modules/rateit/classes/RateItFaq.php',
|
||||
'cgoIT\rateit\RateItFrontend' => 'system/modules/rateit/classes/RateItFrontend.php',
|
||||
'cgoIT\rateit\RateItHybrid' => 'system/modules/rateit/classes/RateItHybrid.php',
|
||||
'cgoIT\rateit\RateItModule' => 'system/modules/rateit/classes/RateItModule.php',
|
||||
'cgoIT\rateit\RateItNews' => 'system/modules/rateit/classes/RateItNews.php',
|
||||
'cgoIT\rateit\RateItPage' => 'system/modules/rateit/classes/RateItPage.php',
|
||||
'cgoIT\rateit\RateItRating' => 'system/modules/rateit/classes/RateItRating.php',
|
||||
'cgoIT\rateit\RateItBackendModule' => 'system/modules/rateit/classes/RateItBackendModule.php',
|
||||
'cgoIT\rateit\RateItTopRatingsModule' => 'system/modules/rateit/classes/RateItTopRatingsModule.php',
|
||||
'cgoIT\rateit\RateIt' => 'system/modules/rateit/public/php/rateit.php',
|
||||
'simple_html_dom' => 'system/modules/rateit/classes/extern/simple_html_dom.php',
|
||||
));
|
||||
|
||||
|
||||
/**
|
||||
* Register the templates
|
||||
*/
|
||||
TemplateLoader::addFiles(array
|
||||
(
|
||||
'article_rateit_default' => 'system/modules/rateit/templates',
|
||||
'article_rateit_default_microdata' => 'system/modules/rateit/templates',
|
||||
'gallery_rateit_default' => 'system/modules/rateit/templates',
|
||||
'j_colorbox_rateit' => 'system/modules/rateit/templates',
|
||||
'mod_article_list_rateit' => 'system/modules/rateit/templates',
|
||||
'mod_article_rateit_default_microdata_teaser' => 'system/modules/rateit/templates',
|
||||
'mod_article_rateit_default_teaser' => 'system/modules/rateit/templates',
|
||||
'mod_rateit_top_ratings' => 'system/modules/rateit/templates',
|
||||
'moo_mediabox_rateit' => 'system/modules/rateit/templates',
|
||||
'news_full_rateit' => 'system/modules/rateit/templates',
|
||||
'news_full_rateit_microdata' => 'system/modules/rateit/templates',
|
||||
'news_latest_rateit' => 'system/modules/rateit/templates',
|
||||
'news_latest_rateit_microdata' => 'system/modules/rateit/templates',
|
||||
'news_short_rateit' => 'system/modules/rateit/templates',
|
||||
'news_short_rateit_microdata' => 'system/modules/rateit/templates',
|
||||
'news_simple_rateit' => 'system/modules/rateit/templates',
|
||||
'news_simple_rateit_microdata' => 'system/modules/rateit/templates',
|
||||
'rateitbe_ratinglist' => 'system/modules/rateit/templates',
|
||||
'rateitbe_ratingview' => 'system/modules/rateit/templates',
|
||||
'rateit_default' => 'system/modules/rateit/templates',
|
||||
'rateit_microdata' => 'system/modules/rateit/templates',
|
||||
));
|
1
public/css/heart.min.css
vendored
1
public/css/heart.min.css
vendored
@ -1 +0,0 @@
|
||||
.mbrateItRating .wrapper,.rateItRating .wrapper{background:url(../images/heart.gif)}div.mbrateItRating div.rateItRating-hover,div.mbrateItRating div.rateItRating-selected,div.rateItRating div.rateItRating-hover,div.rateItRating div.rateItRating-selected{background:url(../images/heart.gif) left}
|
1
public/css/rateit.min.css
vendored
1
public/css/rateit.min.css
vendored
@ -1 +0,0 @@
|
||||
.rateItRating{position:relative;display:inline-block}.mbrateItRating{position:relative;opacity:1}.mbrateItRating .wrapper,.rateItRating .wrapper{cursor:pointer;position:relative;diplay:inline-block;height:16px}.rateItRating[rel=not-rateable]{float:right}.rateItRating[rel=not-rateable] .wrapper{cursor:default}div.mod_rateit_top_ratings ul{padding:0}div.mod_rateit_top_ratings li{list-style-type:none}div.mod_rateit_top_ratings div.rateItTitle{display:inline-block;max-width:40%;min-height:30px}div.mbrateItRating div.rateItRating-hover,div.mbrateItRating div.rateItRating-selected,div.rateItRating div.rateItRating-hover,div.rateItRating div.rateItRating-selected{position:absolute}.rateItRating .ratingText{color:#000}.mbrateItRating .mbratingText{display:inline-block;color:#ccc}.ratingText.ratingError{color:red}.mbrateItRating .mbratingText.loading,.rateItRating .ratingText.loading{background:url(../images/ajax-loading.gif) no-repeat}span.rating-microdata{display:none}
|
1
public/css/star.min.css
vendored
1
public/css/star.min.css
vendored
@ -1 +0,0 @@
|
||||
.mbrateItRating .wrapper,.rateItRating .wrapper{background:url(../images/star.gif)}div.mbrateItRating div.rateItRating-hover,div.mbrateItRating div.rateItRating-selected,div.rateItRating div.rateItRating-hover,div.rateItRating div.rateItRating-selected{background:url(../images/star.gif) left}
|
14
src/CgoITRateItBundle.php
Normal file
14
src/CgoITRateItBundle.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace cgoIT\rateit;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
/**
|
||||
* Configures the Contao aeo bundle.
|
||||
*
|
||||
* @author Carsten Götzinger
|
||||
*/
|
||||
class CgoITRateItBundle extends Bundle
|
||||
{
|
||||
}
|
28
src/ContaoManagerPlugin.php
Normal file
28
src/ContaoManagerPlugin.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace cgoIT\rateit;
|
||||
|
||||
use Contao\CoreBundle\ContaoCoreBundle;
|
||||
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
|
||||
use Contao\ManagerPlugin\Bundle\BundlePluginInterface;
|
||||
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;
|
||||
|
||||
/**
|
||||
* Plugin for the Contao Manager.
|
||||
*
|
||||
* @author Carsten Götzinger
|
||||
*/
|
||||
class ContaoManagerPlugin implements BundlePluginInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBundles(ParserInterface $parser)
|
||||
{
|
||||
return [
|
||||
BundleConfig::create(CgoITRateItBundle::class)
|
||||
->setLoadAfter([ContaoCoreBundle::class])
|
||||
->setReplace(['rate-it']),
|
||||
];
|
||||
}
|
||||
}
|
@ -30,11 +30,14 @@
|
||||
|
||||
namespace cgoIT\rateit;
|
||||
|
||||
define(RETURN_AJAX_HEADER, 'Content-Type: text/html');
|
||||
use cgoIT\rateit\RateItFrontend;
|
||||
use SimpleAjax\Event\SimpleAjax;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
class RateIt extends \Frontend {
|
||||
|
||||
var $allowDuplicates = false;
|
||||
var $rateItFrontend;
|
||||
|
||||
/**
|
||||
* Initialize the controller
|
||||
@ -42,6 +45,8 @@ class RateIt extends \Frontend {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
|
||||
$this->rateItFrontend = new RateItFrontend();
|
||||
|
||||
$this->loadLanguageFile('default');
|
||||
$this->allowDuplicates = $GLOBALS['TL_CONFIG']['rating_allow_duplicate_ratings'];
|
||||
$this->allowDuplicatesForMembers = $GLOBALS['TL_CONFIG']['rating_allow_duplicate_ratings_for_members'];
|
||||
@ -60,22 +65,27 @@ class RateIt extends \Frontend {
|
||||
* @param integer id - The id of key to register a rating for.
|
||||
* @param integer percent - The rating in percentages.
|
||||
*/
|
||||
function doVote() {
|
||||
if ($this->Input->get('do') == 'rateit') {
|
||||
public function doVote(SimpleAjax $event) {
|
||||
$input = $event->getEnvironment()->getInputProvider();
|
||||
|
||||
if ((true === $input->hasParameter('do'))
|
||||
&& ('rateit' === $input->getParameter('do'))
|
||||
) {
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
$rkey = $this->Input->post('id');
|
||||
$percent = $this->Input->post('vote');
|
||||
$type = $this->Input->post('type');
|
||||
$rkey = $input->getParameter('id');
|
||||
$percent = $input->getParameter('vote');
|
||||
$type = $input->getParameter('type');
|
||||
|
||||
//Make sure that the ratable ID is a number and not something crazy.
|
||||
if (strstr($rkey, '|')) {
|
||||
$arrRkey = explode('|', $rkey);
|
||||
foreach ($arrRkey as $key) {
|
||||
if (!is_numeric($key)) {
|
||||
header(RETURN_AJAX_HEADER);
|
||||
echo $GLOBALS['TL_LANG']['rateit']['error']['invalid_rating'];
|
||||
exit;
|
||||
$return = [$GLOBALS['TL_LANG']['rateit']['error']['invalid_rating']];
|
||||
$response = new JsonResponse($return);
|
||||
$event->setResponse($response);
|
||||
return $event;
|
||||
}
|
||||
$id = $rkey;
|
||||
}
|
||||
@ -83,9 +93,10 @@ class RateIt extends \Frontend {
|
||||
if (is_numeric($rkey)) {
|
||||
$id = $rkey;
|
||||
} else {
|
||||
header(RETURN_AJAX_HEADER);
|
||||
echo $GLOBALS['TL_LANG']['rateit']['error']['invalid_rating'];
|
||||
exit;
|
||||
$return = [$GLOBALS['TL_LANG']['rateit']['error']['invalid_rating']];
|
||||
$response = new JsonResponse($return);
|
||||
$event->setResponse($response);
|
||||
return $event;
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,16 +104,18 @@ class RateIt extends \Frontend {
|
||||
if (is_numeric($percent) && $percent < 101) {
|
||||
$rating = $percent;
|
||||
} else {
|
||||
header(RETURN_AJAX_HEADER);
|
||||
echo $GLOBALS['TL_LANG']['rateit']['error']['invalid_rating'];
|
||||
exit;
|
||||
$return = [$GLOBALS['TL_LANG']['rateit']['error']['invalid_rating']];
|
||||
$response = new JsonResponse($return);
|
||||
$event->setResponse($response);
|
||||
return $event;
|
||||
}
|
||||
|
||||
//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' || $type === 'news4ward')) {
|
||||
header(RETURN_AJAX_HEADER);
|
||||
echo $GLOBALS['TL_LANG']['rateit']['error']['invalid_type'];
|
||||
exit;
|
||||
$return = [$GLOBALS['TL_LANG']['rateit']['error']['invalid_type']];
|
||||
$response = new JsonResponse($return);
|
||||
$event->setResponse($response);
|
||||
return $event;
|
||||
}
|
||||
|
||||
$strHash = sha1(session_id() . (!$GLOBALS['TL_CONFIG']['disableIpCheck'] ? \Environment::get('ip') : '') . 'FE_USER_AUTH');
|
||||
@ -159,17 +172,18 @@ class RateIt extends \Frontend {
|
||||
->set($arrSet)
|
||||
->execute();
|
||||
} else {
|
||||
header(RETURN_AJAX_HEADER);
|
||||
echo $GLOBALS['TL_LANG']['rateit']['error']['duplicate_vote'];
|
||||
exit;
|
||||
$return = [$GLOBALS['TL_LANG']['rateit']['error']['duplicate_vote']];
|
||||
$response = new JsonResponse($return);
|
||||
$event->setResponse($response);
|
||||
return $event;
|
||||
}
|
||||
|
||||
$this->import('rateit\\RateItFrontend', 'RateItFrontend');
|
||||
$rating = $this->RateItFrontend->loadRating($id, $type);
|
||||
$rating = $this->rateItFrontend->loadRating($id, $type);
|
||||
|
||||
header(RETURN_AJAX_HEADER);
|
||||
echo $this->RateItFrontend->getStarMessage($rating);
|
||||
exit;
|
||||
$return = [$this->rateItFrontend->getStarMessage($rating)];
|
||||
$response = new JsonResponse($return);
|
||||
$event->setResponse($response);
|
||||
return $event;
|
||||
}
|
||||
}
|
||||
|
@ -90,15 +90,15 @@ class RateItArticle extends RateItFrontend {
|
||||
$objTemplate->rateit_rating_after = true;
|
||||
}
|
||||
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/rateit.min.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
|
||||
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
|
||||
case 'hearts' :
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/heart.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
|
||||
break;
|
||||
default:
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/star.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,15 +148,15 @@ class RateItArticle extends RateItFrontend {
|
||||
$article['rateit_rating_after'] = true;
|
||||
}
|
||||
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/rateit.min.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
|
||||
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
|
||||
case 'hearts' :
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/heart.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
|
||||
break;
|
||||
default:
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/star.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,15 +232,15 @@ class RateItArticle extends RateItFrontend {
|
||||
|
||||
$objTemplate->arrRating = $arrRating;
|
||||
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/rateit.min.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
|
||||
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
|
||||
case 'hearts' :
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/heart.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
|
||||
break;
|
||||
default:
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/star.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ namespace cgoIT\rateit;
|
||||
|
||||
class RateItBackend
|
||||
{
|
||||
const path = 'system/modules/rateit/';
|
||||
const path = 'bundles/cgoitrateit/';
|
||||
|
||||
/**
|
||||
* Get a css file.
|
||||
@ -41,7 +41,7 @@ class RateItBackend
|
||||
*/
|
||||
public static function css($file)
|
||||
{
|
||||
return self::path.'public/css/'. $file.'.css';
|
||||
return self::path.'css/'. $file.'.css';
|
||||
} // file
|
||||
|
||||
/**
|
||||
@ -51,7 +51,7 @@ class RateItBackend
|
||||
*/
|
||||
public static function js($file)
|
||||
{
|
||||
return self::path.'public/js/'. $file.'.js';
|
||||
return self::path.'js/'. $file.'.js';
|
||||
} // file
|
||||
|
||||
/**
|
||||
@ -61,7 +61,7 @@ class RateItBackend
|
||||
*/
|
||||
public static function image($file)
|
||||
{
|
||||
$url = self::path.'public/images/';
|
||||
$url = self::path.'images/';
|
||||
if (is_file(TL_ROOT.'/'.$url.$file.'.png')) return $url.$file.'.png';
|
||||
if (is_file(TL_ROOT.'/'.$url.$file.'.gif')) return $url.$file.'.gif';
|
||||
return $url.'default.png';
|
@ -235,7 +235,7 @@ class rateitBackendModule extends \BackendModule
|
||||
*/
|
||||
protected function exportRatings()
|
||||
{
|
||||
$this->import('String');
|
||||
$this->import('StringUtil');
|
||||
$rateit = &$this->Template->rateit;
|
||||
|
||||
$options['order'] = 'rating desc';
|
||||
@ -268,7 +268,7 @@ class rateitBackendModule extends \BackendModule
|
||||
$intColCounter = 0;
|
||||
foreach(array_keys($this->arrExportHeader) as $key) {
|
||||
$strVal = $arrItem[$key];
|
||||
$strVal = $this->String->decodeEntities($strVal);
|
||||
$strVal = $this->StringUtil->decodeEntities($strVal);
|
||||
$strVal = preg_replace(array('/<br.*\/*>/si'), array("\n"), $strVal);
|
||||
$strVal = $this->convertEncoding($strVal, $GLOBALS['TL_CONFIG']['characterSet'], 'CP1252');
|
||||
|
||||
@ -449,7 +449,7 @@ class rateitBackendModule extends \BackendModule
|
||||
'typ' => $typ
|
||||
);
|
||||
|
||||
$this->import('String');
|
||||
$this->import('StringUtil');
|
||||
$rateit = &$this->Template->rateit;
|
||||
|
||||
// query ratings
|
||||
@ -484,7 +484,7 @@ class rateitBackendModule extends \BackendModule
|
||||
$intColCounter = 0;
|
||||
foreach(array_keys($this->arrExportHeaderDetails) as $key) {
|
||||
$strVal = $arrItem[$key];
|
||||
$strVal = $this->String->decodeEntities($strVal);
|
||||
$strVal = $this->StringUtil->decodeEntities($strVal);
|
||||
$strVal = preg_replace(array('/<br.*\/*>/si'), array("\n"), $strVal);
|
||||
$strVal = $this->convertEncoding($strVal, $GLOBALS['TL_CONFIG']['characterSet'], 'CP1252');
|
||||
|
@ -30,13 +30,18 @@
|
||||
|
||||
namespace cgoIT\rateit;
|
||||
|
||||
use cgoIT\rateit\RateItRating;
|
||||
|
||||
class RateItFaq extends RateItFrontend {
|
||||
|
||||
var $rateItRating;
|
||||
|
||||
/**
|
||||
* Initialize the controller
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->rateItRating = new RateItRating();
|
||||
}
|
||||
|
||||
public function getContentElementRateIt($objRow, $strBuffer) {
|
||||
@ -54,15 +59,15 @@ class RateItFaq extends RateItFrontend {
|
||||
$strBuffer = $this->generateForFaqPage($objModule, $strBuffer);
|
||||
}
|
||||
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/rateit.min.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
|
||||
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
|
||||
case 'hearts' :
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/heart.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
|
||||
break;
|
||||
default:
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/star.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -144,12 +149,11 @@ class RateItFaq extends RateItFrontend {
|
||||
->fetchAssoc();
|
||||
|
||||
if ($actRecord['active']) {
|
||||
$this->import('rateit\\RateItRating', 'RateItRating');
|
||||
$this->RateItRating->rkey = $arrFaq['id'];
|
||||
$this->RateItRating->ratingType = 'faq';
|
||||
$this->RateItRating->generate();
|
||||
$this->rateItRating->rkey = $arrFaq['id'];
|
||||
$this->rateItRating->ratingType = 'faq';
|
||||
$this->rateItRating->generate();
|
||||
|
||||
$rating = $this->RateItRating->output();
|
||||
$rating = $this->rateItRating->output();
|
||||
}
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ class RateItFrontend extends \Hybrid
|
||||
FROM tl_rateit_items i
|
||||
LEFT OUTER JOIN tl_rateit_ratings r
|
||||
ON ( i.id = r.pid ) WHERE i.rkey = ? and typ=? and active='1'
|
||||
GROUP BY i.rkey;";
|
||||
GROUP BY i.rkey, i.title;";
|
||||
$result = $this->Database->prepare($SQL_GET_RATINGS)
|
||||
->execute($rkey, $typ)
|
||||
->fetchAssoc();
|
@ -66,15 +66,15 @@ abstract class RateItHybrid extends RateItFrontend
|
||||
$this->strType = $GLOBALS['TL_CONFIG']['rating_type'];
|
||||
$this->strTextPosition = $GLOBALS['TL_CONFIG']['rating_textposition'];
|
||||
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/rateit.min.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
|
||||
switch ($this->strType) {
|
||||
case 'hearts' :
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/heart.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
|
||||
break;
|
||||
default:
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/star.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
|
||||
}
|
||||
|
||||
return parent::generate();
|
@ -49,7 +49,7 @@ class RateItNews extends RateItFrontend {
|
||||
|
||||
$objTemplate->descriptionId = 'rateItRating-'.$ratingId.'-description';
|
||||
$objTemplate->description = $this->getStarMessage($rating);
|
||||
$objTemplate->id = 'rateItRating-'.$ratingId.'-news-'.$stars.'_'.$this->intStars;
|
||||
$objTemplate->ratingId = 'rateItRating-'.$ratingId.'-news-'.$stars.'_'.$this->intStars;
|
||||
$objTemplate->rateit_class = 'rateItRating';
|
||||
$objTemplate->itemreviewed = $rating['title'];
|
||||
$objTemplate->actRating = $this->percentToStars($rating['rating']);
|
||||
@ -69,15 +69,15 @@ class RateItNews extends RateItFrontend {
|
||||
$objTemplate->rateit_rating_after = true;
|
||||
}
|
||||
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/rateit.min.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
|
||||
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
|
||||
case 'hearts' :
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/heart.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
|
||||
break;
|
||||
default:
|
||||
$GLOBALS['TL_CSS'][] = 'system/modules/rateit/public/css/star.min.css||static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
|
||||
}
|
||||
}
|
||||
}
|
@ -29,14 +29,19 @@
|
||||
|
||||
namespace cgoIT\rateit;
|
||||
|
||||
use cgoIT\rateit\RateItRating;
|
||||
|
||||
class RateItPage extends \Frontend {
|
||||
|
||||
var $rateItRating;
|
||||
|
||||
/**
|
||||
* Initialize the controller
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
|
||||
$this->rateItRating = new RateItRating();
|
||||
$this->loadDataContainer('settings');
|
||||
}
|
||||
|
||||
@ -47,11 +52,10 @@ class RateItPage extends \Frontend {
|
||||
->fetchAssoc();
|
||||
|
||||
if ($actRecord['active']) {
|
||||
$this->import('rateit\\RateItRating', 'RateItRating');
|
||||
$this->RateItRating->rkey = $objPage->id;
|
||||
$this->RateItRating->generate();
|
||||
$this->rateItRating->rkey = $objPage->id;
|
||||
$this->rateItRating->generate();
|
||||
|
||||
$rating = $this->RateItRating->output();
|
||||
$rating = $this->rateItRating->output();
|
||||
$rating .= $this->includeJs();
|
||||
$rating .= $this->includeCss();
|
||||
|
||||
@ -72,7 +76,7 @@ class RateItPage extends \Frontend {
|
||||
$strHeadTags = '';
|
||||
if (is_array($GLOBALS['TL_CSS'])) {
|
||||
foreach ($GLOBALS['TL_CSS'] as $script) {
|
||||
if ($this->startsWith($script, 'system/modules/rateit/public/css/rateit') === true) {
|
||||
if ($this->startsWith($script, 'bundles/cgoitrateit/css/rateit') === true) {
|
||||
$included = true;
|
||||
break;
|
||||
}
|
||||
@ -80,13 +84,13 @@ class RateItPage extends \Frontend {
|
||||
}
|
||||
|
||||
if (!$included) {
|
||||
$strHeadTags = '<link rel="stylesheet" href="'.$this->addStaticUrlTo('system/modules/rateit/public/css/rateit.min.css').'">';
|
||||
$strHeadTags = '<link rel="stylesheet" href="'.$this->addStaticUrlTo('bundles/cgoitrateit/css/rateit.min.css').'">';
|
||||
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
|
||||
case 'hearts' :
|
||||
$strHeadTags .= '<link rel="stylesheet" href="'.$this->addStaticUrlTo('system/modules/rateit/public/css/heart.min.css').'">';
|
||||
$strHeadTags .= '<link rel="stylesheet" href="'.$this->addStaticUrlTo('bundles/cgoitrateit/css/heart.min.css').'">';
|
||||
break;
|
||||
default:
|
||||
$strHeadTags .= '<link rel="stylesheet" href="'.$this->addStaticUrlTo('system/modules/rateit/public/css/star.min.css').'">';
|
||||
$strHeadTags .= '<link rel="stylesheet" href="'.$this->addStaticUrlTo('bundles/cgoitrateit/css/star.min.css').'">';
|
||||
}
|
||||
}
|
||||
return $strHeadTags;
|
||||
@ -97,7 +101,7 @@ class RateItPage extends \Frontend {
|
||||
$strHeadTags = '';
|
||||
if (is_array($GLOBALS['TL_JAVASCRIPT'])) {
|
||||
foreach ($GLOBALS['TL_JAVASCRIPT'] as $script) {
|
||||
if ($this->startsWith($script, 'system/modules/rateit/public/js/rateit') === true) {
|
||||
if ($this->startsWith($script, 'bundles/cgoitrateit/js/rateit') === true) {
|
||||
$included = true;
|
||||
break;
|
||||
}
|
||||
@ -105,8 +109,8 @@ class RateItPage extends \Frontend {
|
||||
}
|
||||
|
||||
if (!$included) {
|
||||
$strHeadTags = '<script' . (($objPage->outputFormat == 'xhtml') ? ' type="text/javascript"' : '') . ' src="' . $this->addStaticUrlTo('system/modules/rateit/public/js/onReadyRateIt.js') . '"></script>' . "\n";
|
||||
$strHeadTags .= '<script' . (($objPage->outputFormat == 'xhtml') ? ' type="text/javascript"' : '') . ' src="' . $this->addStaticUrlTo('system/modules/rateit/public/js/rateit.js') . '"></script>' . "\n";
|
||||
$strHeadTags = '<script' . (($objPage->outputFormat == 'xhtml') ? ' type="text/javascript"' : '') . ' src="' . $this->addStaticUrlTo('bundles/cgoitrateit/js/onReadyRateIt.js') . '"></script>' . "\n";
|
||||
$strHeadTags .= '<script' . (($objPage->outputFormat == 'xhtml') ? ' type="text/javascript"' : '') . ' src="' . $this->addStaticUrlTo('bundles/cgoitrateit/js/rateit.js') . '"></script>' . "\n";
|
||||
}
|
||||
return $strHeadTags;
|
||||
}
|
241
src/Resources/contao/classes/RateItTopRatingsModule.php
Normal file
241
src/Resources/contao/classes/RateItTopRatingsModule.php
Normal file
@ -0,0 +1,241 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Contao Open Source CMS
|
||||
* Copyright (C) 2005-2011 Leo Feyer
|
||||
*
|
||||
* Formerly known as TYPOlight Open Source CMS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program. If not, please visit the Free
|
||||
* Software Foundation website at <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* PHP version 5
|
||||
* @copyright cgo IT, 2013
|
||||
* @author Carsten Götzinger (info@cgo-it.de)
|
||||
* @package rateit
|
||||
* @license GNU/LGPL
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
namespace cgoIT\rateit;
|
||||
|
||||
/**
|
||||
* Class RateItTopRatingsModule
|
||||
*/
|
||||
class RateItTopRatingsModule extends RateItFrontend
|
||||
{
|
||||
private static $arrUrlCache = array();
|
||||
|
||||
/**
|
||||
* Initialize the controller
|
||||
*/
|
||||
public function __construct($objElement) {
|
||||
parent::__construct($objElement);
|
||||
|
||||
$this->strKey = "rateit_top_ratings";
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a wildcard in the back end
|
||||
* @return string
|
||||
*/
|
||||
public function generate() {
|
||||
if (TL_MODE == 'BE') {
|
||||
$objTemplate = new \BackendTemplate('be_wildcard');
|
||||
|
||||
$objTemplate->wildcard = '### Rate IT Best/Most Ratings ###';
|
||||
$objTemplate->title = $this->name;
|
||||
$objTemplate->id = $this->id;
|
||||
$objTemplate->link = $this->name;
|
||||
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
|
||||
|
||||
return $objTemplate->parse();
|
||||
}
|
||||
|
||||
$this->strTemplate = $this->rateit_template;
|
||||
|
||||
$this->arrTypes = deserialize($this->rateit_types);
|
||||
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
|
||||
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
|
||||
case 'hearts' :
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
|
||||
break;
|
||||
default:
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
|
||||
}
|
||||
|
||||
return parent::generate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the module/content element
|
||||
*/
|
||||
protected function compile() {
|
||||
$this->Template = new \FrontendTemplate($this->strTemplate);
|
||||
|
||||
$this->Template->setData($this->arrData);
|
||||
|
||||
$this->import("\\Database", "Database");
|
||||
$arrResult = $this->Database->prepare("SELECT i.id AS item_id,
|
||||
i.rkey AS rkey,
|
||||
i.title AS title,
|
||||
i.typ AS typ,
|
||||
i.createdat AS createdat,
|
||||
i.active AS active,
|
||||
IFNULL(AVG(r.rating),0) AS best,
|
||||
COUNT( r.rating ) AS most
|
||||
FROM tl_rateit_items i
|
||||
LEFT OUTER JOIN tl_rateit_ratings r
|
||||
ON (i.id = r.pid)
|
||||
WHERE
|
||||
typ IN ('".implode("', '", $this->arrTypes)."')
|
||||
GROUP BY rkey, title, item_id, typ, createdat, active
|
||||
ORDER BY ".$this->rateit_toptype." DESC")
|
||||
->limit($this->rateit_count)
|
||||
->execute()
|
||||
->fetchAllAssoc();
|
||||
|
||||
$objReturn = array();
|
||||
foreach ($arrResult as $result) {
|
||||
$return = new \stdClass();
|
||||
$return->title = $result['title'];
|
||||
$return->typ = $result['typ'];
|
||||
|
||||
// ID ermitteln
|
||||
$stars = $this->percentToStars($result['best']);
|
||||
$return->rateItID = 'rateItRating-'.$result['rkey'].'-'.$result['typ'].'-'.
|
||||
$stars.'_'.intval($GLOBALS['TL_CONFIG']['rating_count']);
|
||||
$return->descriptionId = 'rateItRating-'.$result['rkey'].'-description';
|
||||
|
||||
$return->rateit_class = 'rateItRating';
|
||||
|
||||
$return->url = $this->getUrl($result);
|
||||
|
||||
// Beschriftung ermitteln
|
||||
$rating = array();
|
||||
$rating['totalRatings'] = $result['most'];
|
||||
$rating['rating'] = $result['best'];
|
||||
$return->description = $this->getStarMessage($rating);
|
||||
|
||||
$return->rating = $result['best'];
|
||||
$return->count = $result['most'];
|
||||
$return->rel = 'not-rateable';
|
||||
$objReturn[] = $return;
|
||||
}
|
||||
|
||||
$this->Template->arrRatings = $objReturn;
|
||||
}
|
||||
|
||||
private function getUrl($rating) {
|
||||
if ($rating['typ'] === 'page') {
|
||||
return \PageModel::findById($rating['rkey'])->getAbsoluteUrl();
|
||||
}
|
||||
if ($rating['typ'] === 'article') {
|
||||
$objArticle = \ArticleModel::findPublishedById($rating['rkey']);
|
||||
if (!is_null($objArticle)) {
|
||||
return \PageModel::findById($objArticle->pid)->getAbsoluteUrl().'#'.$objArticle->alias;
|
||||
}
|
||||
}
|
||||
if ($rating['typ'] === 'news') {
|
||||
$objNews = \NewsModel::findById($rating['rkey']);
|
||||
$objArticle = \NewsModel::findPublishedByPid($objNews->pid);
|
||||
|
||||
// Internal link
|
||||
if ($objArticle->source != 'external') {
|
||||
return $this->generateNewsUrl($objNews);
|
||||
}
|
||||
|
||||
// Encode e-mail addresses
|
||||
if (substr($objArticle->url, 0, 7) == 'mailto:') {
|
||||
$strArticleUrl = \StringUtil::encodeEmail($objArticle->url);
|
||||
}
|
||||
|
||||
// Ampersand URIs
|
||||
else {
|
||||
$strArticleUrl = ampersand($objArticle->url);
|
||||
}
|
||||
|
||||
/** @var \PageModel $objPage */
|
||||
global $objPage;
|
||||
|
||||
// External link
|
||||
return $strArticleUrl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private function generateNewsUrl($objItem) {
|
||||
$strCacheKey = 'id_' . $objItem->id;
|
||||
|
||||
// Load the URL from cache
|
||||
if (isset(self::$arrUrlCache[$strCacheKey])) {
|
||||
return self::$arrUrlCache[$strCacheKey];
|
||||
}
|
||||
|
||||
// Initialize the cache
|
||||
self::$arrUrlCache[$strCacheKey] = null;
|
||||
|
||||
switch ($objItem->source) {
|
||||
// Link to an external page
|
||||
case 'external' :
|
||||
if (substr($objItem->url, 0, 7) == 'mailto:') {
|
||||
self::$arrUrlCache[$strCacheKey] = \StringUtil::encodeEmail($objItem->url);
|
||||
} else {
|
||||
self::$arrUrlCache[$strCacheKey] = ampersand($objItem->url);
|
||||
}
|
||||
break;
|
||||
|
||||
// Link to an internal page
|
||||
case 'internal' :
|
||||
if (($objTarget = $objItem->getRelated('jumpTo')) !== null) {
|
||||
/** @var \PageModel $objTarget */
|
||||
self::$arrUrlCache[$strCacheKey] = ampersand($objTarget->getFrontendUrl());
|
||||
}
|
||||
break;
|
||||
|
||||
// Link to an article
|
||||
case 'article' :
|
||||
if (($objArticle = \ArticleModel::findByPk($objItem->articleId, array(
|
||||
'eager' => true
|
||||
))) !== null && ($objPid = $objArticle->getRelated('pid')) !== null) {
|
||||
/** @var \PageModel $objPid */
|
||||
self::$arrUrlCache[$strCacheKey] = ampersand($objPid->getFrontendUrl('/articles/' . ((! \Config::get('disableAlias') && $objArticle->alias != '') ? $objArticle->alias : $objArticle->id)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Link to the default page
|
||||
if (self::$arrUrlCache[$strCacheKey] === null) {
|
||||
$objPage = \PageModel::findWithDetails($objItem->getRelated('pid')->jumpTo);
|
||||
|
||||
if ($objPage === null) {
|
||||
self::$arrUrlCache[$strCacheKey] = ampersand(\Environment::get('request'), true);
|
||||
} else {
|
||||
self::$arrUrlCache[$strCacheKey] = ampersand($objPage->getFrontendUrl(((\Config::get('useAutoItem') && ! \Config::get('disableAlias')) ? '/' : '/items/') . ((! \Config::get('disableAlias') && $objItem->alias != '') ? $objItem->alias : $objItem->id)));
|
||||
}
|
||||
|
||||
// Add the current archive parameter (news archive)
|
||||
if ($blnAddArchive && \Input::get('month') != '') {
|
||||
self::$arrUrlCache[$strCacheKey] .= (\Config::get('disableAlias') ? '&' : '?') . 'month=' . \Input::get('month');
|
||||
}
|
||||
}
|
||||
|
||||
return self::$arrUrlCache[$strCacheKey];
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -33,33 +33,32 @@ use cgoIT\rateit\RateItBackend;
|
||||
/**
|
||||
* Hooks
|
||||
*/
|
||||
$GLOBALS['TL_HOOKS']['generatePage'][] = array('rateit\\RateItPage', 'generatePage');
|
||||
$GLOBALS['TL_HOOKS']['simpleAjax'][] = array('rateit\\RateIt', 'doVote');
|
||||
$GLOBALS['TL_HOOKS']['parseArticles'][] = array('rateit\\RateItNews', 'parseArticle');
|
||||
$GLOBALS['TL_HOOKS']['getContentElement'][] = array('rateit\\RateItFaq', 'getContentElementRateIt');
|
||||
$GLOBALS['TL_HOOKS']['parseTemplate'][] = array('rateit\\RateItArticle', 'parseTemplateRateIt');
|
||||
$GLOBALS['TL_HOOKS']['generatePage'][] = array('cgoIT\\rateit\\RateItPage', 'generatePage');
|
||||
$GLOBALS['TL_HOOKS']['parseArticles'][] = array('cgoIT\\rateit\\RateItNews', 'parseArticle');
|
||||
$GLOBALS['TL_HOOKS']['getContentElement'][] = array('cgoIT\\rateit\\RateItFaq', 'getContentElementRateIt');
|
||||
$GLOBALS['TL_HOOKS']['parseTemplate'][] = array('cgoIT\\rateit\\RateItArticle', 'parseTemplateRateIt');
|
||||
|
||||
/**
|
||||
* Back end modules
|
||||
*/
|
||||
array_insert($GLOBALS['BE_MOD']['content'], count($GLOBALS['BE_MOD']['content']),
|
||||
array('rateit' => array (
|
||||
'callback' => 'rateit\\RateItBackendModule',
|
||||
'icon' => rateit\RateItBackend::image('icon'),
|
||||
'stylesheet' => rateit\RateItBackend::css('backend'),
|
||||
'javascript' => rateit\RateItBackend::js('RateItBackend')
|
||||
'callback' => 'cgoIT\\rateit\\RateItBackendModule',
|
||||
'icon' => RateItBackend::image('icon'),
|
||||
'stylesheet' => RateItBackend::css('backend'),
|
||||
'javascript' => RateItBackend::js('RateItBackend')
|
||||
)
|
||||
));
|
||||
|
||||
/**
|
||||
* frontend moduls
|
||||
*/
|
||||
$GLOBALS['FE_MOD']['application']['rateit'] = 'rateit\\RateItModule';
|
||||
$GLOBALS['FE_MOD']['application']['rateit_top_ratings'] = 'rateit\\RateItTopRatingsModule';
|
||||
$GLOBALS['FE_MOD']['application']['rateit'] = 'cgoIT\\rateit\\RateItModule';
|
||||
$GLOBALS['FE_MOD']['application']['rateit_top_ratings'] = 'cgoIT\\rateit\\RateItTopRatingsModule';
|
||||
|
||||
/**
|
||||
* content elements
|
||||
*/
|
||||
$GLOBALS['TL_CTE']['includes']['rateit'] = 'rateit\\RateItCE';
|
||||
$GLOBALS['TL_CTE']['includes']['rateit'] = 'cgoIT\\rateit\\RateItCE';
|
||||
|
||||
?>
|
18
src/Resources/contao/config/event_listeners.php
Normal file
18
src/Resources/contao/config/event_listeners.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use cgoIT\rateit\RateIt;
|
||||
use SimpleAjax\Event\SimpleAjax;
|
||||
|
||||
if (class_exists(SimpleAjax::class)) {
|
||||
return array
|
||||
(
|
||||
SimpleAjax::NAME => array(
|
||||
array(
|
||||
array(new RateIt(), 'doVote'),
|
||||
RateIt::PRIORITY
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return array();
|
@ -28,6 +28,7 @@
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
use cgoIT\rateit\DcaHelper;
|
||||
|
||||
/**
|
||||
* Extend tl_article
|
||||
@ -80,7 +81,7 @@ $GLOBALS['TL_DCA']['tl_article']['fields']['rateit_template'] = array
|
||||
'eval' => array('mandatory'=>true, 'tl_class'=>'w50')
|
||||
);
|
||||
|
||||
class tl_article_rating extends rateit\DcaHelper {
|
||||
class tl_article_rating extends DcaHelper {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
@ -28,6 +28,8 @@
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
use cgoIT\rateit\DcaHelper;
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_content']['config']['onsubmit_callback'][] = array('tl_content_rateit','insert');
|
||||
$GLOBALS['TL_DCA']['tl_content']['config']['ondelete_callback'][] = array('tl_content_rateit','delete');
|
||||
|
||||
@ -62,7 +64,7 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['rateit_active'] = array
|
||||
/**
|
||||
* Class tl_content_rateit
|
||||
*/
|
||||
class tl_content_rateit extends rateit\DcaHelper {
|
||||
class tl_content_rateit extends DcaHelper {
|
||||
|
||||
/**
|
||||
* Constructor
|
@ -28,6 +28,7 @@
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
use cgoIT\rateit\DcaHelper;
|
||||
|
||||
/**
|
||||
* Extend tl_article
|
||||
@ -69,7 +70,7 @@ $GLOBALS['TL_DCA']['tl_faq']['fields']['rateit_position'] = array
|
||||
'eval' => array('mandatory'=>true, 'tl_class'=>'w50')
|
||||
);
|
||||
|
||||
class tl_faq_rating extends rateit\DcaHelper {
|
||||
class tl_faq_rating extends DcaHelper {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
@ -28,6 +28,8 @@
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
use cgoIT\rateit\DcaHelper;
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_module']['config']['onsubmit_callback'][] = array('tl_module_rateit','insert');
|
||||
$GLOBALS['TL_DCA']['tl_module']['config']['ondelete_callback'][] = array('tl_module_rateit','delete');
|
||||
|
||||
@ -107,7 +109,7 @@ $GLOBALS['TL_DCA']['tl_module']['fields']['rateit_template'] = array
|
||||
/**
|
||||
* Class tl_module_rateit
|
||||
*/
|
||||
class tl_module_rateit extends rateit\DcaHelper {
|
||||
class tl_module_rateit extends DcaHelper {
|
||||
|
||||
/**
|
||||
* Constructor
|
@ -28,6 +28,7 @@
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
use cgoIT\rateit\DcaHelper;
|
||||
|
||||
/**
|
||||
* Extend tl_article
|
||||
@ -69,7 +70,7 @@ $GLOBALS['TL_DCA']['tl_news']['fields']['rateit_position'] = array
|
||||
'eval' => array('mandatory'=>true, 'tl_class'=>'w50')
|
||||
);
|
||||
|
||||
class tl_news_rating extends rateit\DcaHelper {
|
||||
class tl_news_rating extends DcaHelper {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
@ -29,6 +29,8 @@
|
||||
*/
|
||||
|
||||
|
||||
use cgoIT\rateit\DcaHelper;
|
||||
|
||||
/**
|
||||
* Extend tl_page
|
||||
*/
|
||||
@ -81,7 +83,7 @@ $GLOBALS['TL_DCA']['tl_page']['fields']['rateit_position'] = array
|
||||
'eval' => array('mandatory'=>true, 'tl_class'=>'w50')
|
||||
);
|
||||
|
||||
class tl_page_rateit extends rateit\DcaHelper {
|
||||
class tl_page_rateit extends DcaHelper {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
@ -28,6 +28,8 @@
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
use cgoIT\rateit\DcaHelper;
|
||||
|
||||
/**
|
||||
* palettes
|
||||
*/
|
||||
@ -113,21 +115,7 @@ $GLOBALS['TL_DCA']['tl_settings']['fields']['rating_description'] = array
|
||||
'eval' => array('mandatory'=>true, 'allowHtml'=>true, 'tl_class'=>'w50')
|
||||
);
|
||||
|
||||
class tl_settings_rateit extends rateit\DcaHelper
|
||||
class tl_settings_rateit extends DcaHelper
|
||||
{
|
||||
public function getUserFullName() {
|
||||
$this->import('jicw\\JICWHelper', 'JICWHelper');
|
||||
return $this->JICWHelper->getUserFullName();
|
||||
}
|
||||
|
||||
public function getUserEmail() {
|
||||
$this->import('jicw\\JICWHelper', 'JICWHelper');
|
||||
return $this->JICWHelper->getUserEmail();
|
||||
}
|
||||
|
||||
public function getInstalledModules() {
|
||||
$this->import('jicw\\JICWHelper', 'JICWHelper');
|
||||
return $this->JICWHelper->getInstalledModules();
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,6 +1,6 @@
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://data-vocabulary.org/Review-aggregate" itemscope="" class="rating-microdata">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->rateItID; ?>" 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>
|
||||
@ -13,12 +13,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
@ -62,7 +63,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://data-vocabulary.org/Review-aggregate" itemscope="" class="rating-microdata">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->rateItID; ?>" 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>
|
||||
@ -75,12 +76,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -1,7 +1,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://data-vocabulary.org/Review-aggregate" itemscope="" class="rating-microdata">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->rateItID; ?>" 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>
|
||||
@ -14,12 +14,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
@ -63,7 +64,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://data-vocabulary.org/Review-aggregate" itemscope="" class="rating-microdata">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->rateItID; ?>" 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>
|
||||
@ -76,12 +77,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -2,7 +2,7 @@
|
||||
|
||||
// Add the colorbox style sheet and javascript
|
||||
$GLOBALS['TL_CSS'][] = 'assets/jquery/colorbox/'. COLORBOX .'/css/colorbox.min.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/jquery/colorbox/colorbox-rateit.min.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/jquery/colorbox/colorbox-rateit.min.js|static';
|
||||
|
||||
?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// Add the colorbox style sheet and javascript
|
||||
$GLOBALS['TL_CSS'][] = 'assets/jquery/colorbox/'. COLORBOX .'/css/colorbox.min.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/jquery/colorbox/colorbox-rateit.min.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/jquery/colorbox/colorbox-rateit.min.js|static';
|
||||
|
||||
?>
|
||||
|
@ -0,0 +1,66 @@
|
||||
<article class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->rateItID; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="ce_text block">
|
||||
|
||||
<h2><?php echo $this->headline; ?></h2>
|
||||
|
||||
<div class="teaser">
|
||||
<?php echo $this->teaser; ?>
|
||||
<p class="more"><a href="<?php echo $this->href; ?>" title="<?php echo $this->readMore; ?>"><?php echo $this->more; ?> <span class="invisible"><?php echo $this->headline; ?></span></a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->rateItID; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
||||
</article>
|
@ -0,0 +1,66 @@
|
||||
<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->rateItID; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="ce_text block">
|
||||
|
||||
<h2><?php echo $this->headline; ?></h2>
|
||||
|
||||
<div class="teaser">
|
||||
<?php echo $this->teaser; ?>
|
||||
<p class="more"><a href="<?php echo $this->href; ?>" title="<?php echo $this->readMore; ?>"><?php echo $this->more; ?> <span class="invisible"><?php echo $this->headline; ?></span></a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->rateItID; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
33
src/Resources/contao/templates/mod_rateit_top_ratings.html5
Normal file
33
src/Resources/contao/templates/mod_rateit_top_ratings.html5
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
<div class="<?= $this->class ?> block"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>>
|
||||
|
||||
<?php if ($this->headline): ?>
|
||||
<<?= $this->hl ?>><?= $this->headline ?></<?= $this->hl ?>>
|
||||
<?php endif; ?>
|
||||
|
||||
<ul>
|
||||
<?php foreach ($this->arrRatings as $rating): ?>
|
||||
<li>
|
||||
<!-- indexer::stop -->
|
||||
<div class="rateItContainer">
|
||||
<div class="rateItTitle">
|
||||
<?php if ($rating->url): ?>
|
||||
<a href="<?= $rating->url ?>"><?= $rating->title ?></a>
|
||||
<?php else: ?>
|
||||
<?= $rating->title ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="<?= $rating->rateItID ?>" class="<?= $rating->rateit_class ?>" rel="<?= $rating->rel ?>">
|
||||
<div class="wrapper">
|
||||
<div class="rateItRating-selected" style="display: block;"></div>
|
||||
<div class="rateItRating-hover"></div>
|
||||
</div>
|
||||
<div id="<?= $rating->descriptionId ?>" class="ratingText"><?= $rating->description ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
</div>
|
31
src/Resources/contao/templates/mod_rateit_top_ratings.xhtml
Normal file
31
src/Resources/contao/templates/mod_rateit_top_ratings.xhtml
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
<div class="<?= $this->class; ?> block"<?= $this->cssID; ?><?php if ($this->style): ?> style="<?= $this->style; ?>"<?php endif; ?>>
|
||||
|
||||
<?php if ($this->headline): ?>
|
||||
<<?= $this->hl ?>><?= $this->headline; ?></<?= $this->hl; ?>>
|
||||
<?php endif; ?>
|
||||
|
||||
<ul>
|
||||
<?php foreach ($this->arrRatings as $rating): ?>
|
||||
<li>
|
||||
<!-- indexer::stop -->
|
||||
<div class="rateItTitle">
|
||||
<?php if ($rating->url): ?>
|
||||
<a href="<?= $rating->url ?>"><?= $rating->title ?></a>
|
||||
<?php else: ?>
|
||||
<?= $rating->title ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="<?= $rating->rateItID ?>" class="<?= $rating->rateit_class ?>" rel="<?= $rating->rel ?>">
|
||||
<div class="wrapper">
|
||||
<div class="rateItRating-selected" style="display: block;"></div>
|
||||
<div class="rateItRating-hover"></div>
|
||||
</div>
|
||||
<div id="<?= $rating->descriptionId ?>" class="ratingText"><?= $rating->description ?></div>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
</div>
|
@ -2,7 +2,7 @@
|
||||
|
||||
// Add the mediabox style sheet and javascript
|
||||
$GLOBALS['TL_CSS'][] = 'assets/mootools/mediabox/'. MEDIABOX .'/css/mediaboxAdvBlack21.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/mootools/mediabox/mediabox-rateit.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/mootools/mediabox/mediabox-rateit.js|static';
|
||||
|
||||
?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// Add the mediabox style sheet
|
||||
$GLOBALS['TL_CSS'][] = 'assets/mootools/mediabox/'. MEDIABOX .'/css/mediaboxAdvBlack21.css||static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/rateit/public/js/mootools/mediabox/mediabox-rateit.js|static';
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/mootools/mediabox/mediabox-rateit.js|static';
|
||||
|
||||
?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -66,7 +66,7 @@
|
||||
</div>
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
@ -1,7 +1,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -67,7 +67,7 @@
|
||||
<?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; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
@ -1,8 +1,8 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- 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; ?>">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -14,12 +14,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
@ -75,8 +76,8 @@
|
||||
|
||||
<?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; ?>">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -88,12 +89,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -1,8 +1,8 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- 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; ?>">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -14,12 +14,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
@ -75,8 +76,8 @@
|
||||
|
||||
<?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; ?>">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -88,12 +89,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -1,7 +1,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -46,7 +46,7 @@
|
||||
<?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; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
@ -1,7 +1,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -46,7 +46,7 @@
|
||||
<?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; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
@ -1,8 +1,8 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- 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; ?>">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -14,12 +14,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
@ -53,8 +54,8 @@
|
||||
|
||||
<?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; ?>">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -66,12 +67,13 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -0,0 +1,79 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="layout_latest block<?php echo $this->class; ?>">
|
||||
<?php if ($this->hasMetaFields): ?>
|
||||
<p class="info"><?php echo $this->date; ?> <?php echo $this->author; ?> <?php echo $this->commentCount; ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->addImage): ?>
|
||||
<div class="image_container<?php echo $this->floatClass; ?>"<?php if ($this->margin || $this->float): ?> style="<?php echo trim($this->margin . $this->float); ?>"<?php endif; ?>>
|
||||
<?php if ($this->href): ?>
|
||||
<a href="<?php echo $this->href; ?>"<?php echo $this->attributes; ?> title="<?php echo $this->alt; ?>">
|
||||
<?php endif; ?>
|
||||
<img src="<?php echo $this->src; ?>"<?php echo $this->imgSize; ?> alt="<?php echo $this->alt; ?>" />
|
||||
<?php if ($this->href): ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->caption): ?>
|
||||
<div class="caption" style="width:<?php echo $this->arrSize[0]; ?>px"><?php echo $this->caption; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<h2><?php echo $this->text ? $this->linkHeadline : $this->newsHeadline; ?></h2>
|
||||
<div class="teaser">
|
||||
<?php echo $this->teaser; ?>
|
||||
</div>
|
||||
<?php if ($this->text): ?>
|
||||
<p class="more"><?php echo $this->more; ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -1,7 +1,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -32,7 +32,7 @@
|
||||
<?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; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
@ -1,7 +1,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -32,7 +32,7 @@
|
||||
<?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; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
@ -0,0 +1,65 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="layout_short block<?php echo $this->class; ?>">
|
||||
<?php if ($this->hasMetaFields): ?>
|
||||
<p class="info"><time datetime="<?php echo $this->datetime; ?>"><?php echo $this->date; ?></time> <?php echo $this->author; ?> <?php echo $this->commentCount; ?></p>
|
||||
<?php endif; ?>
|
||||
<h2><?php echo $this->text ? $this->linkHeadline : $this->newsHeadline; ?></h2>
|
||||
<div class="teaser">
|
||||
<?php echo $this->teaser; ?>
|
||||
</div>
|
||||
<?php if ($this->text): ?>
|
||||
<p class="more"><?php echo $this->more; ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -0,0 +1,65 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="layout_short block<?php echo $this->class; ?>">
|
||||
<?php if ($this->hasMetaFields): ?>
|
||||
<p class="info"><?php echo $this->date; ?> <?php echo $this->author; ?> <?php echo $this->commentCount; ?></p>
|
||||
<?php endif; ?>
|
||||
<h2><?php echo $this->text ? $this->linkHeadline : $this->newsHeadline; ?></h2>
|
||||
<div class="teaser">
|
||||
<?php echo $this->teaser; ?>
|
||||
</div>
|
||||
<?php if ($this->text): ?>
|
||||
<p class="more"><?php echo $this->more; ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -1,7 +1,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
@ -1,7 +1,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?>">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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; ?>
|
@ -0,0 +1,56 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="layout_simple block<?php echo $this->class; ?>">
|
||||
<?php if ($this->date): ?><time datetime="<?php echo $this->datetime; ?>"><?php echo $this->date; ?></time> <?php endif; ?><?php echo $this->linkHeadline; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -0,0 +1,56 @@
|
||||
|
||||
<?php if ($this->rateit_rating_before): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="layout_simple block<?php echo $this->class; ?>">
|
||||
<?php if ($this->date): ?><?php echo $this->date; ?> <?php endif; ?><?php echo $this->linkHeadline; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->rateit_rating_after): ?>
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->ratingId; ?>" 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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php endif; ?>
|
@ -1,5 +1,5 @@
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://data-vocabulary.org/Review-aggregate" itemscope="" class="rating-microdata">
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope class="rating-microdata">
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
|
||||
<?php if ($this->showBefore) : ?>
|
||||
<div id="<?php echo $this->descriptionId; ?>" class="ratingText"><?php echo $this->description; ?></div>
|
||||
@ -12,11 +12,12 @@
|
||||
<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 class="rating-microdata" itemprop="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
<span class="rating-microdata" itemprop="votes"><?php echo $this->votes; ?></span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
23
src/Resources/contao/templates/rateit_microdata.xhtml
Normal file
23
src/Resources/contao/templates/rateit_microdata.xhtml
Normal file
@ -0,0 +1,23 @@
|
||||
<!-- indexer::stop -->
|
||||
<div itemtype="http://schema.org/CreativeWork" itemscope="" class="rating-microdata">
|
||||
<div id="<?php echo $this->id; ?>" class="<?php echo $this->class; ?> <?php echo $this->rateit_class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
|
||||
<?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="name"><?php echo $this->itemreviewed; ?></span>
|
||||
<span class="rating-microdata" itemtype="http://schema.org/AggregateRating" itemscope="" itemprop="aggregateRating">
|
||||
<span itemprop="ratingValue"><?php echo $this->actRating; ?></span>
|
||||
<span itemprop="worstRating">0</span>
|
||||
<span itemprop="bestRating"><?php echo $this->maxRating; ?></span>
|
||||
<span itemprop="ratingCount"><?php echo $this->votes; ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
@ -1,11 +1,11 @@
|
||||
.rateItRating .wrapper, .mbrateItRating .wrapper {
|
||||
background: url('../images/heart.gif');
|
||||
background: url("../images/heart.gif");
|
||||
}
|
||||
|
||||
div.rateItRating div.rateItRating-hover, div.mbrateItRating div.rateItRating-hover {
|
||||
background: url('../images/heart.gif') left;
|
||||
background: url("../images/heart.gif") left;
|
||||
}
|
||||
|
||||
div.rateItRating div.rateItRating-selected, div.mbrateItRating div.rateItRating-selected {
|
||||
background: url('../images/heart.gif') left;
|
||||
background: url("../images/heart.gif") left;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user