function showPostContent($title, $url, $postPath, $tags, $pdate, $addDelimiter) { if (file_exists($postPath)) { if ($url != "") { $title = "<a href=\"" . $url . "\">" . $title . "</a>"; } echo "<h1>" . $title . "</h1>\n"; echo "<span style=\"font-size:10px;\">" . $pdate . "</span><br />\n"; echo file_get_contents($postPath); showTags(explode(",", $tags), ""); if ($addDelimiter) { echo "<hr />\n"; } } }
function getBlockCode_Founded($iBlockId) { $aParam = array('pagination' => getParam('tags_perpage_browse')); $sFilter = bx_get('filter'); if ($sFilter !== false) { $aParam['filter'] = process_db_input($sFilter); } else { if ($this->oForm->isSubmittedAndValid()) { $aParam['filter'] = $this->oForm->getCleanValue('Keyword'); } } if (isset($aParam['filter'])) { return showTags($aParam, $iBlockId, BX_TAGS_ACTION_SEARCH, 0, _t('_tags_founded_tags')); } else { return MsgBox(_t('_Empty')); } }
/** * Replaces the matched {cptags} with the tags * @param array An array of matches (see preg_match_all) * @return string */ function CpTags_replacer(&$matches) { $text = ""; $cid = $this->_cid ? $this->_cid : $GLOBALS['botCpTagsContentId']; $params = $this->_params ? $this->_params : $GLOBALS['botCpTagsParams']; $ce = $this->_ce ? $this->_ce : $GLOBALS['botCpTagsCe']; if (empty($cid)) { return $text; } $text = showTags($ce, $cid, $params, $this->_params->tag_in_meta); return $text; }
</div><div style="clear:both"></div> <div id="tagsmin" class="dg_tag_error_message" style="display:none"><?php echo JText::sprintf('COM_DATSOGALLERY_TAG_MINIMUM_CHARS', $ad_min_tag_chars); ?> </div><div style="clear:both"></div> <div id="tagsmax" class="dg_tag_error_message" style="display:none"><?php echo JText::_('COM_DATSOGALLERY_TAG_MAXIMUM_TAGS'); ?> </div><div style="clear:both"></div> <div id="tagsdbl" class="dg_tag_error_message" style="display:none"><?php echo JText::_('COM_DATSOGALLERY_TAG_EXISTS'); ?> </div><div style="clear:both"></div> <div class="dg_body_background_tags"> <div id="tagchecklist" class="tagchecklist"> <?php echo showTags($obj->id); ?> </div> <div style="clear:both"></div> </div> <?php } if ($ad_gmap && $type == 'JPG' && is_callable('exif_read_data')) { $imgmeta = JPath::clean(JPATH_SITE . $ad_pathoriginals . DS . $obj->imgoriginalname); $exif = @exif_read_data($imgmeta); $lat = !empty($exif['GPSLatitude']) ? geo_single_gps($exif["GPSLatitude"], $exif['GPSLatitudeRef']) : ''; $lng = !empty($exif['GPSLongitude']) ? geo_single_gps($exif["GPSLongitude"], $exif['GPSLongitudeRef']) : ''; if ($lat && $lng) { $document->setMetaData('viewport', 'initial-scale=1.0, user-scalable=no', false); $document->addScript('http://maps.googleapis.com/maps/api/js?sensor=false'); $document->addScript('components/com_datsogallery/libraries/datso.gmap.min.js');
echo "<div class=\"cp_result\">\n"; switch ($view) { case 'title': showTitle($row, $params); break; case 'fullintro': showTitle($row, $params); showFullIntro($ce, $row, $searchword, $params); break; case 'intro': default: showTitle($row, $params); showIntro($row, $searchword, $params); break; } if ($show_tags) { echo showTags($ce, $row->id, $params); } if ($params->get('show_create_date')) { echo "<div class=\"cp_create_date\">{$created}</div>\n"; } echo "</div>\n"; } } } echo "\r\n\t\t</td>\r\n\t</tr>\n"; if ($total > $limit) { // pagination echo "\r\n <tr>\r\n <td>\r\n <table width=\"100%\" class=\"search_pagination\">\r\n <tr>\r\n <td>" . $pageNav->getPagesLinks() . "</td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\n"; } echo "</table>\n";
GalleryFooter(); break; case 'notify': ppIpn(); break; case 'vote': recordVote(); break; case 'addtag': addTag(); break; case 'removetag': removeTag(); break; case 'showtags': showTags($id); break; case 'addtofavorites': addToFavorites(); break; case 'editpic': GalleryHeader(); editPic($uid); GalleryFooter(); break; case 'edittitle': editImageTitle(); break; case 'editdesc': editImageDesc(); break;
function addTag() { jimport('joomla.utilities.string'); $db = JFactory::getDBO(); $user = JFactory::getUser(); $userGroups = JAccess::getGroupsByUser($user->id, true); $admins = array(7, 8); $is_admin = array_intersect($admins, $userGroups); $post = JRequest::get('post'); require JPATH_COMPONENT_ADMINISTRATOR . DS . 'config.datsogallery.php'; $query = 'SELECT tag' . ' FROM #__datsogallery_tags' . ' WHERE image_id = ' . (int) $post['id']; $db->setQuery($query); $rows = $db->LoadResultArray(); $input = JString::strtolower($post['newtag']); $newtag = preg_replace('/[^\\pN\\pL\\pM\\pZ]/iu', '', $input); $num = count($rows); if (!empty($newtag) && (int) $post['id'] && JString::strlen($newtag) > $ad_min_tag_chars && !in_array($newtag, $rows)) { if (!$is_admin && $num >= $ad_max_tags) { echo 1; exit; } else { $db->setQuery('INSERT INTO #__datsogallery_tags VALUES (' . $db->Quote("") . ', ' . (int) $post['id'] . ', ' . $user->id . ', NOW(), ' . $db->Quote($newtag) . ', 0)'); $db->query() or die($db->stderr()); echo showTags((int) $post['id']); exit; } } else { if (empty($newtag)) { echo 2; exit; } else { if (JString::strlen($newtag) <= $ad_min_tag_chars && !in_array($newtag, $rows)) { echo 3; exit; } else { if (in_array($newtag, $rows)) { echo 4; exit; } else { echo ''; exit; } } } } }
"><?php echo $vo["category"]; ?> </A>] </div></div> <div class="textbox-content"><?php echo $vo["content"]; ?> </div> <div class="textbox-bottom"> [ 管理:<A HREF="__URL__/edit/id/<?php echo $vo["id"]; ?> ">编辑</A> <A HREF="javascript:delBlog(<?php echo $vo["id"]; ?> )">删除</A> ] 关键词: <?php echo showTags($vo["tags"]); ?> | <A HREF="__URL__/show/id/<?php echo $vo["id"]; ?> #reply">评论: <?php echo $vo["commentCount"]; ?> </A> | 浏览: <?php echo $vo["readCount"]; ?> </div><P> </div><?php } } } else {
} } if ($erros != '') { redirectMsg('./tags.php?' . $ruta, __('Errors ocurred while trying to delete tags.', 'galleries') . '<br />' . $errors, 1); die; } else { redirectMsg('./tags.php?' . $ruta, __('Tags deleted successfully!', 'galleries'), 0); die; } } $op = rmc_server_var($_REQUEST, 'op', ''); switch ($op) { case 'new': formTags(); break; case 'edit': formTags(1); break; case 'save': saveTags(); break; case 'saveedit': saveTags(1); break; case 'delete': deleteTags(); break; default: showTags(); break; }
function onSearch($text, $phrase = '', $ordering = '', $areas = null) { require_once JPATH_SITE . DS . 'components' . DS . 'com_content' . DS . 'helpers' . DS . 'route.php'; require_once JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_search' . DS . 'helpers' . DS . 'search.php'; require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_eqzonales' . DS . 'helper' . DS . 'contenthelper.php'; $return = array(); $searchText = $text; if (is_array($areas)) { if (!array_intersect($areas, array_keys($this->onSearchAreas()))) { return $return; } } $text = trim($text); if ($text == '') { return $return; } // objeto usuario joomla $user =& JFactory::getUser(); // conexión a la base de datos $db =& JFactory::getDBO(); $nullDate = $db->getNullDate(); $date =& JFactory::getDate(); $now = $date->toMySQL(); // load plugin params info $plugin =& JPluginHelper::getPlugin('search', 'solrsearch'); $pluginParams = new JParameter($plugin->params); // recupera parametros desde el plugin $sContent = $pluginParams->get('search_content', 1); $sUncategorised = $pluginParams->get('search_uncategorised', 1); $sArchived = $pluginParams->get('search_archived', 1); $limit = $pluginParams->get('search_limit', 50); $results = $this->getSolrResults($text, 0, $limit); // display results if ($results) { $total = (int) $results->response->numFound; $start = min(1, $total); $end = min($limit, $total); $ce_file = JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_customproperties' . DS . 'contentelement.class.php'; $helper_file = JPATH_ROOT . DS . 'components' . DS . 'com_customproperties' . DS . 'helper.php'; if (!file_exists($helper_file) || !file_exists($ce_file)) { echo "<span class=\"alert\">Fatal Error: the component <b>com_customproperties</b> is not/badly installed. " . "Get it at <a href=\"http://www.solidsystem.it\">www.solidsystem.it</a></span>"; return true; } else { require_once $helper_file; require_once $ce_file; } $ce = new cpContentElement(); $plugin =& JPluginHelper::getPlugin('content', 'cptags'); $params = new JParameter($plugin->params); $params->def('linked_tags', '1'); // iterate result documents foreach ($results->response->docs as $doc) { $item = new stdClass(); $item->href = ContentHelperRoute::getArticleRoute($doc->id); $item->title = $doc->title; if (isset($doc->section) && isset($doc->category)) { $item->section = $doc->section . '/' . $doc->category; } else { $item->section = JText::_('Uncategorised Content'); } $item->tags = showTags($ce, $doc, $params); $item->created = $doc->created; $item->introtext = $doc->introtext; $item->browsernav = ''; $return[] = $item; } } return $return; }