/** * Show matching records returned from search * @return void **/ function display($tpl = null) { $model = $this->getModel('search'); $params = $model->getParams(); $use_joomfish = $params->get('use_joomfish'); $tagId = JRequest::getInt('tagId'); if ($tagName = stripslashes(urldecode(JRequest::getVar('tagName')))) { $tagId = getTagByName($tagName, $use_joomfish); } $this->assignRef('data', $model->getData($tagId)); $errors = $model->getErrors(); $this->assignRef('errors', $errors); // search summary and pagination make sense only if there's something to show if (empty($errors)) { $this->assignRef('pagination', $model->getPagination($tagId)); if ($params->get('show_result_summary')) { $this->assignRef('result_summary', $model->getResultSummary($tagId)); } } $this->assignRef('search_pars', $model->getSearchPars($tagId)); $this->assignRef('tagname', $model->getTagName()); $this->assignRef('ordering', $model->_ordering); $this->assignRef('params', $params); parent::display($tpl); }
<?php require_once 'parts.php'; require_once 'model.php'; ?> <?php //$toolsList=array(array("name"=>"Mailchimp","url"=>"http://www.mailchimp.com","pitch"=>"the best email ever"), array("name"=>"Veeflow","url"=>"http://www.veeflow.com","pitch"=>"measure and increase virality in your website"), //array("name"=>"MixPanel","url"=>"www.mixpanel.com","pitch"=>"Bla bla bla "), array("name"=>"Kissmetrics","url"=>"http://www.kissmetrics.com","pitch"=>"Bla bla bla ")); $toolsList = getToolsByTag($_GET['tag']); $tag = getTagByName($_GET['tag']); ?> <?php $title = 'Tools for ' . $tag["name"] . ' | Startup Tools'; $description = $tag["description"] . ": "; $keywords = $tag["name"] . ", Startup Tools, Tools"; $i = 0; foreach ($toolsList as $kw) { $i++; if ($i < 5) { $keywords = $keywords . ", " . $kw["name"]; $description = $description . $kw["name"] . ", "; } } $description = substr($description, 0, -2) . "?"; get_header($title, $description, $keywords); $facebookShareLink = "https://www.facebook.com/dialog/feed?app_id=188598501277677&link=http://www.tuneyourstartup.com/tag.php%3Ftag%3D" . $tag['name'] . "&picture=http://www.tuneyourstartup.com/img/favicon/share_img.png&name=" . $title . "&caption=The%20most%20complete%20list%20of%20startup%20tools&description=" . $description . "&redirect_uri=http://www.tuneyourstartup.com/tag.php%3Ftag%3D" . $tag['name']; ?>
function processAdjustmentSentence($modlist, &$chain) { global $rackCode; $didChanges = FALSE; foreach ($modlist as $mod) { switch ($mod['op']) { case 'insert': foreach ($chain as $etag) { if ($etag['tag'] == $mod['tag']) { // already there, next request break 2; } } $search = getTagByName($mod['tag']); if ($search === NULL) { // skip martians silently break; } $chain[] = $search; $didChanges = TRUE; break; case 'remove': foreach ($chain as $key => $etag) { if ($etag['tag'] == $mod['tag']) { unset($chain[$key]); $didChanges = TRUE; break 2; } } break; case 'clear': $chain = array(); $didChanges = TRUE; break; default: // HCF throw new RackTablesError('invalid structure', RackTablesError::INTERNAL); } } return $didChanges; }
function findCtxModWarnings($modlist) { $ret = array(); foreach ($modlist as $mod) { if (($mod['op'] == 'insert' or $mod['op'] == 'remove') and NULL === getTagByName($mod['tag'])) { $ret[] = array('header' => refRCLineno($mod['lineno']), 'class' => 'warning', 'text' => "Tag '{$mod['tag']}' does not exist."); } } return $ret; }
function addTagToObject($facter, $newmachine) { $tags = array($facter['machinetype'], $facter['domain']); $count_tags = count($tags); for ($i = 0; $i < $count_tags; $i++) { rebuildTagChainForEntity('object', $newmachine, array(getTagByName($tags[$i]))); } }