# Tag Cloud Erweitern

**URL:** <https://forum.shopware.com/t/tag-cloud-erweitern/18677>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [25. Februar 2014 um 16:30 UTC](https://forum.shopware.com/t/tag-cloud-erweitern/18677 "2014-02-25T16:30:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Webgreat.de](https://avatars.discourse-cdn.com/v4/letter/w/ac91a4/32.png) [@Webgreat.de](https://forum.shopware.com/u/Webgreat.de)\
**Post date:** [25. Februar 2014 um 16:30 UTC](https://forum.shopware.com/t/tag-cloud-erweitern/18677/1 "2014-02-25T16:30:49Z")

</div>

Hat jemand einen Tip wie man die TagCloud modifizieren kann. Beispielsweise möchte ich ein Artikel Freitextfeld Parameter mit ausgeben. Weiss allerdings nicht wo ich mich einklinken kann/soll. Bin für jeden Hinweis dankbar 🙂 Gesendet von meinem GT-I9195 mit Tapatalk

---

<div class="post-metadata">

**Author:** ![Webgreat.de](https://avatars.discourse-cdn.com/v4/letter/w/ac91a4/32.png) [@Webgreat.de](https://forum.shopware.com/u/Webgreat.de)\
**Post date:** [25. Februar 2014 um 17:28 UTC](https://forum.shopware.com/t/tag-cloud-erweitern/18677/2 "2014-02-25T17:28:38Z")

</div>

Scheinbar wird die Sache hier zusammengebaut / engine / core / class / sMarketing Da wäre meine nächste Frage, wie kann ich die DB Abfrage erweitern per Plugin? Gesendet von meinem iPad mit Tapatalk

---

<div class="post-metadata">

**Author:** ![Webgreat.de](https://avatars.discourse-cdn.com/v4/letter/w/ac91a4/32.png) [@Webgreat.de](https://forum.shopware.com/u/Webgreat.de)\
**Post date:** [25. Februar 2014 um 19:06 UTC](https://forum.shopware.com/t/tag-cloud-erweitern/18677/3 "2014-02-25T19:06:04Z")

</div>

Alle guten Dinge sind drei oder wie heißt es ? 😉 Konkret geht es um dieses hier: public function sBuildTagCloud($categoryId = null) { $categoryId = (int) $categoryId; if (empty($categoryId)) { $categoryId = $this-\>categoryId; } if (!empty($this-\>sSYSTEM-\>sCONFIG[‘sTAGCLOUDMAX’])) $tagSize = (int) $this-\>sSYSTEM-\>sCONFIG[‘sTAGCLOUDMAX’]; else $tagSize = 50; if (!empty($this-\>sSYSTEM-\>sCONFIG[‘sTAGTIME’])) $tagTime = (int) $this-\>sSYSTEM-\>sCONFIG[‘sTAGTIME’]; else $tagTime = 3; $sql = " SELECT a.id as articleID, a.name as articleName, COUNT(r.articleID) as relevance FROM s\_articles a INNER JOIN s\_articles\_categories\_ro ac ON ac.articleID = a.id AND ac.categoryID = $categoryId INNER JOIN s\_categories c ON c.id = ac.categoryID AND c.active = 1 LEFT JOIN s\_emarketing\_lastarticles r ON a.id = r.articleID AND r.time \>= DATE\_SUB(NOW(),INTERVAL $tagTime DAY) LEFT JOIN s\_articles\_avoid\_customergroups ag ON ag.articleID=a.id AND ag.customergroupID={$this-\>customerGroupId} WHERE a.active = 1 AND ag.articleID IS NULL GROUP BY a.id ORDER BY COUNT(r.articleID) DESC LIMIT $tagSize “; $articles = $this-\>sSYSTEM-\>sDB\_CONNECTION-\>CacheGetAssoc($this-\>sSYSTEM-\>sCONFIG[‘sCACHEARTICLE’], $sql); if (empty($articles)) { return array(); } $articles = $this-\>sSYSTEM-\>sMODULES[“sArticles”]-\>sGetTranslations($articles, “article”); $pos = 1; $anz = count($articles); if (!empty($this-\>sSYSTEM-\>sCONFIG[‘sTAGCLOUDSPLIT’])) $steps = (int) $this-\>sSYSTEM-\>sCONFIG[‘sTAGCLOUDSPLIT’]; else $steps = 3; if (!empty($this-\>sSYSTEM-\>sCONFIG[‘sTAGCLOUDCLASS’])) $class = (string) $this-\>sSYSTEM-\>sCONFIG[‘sTAGCLOUDCLASS’]; else $class = “tag”; $link = $this-\>sSYSTEM-\>sCONFIG[‘sBASEFILE’] . “?sViewport=detail&sArticle=”; foreach ($articles as $articleId =\> $article) { $name = strip\_tags(html\_entity\_decode($article[‘articleName’], ENT\_QUOTES, ‘UTF-8’)); $name = preg\_replace(”/[^\w0-9äöüßÄÖÜ´`.-]/u", " “, $name); $name = preg\_replace(’/\s\s+/’, ’ ‘, $name); $name = preg\_replace(’/(.\*)/’, ‘’, $name); $name = trim($name, " -”); $articles[$articleId][“articleID”] = $articleId; $articles[$articleId][“name”] = $name; $articles[$articleId][“class”] = $class . round($pos / $anz \* $steps); $articles[$articleId][“link”] = $link . $articleId; $pos++; } shuffle($articles); return $articles; } In File: engine / core / class / sMarketing.php Ich weiß nicht wo oder wie ich mich mit einem Plugin einklinken soll … Gruß Gesendet von meinem iPad mit Tapatalk

---

<div class="post-metadata">

**Author:** ![Martin\_Weinmayr](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/martin_weinmayr/32/13016_2.png) [@Martin\_Weinmayr](https://forum.shopware.com/u/Martin_Weinmayr)\
**Post date:** [25. Februar 2014 um 19:18 UTC](https://forum.shopware.com/t/tag-cloud-erweitern/18677/4 "2014-02-25T19:18:23Z")

</div>

Ich würde das nicht da machen sondern im postdispatch und dort dann das was du Attachen willst der Variable anhängen.

---

<div class="post-metadata">

**Author:** ![prooffice](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@prooffice](https://forum.shopware.com/u/prooffice)\
**Post date:** [3. März 2014 um 16:43 UTC](https://forum.shopware.com/t/tag-cloud-erweitern/18677/5 "2014-03-03T16:43:57Z")

</div>

Hallo zusammen, Gibt es für die Tagcloud eine Lösung? Ich würde gerne einfach nur den vollständigen Artikelnamen als Linktext anzeigen lassen… ich habe versucht in der Datei /engine/core/class/sMarketing.php ab Zeile 384 Ersetzungen und Trim auszukommentieren, leider ohne Erfolg. Oder ist eine Beeinflussung der Tagcloud-Linktexte mit dem PlugIn von [Webgreat.de](http://Webgreat.de) möglich? Vielen Dank für jeden Tipp! Gruß
