From c6057936d781f4ae74892d02280cbc9d8f8f5e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20G=C3=B6tzinger?= Date: Thu, 15 Feb 2018 13:38:39 +0100 Subject: [PATCH] news_full template --- .../contao/classes/RateItArticle.php | 6 - src/Resources/contao/dca/tl_article.php | 27 ----- .../templates/article_rateit_default.html5 | 41 ------- .../article_rateit_default_microdata.html5 | 16 --- .../contao/templates/mod_article.html5 | 62 ---------- .../templates/mod_articlelist_rateit0.html5 | 47 -------- .../contao/templates/news_full_rateit.html5 | 105 +++++----------- .../news_full_rateit_microdata.html5 | 114 +++--------------- 8 files changed, 47 insertions(+), 371 deletions(-) delete mode 100644 src/Resources/contao/templates/article_rateit_default.html5 delete mode 100644 src/Resources/contao/templates/article_rateit_default_microdata.html5 delete mode 100644 src/Resources/contao/templates/mod_article.html5 delete mode 100644 src/Resources/contao/templates/mod_articlelist_rateit0.html5 diff --git a/src/Resources/contao/classes/RateItArticle.php b/src/Resources/contao/classes/RateItArticle.php index a55ab72..1411e77 100644 --- a/src/Resources/contao/classes/RateItArticle.php +++ b/src/Resources/contao/classes/RateItArticle.php @@ -57,12 +57,6 @@ class RateItArticle extends RateItFrontend { ->fetchAssoc(); if ($arrArticle['addRating']) { - /*if ($objTemplate->multiMode && $objTemplate->showTeaser) { - $objTemplate->setName('mod_'.$arrArticle['rateit_template'].'_teaser'); - } else { - $objTemplate->setName($arrArticle['rateit_template']); - }*/ - $ratingId = $arrArticle['id']; $rating = $this->loadRating($ratingId, 'article'); $stars = !$rating ? 0 : $this->percentToStars($rating['rating']); diff --git a/src/Resources/contao/dca/tl_article.php b/src/Resources/contao/dca/tl_article.php index 46ceaab..17551bb 100644 --- a/src/Resources/contao/dca/tl_article.php +++ b/src/Resources/contao/dca/tl_article.php @@ -70,17 +70,6 @@ $GLOBALS['TL_DCA']['tl_article']['fields']['rateit_position'] = array 'eval' => array('mandatory'=>true, 'tl_class'=>'w50') ); -$GLOBALS['TL_DCA']['tl_article']['fields']['rateit_template'] = array -( - 'label' => &$GLOBALS['TL_LANG']['tl_article']['rateit_template'], - 'default' => 'rateit_default', - 'exclude' => true, - 'inputType' => 'select', - 'options_callback' => array('tl_article_rating', 'getRateItArticleTemplates'), - 'sql' => "varchar(255) NOT NULL default ''", - 'eval' => array('mandatory'=>false, 'tl_class'=>'w50') -); - class tl_article_rating extends DcaHelper { /** * Constructor @@ -89,22 +78,6 @@ class tl_article_rating extends DcaHelper { parent::__construct(); } - /** - * Return all navigation templates as array - * @param DataContainer - * @return array - */ - public function getRateItArticleTemplates(\DataContainer $dc) { - $intPid = $dc->activeRecord->pid; - - if ($this->Input->get('act') == 'overrideAll') - { - $intPid = $this->Input->get('id'); - } - - return $this->getTemplateGroup('article_rateit_', $intPid); - } - public function insert(\DC_Table $dc) { return $this->insertOrUpdateRatingKey($dc, 'article', $dc->activeRecord->title); } diff --git a/src/Resources/contao/templates/article_rateit_default.html5 b/src/Resources/contao/templates/article_rateit_default.html5 deleted file mode 100644 index c8698ad..0000000 --- a/src/Resources/contao/templates/article_rateit_default.html5 +++ /dev/null @@ -1,41 +0,0 @@ -extend('mod_article'); ?> - -block('content'); ?> - rateit_rating_before): ?> - - block('rating'); ?> -
- showBefore) : ?> -
description ?>
- -
-
-
-
- showAfter) : ?> -
description ?>
- -
- endblock(); ?> - - - parent(); ?> - rateit_rating_after): ?> - - block('rating'); ?> -
- showBefore) : ?> -
description ?>
- -
-
-
-
- showAfter) : ?> -
description ?>
- -
- endblock(); ?> - - -endblock(); ?> diff --git a/src/Resources/contao/templates/article_rateit_default_microdata.html5 b/src/Resources/contao/templates/article_rateit_default_microdata.html5 deleted file mode 100644 index b3a0ac0..0000000 --- a/src/Resources/contao/templates/article_rateit_default_microdata.html5 +++ /dev/null @@ -1,16 +0,0 @@ -extend('article_rateit_default'); ?> - -block('rating'); ?> - -
- parent(); ?> - itemreviewed; ?> - - actRating; ?> - 0 - maxRating; ?> - votes; ?> - -
- -endblock(); ?> diff --git a/src/Resources/contao/templates/mod_article.html5 b/src/Resources/contao/templates/mod_article.html5 deleted file mode 100644 index 61927eb..0000000 --- a/src/Resources/contao/templates/mod_article.html5 +++ /dev/null @@ -1,62 +0,0 @@ - -teaserOnly): ?> - - block('alias'); ?> -
cssID ?>style): ?> style="style ?>"> -
-

