mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
Fixes #4820 - Removed possibility of broken tag links.
This commit is contained in:
@@ -30,6 +30,7 @@ class tagcloud_menu
|
||||
{
|
||||
$fields = array();
|
||||
$fields['tagcloud_caption'] = array('title'=> LAN_CAPTION, 'type'=>'text', 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge'));
|
||||
$fields['order'] = array('title'=> LAN_ORDER, 'type'=>'dropdown', 'writeParms'=>['optArray'=>['tag,asc'=>'Tag ASC', 'tag,desc'=>'Tag DESC', 'size,asc'=>'Size ASC','size,desc'=>'Size DESC']]);
|
||||
$fields['tagcloud_limit'] = array('title'=> LAN_LIMIT, 'type'=>'number');
|
||||
return $fields;
|
||||
|
||||
|
@@ -79,15 +79,16 @@ if(!class_exists('tagcloud_menu'))
|
||||
foreach ($tmp as $word)
|
||||
{
|
||||
|
||||
if($c >= $words)
|
||||
$word = trim($word);
|
||||
|
||||
if(empty($word) || ($c >= $words))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//$newsUrlparms = array('id'=> $row['news_id'], 'name'=>'a name');
|
||||
$url = e107::getUrl()->create('news/list/tag', array('tag' => $word)); // SITEURL."news.php?tag=".$word;
|
||||
$url = e107::getUrl()->create('news/list/tag', array('tag' => str_replace(' ','-',$word))); // SITEURL."news.php?tag=".$word;
|
||||
$cloud->addTag(array('tag' => $word, 'url' => $url));
|
||||
$c++;
|
||||
$wordCount++;
|
||||
|
Reference in New Issue
Block a user