public function ToString() { if (!$this->_TagData) { $this->GetData(); } if ($this->_TagData->NumRows() == 0) { return ''; } $String = ''; ob_start(); ?> <div class="Box Tags"> <h4><?php echo T($this->ParentID > 0 ? 'Tagged' : 'Popular Tags'); ?> </h4> <ul class="TagCloud"> <?php foreach ($this->_TagData->Result() as $Tag) { if ($Tag['Name'] != '') { ?> <li><span><?php echo Anchor(TagFullName($Tag), TagUrl($Tag), array('class' => 'Tag_' . str_replace(' ', '_', $Tag['Name']))); ?> </span> <span class="Count"><?php echo number_format($Tag['CountDiscussions']); ?> </span></li> <?php } } ?> </ul> </div> <?php $String = ob_get_contents(); @ob_end_clean(); return $String; }
$Title = t('This is a special tag.'); } ?> <div id="<?php echo "Tag_{$Tag['TagID']}"; ?> " class="<?php echo $CssClass; ?> " title="<?php echo $Title; ?> "> <?php $DisplayName = TagFullName($Tag); if ($Special) { echo htmlspecialchars($DisplayName) . ' ' . Wrap($Tag['CountDiscussions'], 'span', array('class' => 'Count')); } else { echo anchor(htmlspecialchars($DisplayName) . ' ' . Wrap($Tag['CountDiscussions'], 'span', array('class' => 'Count')), "/settings/tags/edit/{$Tag['TagID']}", 'TagName Tag_' . str_replace(' ', '_', $Tag['Name'])); echo ' ' . anchor('×', "/settings/tags/delete/{$Tag['TagID']}", 'Delete Popup'); } ?> </div> <?php } } ?> <div class="add-new-tag">
/** * * * @return string */ public function toString() { if (!$this->_TagData) { $this->getData(); } if ($this->_TagData->numRows() == 0) { return ''; } $String = ''; ob_start(); ?> <div class="Box Tags"> <?php echo panelHeading(t($this->ParentID > 0 ? 'Tagged' : 'Popular Tags')); ?> <ul class="TagCloud"> <?php foreach ($this->_TagData->result() as $Tag) { ?> <?php if ($Tag['Name'] != '') { ?> <li><?php echo anchor(TagFullName($Tag) . ' ' . Wrap(number_format($Tag['CountDiscussions']), 'span', array('class' => 'Count')), TagUrl($Tag, '', '/'), array('class' => 'Tag_' . str_replace(' ', '_', $Tag['Name']))); ?> </li> <?php } ?> <?php } ?> </ul> </div> <?php $String = ob_get_contents(); @ob_end_clean(); return $String; }