public function ToString($Results, $Query) { $Matches = $this->GetSQLData($this->Settings['Admin']->RelatedThreadsPostFormat, GetValue('matches', $Results)); //get SQL data $Results = $this->HighLightResults($Matches, $Query, $this->Settings['Admin']->BuildExcerptsTitleEnable, $this->Settings['Admin']->BuildExcerptsBodyEnable); $String = ''; if ($Results == 0) { return; //return an empty string if no results } $String .= WriteResults($this->Settings['Admin']->RelatedThreadsPostFormat, $Results); return $String; }
public function ToString() { $String = ''; if (sizeof($this->RelatedThreads) == 0) { return $String; //return an empty string if no results } ob_start(); ?> <div id="RelatedThreads" class="Box RelatedThreads"> <h4 class="Header"><?php echo T('Related Threads'); ?> </h4> <?php echo WriteResults('Simple', $this->RelatedThreads, FALSE, TRUE); ?> </div> <?php $String .= ob_get_contents(); @ob_end_clean(); return $String; }
/** * * * */ private function ToString($Results, $Panel = FALSE) { $String = ''; if (sizeof($Results) == 0) { return; //return an empty string if no results } if (!$Panel) { //writing to the bottom of the discussion ob_start(); ?> <div id="RelatedDiscussion" class="Box"><!-- Important to distinugish this from the one in the panel because of the h4 banner in mainsearch.css--> <h4 class="Header Bottom">Related Discussions</h4> <?php echo WriteResults($this->Settings['Admin']->RelatedThreadsBottomDiscussionFormat, $Results); ?> </div> <?php $String = ob_get_contents(); @ob_end_clean(); return $String; } else { //writing to the panel ob_start(); ?> <div id="RelatedDiscussion" class="Box"> <h4 class="Header">Related Discussions</h4> <?php echo WriteResults('Simple', $Results, FALSE, TRUE); ?> </div> <?php $String = ob_get_contents(); @ob_end_clean(); return $String; } }
?> </span> <span id="SearchAgain"><?php echo Anchor(T('Search Again :: Adv Search'), $GETString, FALSE, FALSE, TRUE); ?> </span> <span id="Time"><?php echo sprintf(T('%s %s in %s'), $Total, Plural($Results['total'], T('result'), T('results')), $Results['time'] . 's'); ?> </span> </div> <?php echo $this->Pager->ToString('more'); ?> <?php echo WriteResults($Format, $Results['matches'], TRUE); ?> <?php echo $this->Pager->ToString('more'); ?> <?php } else { ?> <span id="SearchAgain"> <?php echo Anchor(T('Search Again :: Adv Search'), $GETString); ?> </span> <?php echo $this->Form->Button('Options', array('value' => 'More Options', 'id' => 'Options')); ?>