headline ?>

-
- teaser ?> -

more ?>

-
-
-
- endblock(); ?> - -noMarkup): ?> - - block('content'); ?> - elements) ?> - endblock(); ?> - - - -
cssID ?>style): ?> style="style ?>"> - printable): ?> - block('syndication'); ?> - - - - endblock(); ?> - - - block('content'); ?> - elements) ?> - endblock(); ?> - - backlink): ?> - block('backlink'); ?> - -

back ?>

- - endblock(); ?> - -
- - diff --git a/src/Resources/contao/templates/mod_articlelist_rateit0.html5 b/src/Resources/contao/templates/mod_articlelist_rateit0.html5 deleted file mode 100644 index d0ba118..0000000 --- a/src/Resources/contao/templates/mod_articlelist_rateit0.html5 +++ /dev/null @@ -1,47 +0,0 @@ -extend('block_unsearchable'); ?> - -block('content'); ?> - - - -endblock(); ?> diff --git a/src/Resources/contao/templates/news_full_rateit.html5 b/src/Resources/contao/templates/news_full_rateit.html5 index 15683aa..fc79cd7 100644 --- a/src/Resources/contao/templates/news_full_rateit.html5 +++ b/src/Resources/contao/templates/news_full_rateit.html5 @@ -1,82 +1,41 @@ rateit_rating_before): ?> - -
- showBefore) : ?> -
description; ?>
- -
-
-
+ + block('rating'); ?> +
+ showBefore) : ?> +
description ?>
+ +
+
+
+
+ showAfter) : ?> +
description ?>
+
- showAfter) : ?> -
description; ?>
- -
- + endblock(); ?> + -
- -

newsHeadline; ?>

-hasMetaFields): ?> - -

author; ?> commentCount; ?>

- -hasSubHeadline): ?> - -

subHeadline; ?>

- - -
-addBefore): ?> - -text; ?> - -addImage): ?> - -
margin || $this->float): ?> style="margin . $this->float); ?>"> -href): ?> -attributes; ?> title="alt; ?>"> - -imgSize; ?> alt="alt; ?>"> -href): ?> - - -caption): ?> -
caption; ?>
- -
- -addBefore): ?> - -text; ?> - - -
-enclosure): ?> - -
-enclosure as $enclosure): ?> -

<?php echo $enclosure['mime']; ?> ()

- -
- +insert('news_full', $this->arrData); ?>
rateit_rating_after): ?> - -
- showBefore) : ?> -
description; ?>
- -
-
-
-
- showAfter) : ?> -
description; ?>
- -
- + + block('rating'); ?> +
+ showBefore) : ?> +
description ?>
+ +
+
+
+
+ showAfter) : ?> +
description ?>
+ +
+ endblock(); ?> + diff --git a/src/Resources/contao/templates/news_full_rateit_microdata.html5 b/src/Resources/contao/templates/news_full_rateit_microdata.html5 index fe0fbe9..676f758 100644 --- a/src/Resources/contao/templates/news_full_rateit_microdata.html5 +++ b/src/Resources/contao/templates/news_full_rateit_microdata.html5 @@ -1,101 +1,17 @@ +extend('news_full_rateit'); ?> -rateit_rating_before): ?> - -
-
- showBefore) : ?> -
description; ?>
- -
-
-
-
- showAfter) : ?> -
description; ?>
- -
- itemreviewed; ?> - - actRating; ?> - 0 - maxRating; ?> - votes; ?> - -
- - +block('rating'); ?> + +
+ parent(); ?> + itemreviewed; ?> + + actRating; ?> + 0 + maxRating; ?> + votes; ?> + +
+ -
- -

newsHeadline; ?>

-hasMetaFields): ?> - -

author; ?> commentCount; ?>

- -hasSubHeadline): ?> - -

subHeadline; ?>

- - -
-addBefore): ?> - -text; ?> - -addImage): ?> - -
margin || $this->float): ?> style="margin . $this->float); ?>"> -href): ?> -attributes; ?> title="alt; ?>"> - -imgSize; ?> alt="alt; ?>"> -href): ?> - - -caption): ?> -
caption; ?>
- -
- -addBefore): ?> - -text; ?> - - -
-enclosure): ?> - -
-enclosure as $enclosure): ?> -

<?php echo $enclosure['mime']; ?> ()

- -
- - -
- -rateit_rating_after): ?> - -
-
- showBefore) : ?> -
description; ?>
- -
-
-
-
- showAfter) : ?> -
description; ?>
- -
- itemreviewed; ?> - - actRating; ?> - 0 - maxRating; ?> - votes; ?> - -
- - +endblock(); ?>