function getMediaItem($item) { $content = '<li class="list-group-item">'; $content .= getRating($item['rating']); $content .= $item['title'] . '<br>'; $content .= '<small>' . $item['description'] . '</small><br>'; $content .= getTags($item['tags']); // Buttonrow $content .= '<div class="text-right">'; // Edit Button $content .= '<a href="index.php?media_item_id=' . $item['id'] . '">'; $content .= '<button type="button" class="btn btn-xs" aria-label="Editieren">'; $content .= '<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>'; $content .= '</button>'; $content .= '</a>'; // Delete Button $content .= '<a href="submit.php?delete_id=' . $item['id'] . '">'; $content .= '<button type="button" class="btn btn-xs" aria-label="Editieren">'; $content .= '<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>'; $content .= '</button>'; $content .= '</a>'; $content .= '</div>'; // END buttonrow $content .= '</li>'; return $content; }
function formTagCloud() { $allTags = getTags(); while ($row = mysql_fetch_assoc($allTags)) { echo '<span class="tag' . rand(1, 4) . '"> <a href="' . HTTP_SERVER . 'tag/' . $row['tag_name'] . '" title="' . $row['tag_name'] . '">' . $row['tag_name'] . '</a>' . '</span>'; } }
function formTagCloud() { $allTags = getTags(); foreach ($allTags as $row) { echo '<span class="tag' . rand(1, 4) . '"> <a href="' . HTTP_SERVER . 'tag/' . $row['tag_name'] . '/" title="' . $row['tag_name'] . '" rel="tag">' . $row['tag_name'] . '</a>' . '</span>'; } }
function createMapping($field) { $arr['title'] = $field['vendor'] . ' ' . $field['name']; $arr['body_html'] = $field['description']; $arr['vendor'] = $field['vendor']; $arr['product_type'] = $field['type']; $arr['tags'] = getTags($field['tags']); $arr['images'] = array(getImageUrl(IMAGE_BASE_URL, $field['image'])); $arr['metafields_global_title_tag'] = 'Paramount BP ' . $arr['title']; $arr['metafields_global_description_tag'] = $field['meta_description']; $arr['variants'] = array(getbasicVariants($field)); return $arr; }
function textNameOut($name, $id, $type) { global $db; // setting header header("Content-Type: text/html; charset=UTF-8"); $output = "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n"; if ($name != "") { return $output . "<strong class=\"clusterName\">" . $name . "</strong><br />\n"; } else { $tags = getTags($db, $id, $type); foreach ($tags as $key => $value) { $tag = $key . "=" . $value; if (dgettext("tags", $tag) != "") { $name[0] = dgettext("tags", $tag); } if ($name[0] != $tag) { break; } } return $output . "<strong class=\"clusterName\">" . $name[0] . "</strong><br />\n"; } }
function printEntry($rowFromDb) { $url = $rowFromDb["url"]; $domain = parse_url($url)["host"]; $title = htmlspecialchars($rowFromDb["title"]); $timestamp = $rowFromDb["timestamp"]; $Date = new DateTime($timestamp); $Date->setTimezone(new DateTimeZone('Europe/Stockholm')); $timestamp = $Date->format('d/m/Y H:i'); $linkID = $rowFromDb["linkID"]; $userID = $_SESSION['UserID']; echo "<div class='entry'>"; echo "<div class='edit-links'>"; echo "<span class='glyphicon glyphicon-edit' data-toggle='tooltip' title='edit' id={$linkID}></span>"; echo "<span class='glyphicon glyphicon-remove' data-toggle='tooltip' title='delete' id={$linkID}></span>"; echo "</div>"; echo "<div class='title-bar'>"; echo "<div class='title'>"; echo "<a href='{$url}'>{$title}</a>"; echo "</div>"; echo "</div>"; echo "<div class='middle-row'>"; echo "<p>{$domain}</p>"; echo "</div>"; $tags = getTags($linkID, $userID); echo "<div class='tagrow'>"; if (count($tags) > 0) { echo "<div class='tags'>"; foreach ($tags as $row) { $tag = $row["tag"]; echo "<span class='tag'>{$tag}</span>"; } echo "</div>"; } echo "<span class='timestamp text-muted'>{$timestamp}</span>"; echo "</div>"; echo "</div>"; }
function doAction($action) { $forwardpage = ""; $forward = true; $loggedin = isUserLoggedIn(); if (!$loggedin && strcmp($action, "login") != 0 && strcmp($action, "register") != 0 && strcmp($action, "getTags") != 0) { addError("fatal", "user.unathorized"); outputJSON("error"); } else { if (strcmp($action, "login") == 0) { login(); } else { if (strcmp($action, "logout") == 0) { logout(); } else { if (strcmp($action, "isLoggedIn") == 0) { isLoggedIn(); } else { if (strcmp($action, "register") == 0) { register(); } else { if (strcmp($action, "addquestion") == 0) { addQuestion(); } else { if (strcmp($action, "getTags") == 0) { getTags(); } else { if (strcmp($action, "getquestions") == 0) { getQuestions(); } } } } } } } } }
function admin_list() { $this->_check_cms(); if (!empty($_GET['fid'])) { $gets['fid'] = (int) $_GET['fid']; } if (!empty($_GET['cid'])) { $gets['cid'] = (int) $_GET['cid']; } $gets['page'] = empty($_GET['page']) ? 1 : $_GET['page']; $gets['pagesize'] = 10; $pager = null; $model = createModel($this->app); $list = $model->gets($gets, $pager); $cates = getCategorys($this->app); $tags = getTags($this->app); $this->swoole->tpl->assign('cates', $cates); $this->swoole->tpl->assign('tags', $tags); $pager = array('total' => $pager->total, 'render' => $pager->render()); $this->swoole->tpl->assign('pager', $pager); $this->swoole->tpl->assign('list', $list); $this->swoole->tpl->display('admin_' . strtolower($this->app) . '_list.html'); }
?> <item> <?php // Shared Output: ?> <link><?php echo $post->attributes()->url; ?> </link> <pubDate><?php echo $post->attributes()->date; ?> +0000</pubDate> <dc:creator><![CDATA[post_author]]></dc:creator> <?php getTags($post); ?> <guid isPermaLink="false"><?php echo $post->attributes()->url; ?> </guid> <wp:post_id><?php echo $post->attributes()->id; ?> </wp:post_id> <wp:post_date><?php echo date('Y-m-d G:i:s', (double) $post->attributes()->{'unix-timestamp'}); ?> </wp:post_date> <wp:post_date_gmt><?php echo str_replace(" GMT", "", $post->attributes()->{'date-gmt'});
<input name="chkPostCats[]" type="checkbox" value="<?php echo $row['cat_id']; ?> " /><?php echo $row['cat_name']; ?> </div> <?php } ?> </div> <div class="clear"></div> <label>All tags on site<span class="small">Select to add</span> </label> <div class="selectchk"> <?php $all_tags = getTags(); while ($rowTags = mysql_fetch_assoc($all_tags)) { ?> <div class="chk"> <input name="chkPostTags[]" type="checkbox" value="<?php echo $rowTags['tag_id']; ?> " /><?php echo $rowTags['tag_name']; ?> </div> <?php } ?> </div> <input class="btn" type="submit" name="btnPostAdd" value="Add" />
?> <style> <?php ikutkan("css/bootstrap-tokenfield.min.css"); ikutkan("css/tokenfield-typeahead.min.css"); ?> </style> <label>Label / Tag / Tanda:</label><br> <input class="form-control input-sm" id="label" type="text" style="width:100%" name="label" value="<?php echo $row['label_warga']; ?> "> <script src="?file&apa=js/bootstrap-tokenfield.min.js"></script> <?php $tags = getTags(); $warna = array('warning', 'primary', 'success', 'info', 'danger'); $tgs = ""; for ($n = 0; $n < count($tags); $n++) { if (!empty($tags[$n])) { $tgs .= "'" . trim($tags[$n]) . "',"; ?> <a class="btn btn-<?php echo $warna[rand(0, 4)]; ?> btn-xs" href="javascript:addTag('<?php echo $tags[$n]; ?> ')"><?php echo $tags[$n]; ?>
/** * Convenience function to get just the status tags from a page revision. * * @param string $page_id The page ID * @param string $revision_id The revision ID, or "" if current revision * * @return array An array containing the status tags found (the array may be empty * but will not be null) */ function getStatusTags($page_id, $revision_id) { return getStatusFromTags(getTags($page_id, $revision_id)); }
Tag </div> <div class="filterRight"> Not <?php if (isset($_SESSION['filter']['Not_tag']) and $_SESSION['filter']['Not_tag'] == 1) { print "<input type=\"checkbox\" name=\"Not_tag\" value=\"1\" class=\"text ui-widget-content ui-corner-all\" checked>"; } else { print "<input type=\"checkbox\" name=\"Not_tag\" value=\"1\" class=\"text ui-widget-content ui-corner-all\">"; } ?> <select name="tag" size="1" style="width: 165px" class="text ui-widget-content ui-corner-all "> <option value="all">All Tags </option> <?php $tagsList = getTags(); foreach ($tagsList as $tag) { if (isset($_SESSION['filter']['tag']) and $_SESSION['filter']['tag'] == $tag['tag_id']) { print "<option selected value=\"" . $tag['tag_id'] . "\">" . $tag['tag_name'] . " </option>"; } else { print "<option value=\"" . $tag['tag_id'] . "\">" . $tag['tag_name'] . " </option>"; } } ?> </select> </div> </label> <div class="filterClear"></div> </div> <div class="filterRow">
</h2> <div class="sidebar-section"><?php printImageDate('', '', null, true); ?> </div> <?php if (getImageDesc() || zp_loggedin()) { ?> <div class="sidebar-section"><?php printImageDesc(true); ?> </div><?php } ?> <?php if (getTags() || zp_loggedin()) { ?> <div class="sidebar-section"><?php printTags('links', gettext('<strong>Tags:</strong>') . ' ', 'taglist', ''); ?> </div><?php } ?> <?php if (!$zpmin_disablemeta) { ?> <?php if (getImageMetaData() || zp_loggedin()) { ?> <div class="sidebar-section"><?php printImageMetadata('', false, null, 'full-image-meta', true);
/** * Helper function to list tags/categories as keywords separated by comma. * * @param array $array the array of the tags or categories to list */ private static function getMetaKeywords() { global $_zp_gallery, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_category, $_zp_gallery_page, $_zp_zenpage; $words = ''; if (is_object($_zp_current_album) or is_object($_zp_current_image)) { $tags = getTags(); $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery"); } else { if ($_zp_gallery_page === "index.php") { $tags = array_keys(getAllTagsCount(true)); // get all if no specific item is set $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery"); } } if (extensionEnabled('zenpage')) { if (is_NewsArticle()) { $tags = getNewsCategories(getNewsID()); $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "zenpage"); $tags = getTags(); $words = $words . "," . htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery"); } else { if (is_Pages()) { $tags = getTags(); $words = htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery"); } else { if (is_News()) { $tags = $_zp_zenpage->getAllCategories(); $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "zenpage"); } else { if (is_NewsCategory()) { $words .= $_zp_current_category->getTitle(); } } } } } return $words; }
/** * Prints a list of tags, editable by admin * * @param string $option links by default, if anything else the * tags will not link to all other images with the same tag * @param string $preText text to go before the printed tags * @param string $class css class to apply to the div surrounding the UL list * @param string $separator what charactor shall separate the tags * @since 1.1 */ function printTags($option = 'links', $preText = NULL, $class = NULL, $separator = ', ') { global $_zp_current_search; if (is_null($class)) { $class = 'taglist'; } $singletag = getTags(); $tagstring = implode(', ', $singletag); if ($tagstring === '' or $tagstring === NULL) { $preText = ''; } if (in_context(ZP_IMAGE)) { $object = "image"; } else { if (in_context(ZP_ALBUM)) { $object = "album"; } else { if (in_context(ZP_ZENPAGE_PAGE)) { $object = "pages"; } else { if (in_context(ZP_ZENPAGE_NEWS_ARTICLE)) { $object = "news"; } } } } if (count($singletag) > 0) { if (!empty($preText)) { echo "<span class=\"tags_title\">" . $preText . "</span>"; } echo "<ul class=\"" . $class . "\">\n"; if (is_object($_zp_current_search)) { $albumlist = $_zp_current_search->getAlbumList(); } else { $albumlist = NULL; } $ct = count($singletag); $x = 0; foreach ($singletag as $atag) { if (++$x == $ct) { $separator = ""; } if ($option === "links") { $links1 = "<a href=\"" . html_encode(getSearchURL(search_quote($atag), '', 'tags', 0, array('albums' => $albumlist))) . "\" title=\"" . html_encode($atag) . "\">"; $links2 = "</a>"; } else { $links1 = $links2 = ''; } echo "\t<li>" . $links1 . $atag . $links2 . $separator . "</li>\n"; } echo "</ul>"; } else { echo "{$tagstring}"; } }
} else { $searchwords = getSearchWords(); } } $c = 0; ?> <!DOCTYPE html> <head> <?php include_once 'header.php'; ?> <?php zp_apply_filter('theme_body_open'); ?> <meta name="keywords" content="<?php echo html_encode(getFormattedMainSiteName('', ', ') . getGalleryTitle() . ', ' . getBareAlbumTitle() . ', ' . implode(',', getTags())); ?> " /> <meta name="description" content="<?php echo html_encode(getAlbumDesc()); ?> " /> <title><?php echo strip_tags(getFormattedMainSiteName('', ' / ') . getGalleryTitle() . ' / ' . gettext('Search') . ' / ' . $searchwords); ?> </title> </head> <body id="gallery-index"> <div id="wrapper"> <div id="header"> <div id="logo">
if ($page == "") { $page = "1"; } $currentpage = $page; STemplate::assign('page', $page); if ($page >= 2) { $pagingstart = ($page - 1) * $config['items_per_page']; } else { $pagingstart = "0"; } $query1 = "SELECT count(*) as total from posts A, members B where A.active='1' AND A.USERID=B.USERID AND A.phase>'1' order by A.htime desc limit {$config['maximum_results']}"; $query2 = "SELECT A.*, B.username from posts A, members B where A.active='1' AND A.USERID=B.USERID AND A.phase>'1' order by A.htime desc limit {$pagingstart}, {$config['items_per_page']}"; $executequery1 = $conn->Execute($query1); $totalvideos = $executequery1->fields['total']; if ($totalvideos > 0) { if ($executequery1->fields['total'] <= $config[maximum_results]) { $total = $executequery1->fields['total']; } else { $total = $config[maximum_results]; } $toppage = ceil($total / $config[items_per_page]); if ($page <= $toppage) { $executequery2 = $conn->Execute($query2); $posts = $executequery2->getrows(); $posts = getTags($posts); $posts = countComments($posts); $posts = getHash($posts); STemplate::assign('posts', $posts); STemplate::display('posts_bit_more.tpl'); } }
<span> (<?php echo imageNumber() . "/" . getNumImages(); ?> )</span> </h5> <h1><?php printImageTitle(true); ?> </h1> <p><?php printImageDesc(true); ?> </p> <div class="news-meta"> <?php $singletag = getTags(); $tagstring = implode(', ', $singletag); ?> <ul class="taglist"> <li class="meta-date"><?php printImageDate('', '', null, true); ?> </li> <?php if (strlen($tagstring) > 0) { ?> <li class="meta-tags"><?php printTags('links', '', 'taglist', ', '); ?> </li><?php }
} ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Admin Page</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> </head> <body> <div class="row"> <div class="col-md-1"></div> <div class="col-md-10"> <?php $rows = getTags($pdo); foreach ($rows as $row) { ?> <form class="form-inline"> <input type="hidden" id="videoId" value="<?php echo $row['videoId']; ?> "> <input type="hidden" id="tagId" value="<?php echo $row['tagId']; ?> "> <div class="form-group"> <label class="sr-only" for="videoTag">Tag</label> <input type="text" class="form-control" id="videoTag" placeholder="Tag"> </div>
public function peruretailAction() { // obtener la ultimas noticias de peru retail $some_link = 'http://www.peru-retail.com/'; $tagName = 'div'; $attrName = 'class'; $attrValue = 'blog_item'; function getTags($dom, $tagName, $attrName, $attrValue) { $html = ''; $domxpath = new \DOMXPath($dom); $newDom = new \DOMDocument(); $newDom->formatOutput = true; $filtered = $domxpath->query("//{$tagName}" . '[@' . $attrName . "='{$attrValue}']"); $i = 0; while ($myItem = $filtered->item($i++)) { $node = $newDom->importNode($myItem, true); $newDom->appendChild($node); } $html = $newDom->saveHTML(); return $html; } $dom = new \DOMDocument(); $dom->preserveWhiteSpace = false; @$dom->loadHTMLFile($some_link); $html = getTags($dom, $tagName, $attrName, utf8_decode($attrValue)); echo $html; $viewModel = new ViewModel(); $viewModel->setTerminal(true); return $viewModel; }
} } } } if (isset($_GET['id'])) { $id = $_GET['id']; $article_id = isset($_GET['article_id']) ? $_GET['article_id'] : ''; if ($_GET['act'] == 'edit') { $query = "SELECT * FROM segment WHERE id = '{$id}'"; $result = mysqli_query($dbc, $query) or die('Error querying database.'); $row = mysqli_fetch_array($result); $title = $row['title']; $content = $row['content']; $rank = $row['rank']; $is_comment = $row['is_comment']; $tags = getTags($dbc, $id); } else { if ($_GET['act'] == 'insert') { $is_comment = isset($_GET['is_comment']) ? '1' : '0'; $rank = $is_comment ? '0' : '1'; $id = init_segment($dbc, $article_id, $id, $is_comment, $rank); } } } else { $id = $_POST['id']; $title = $_POST['title']; $rank = $_POST['rank']; $content = $_POST['content']; $article_id = isset($_POST['article_id']) ? $_POST['article_id'] : ''; $tags = $_POST['tags']; $query = "UPDATE segment SET rank = '{$rank}', title = '" . mysql_escape_string($title) . "', content = '" . mysql_escape_string($content) . "' WHERE id = '{$id}'";
// TODO : 이부분(스크립트를 실행할 수 없는 환경일 때)은 직접 입력보다는 0.96 스타일의 팝업이 좋을 듯 } try { var oTag = new Tag(document.getElementById("tag"), "<?php echo $blog['language']; ?> ", <?php echo isset($service['disableEolinSuggestion']) && $service['disableEolinSuggestion'] ? 'true' : 'false'; ?> ); oTag.setInputClassName("input-text"); <?php $tags = array(); if (!defined('__TEXTCUBE_POST__')) { foreach (getTags($entry['blogid'], $entry['id']) as $tag) { array_push($tags, $tag['name']); echo 'oTag.setValue("' . addslashes($tag['name']) . '");'; } } ?> } catch(e) { document.getElementById("tag").innerHTML = '<input type="text" class="input-text" name="tag" value="<?php echo addslashes(str_replace('"', '"', implode(', ', $tags))); ?> " /><br /><?php echo _t('태그 입력 스크립트를 사용할 수 없습니다. 콤마(,)로 구분된 태그를 직접 입력해 주십시오.(예: 텍스트큐브, BLOG, 테스트)'); ?> '; } //]]>
/** * Get detailed info for tags used in an entry * * @param string $template * @return string */ function snippet_ttaglist($template = '') { global $PIVOTX; $aTagsList = getTags(false); if (sizeof($aTagsList) > 0) { $output = "<div id='tagpage'>\n"; $output .= "<h3>" . __('Tags used in this posting') . "</h3>\n"; $tagLinks = array(); foreach ($aTagsList as $sTag) { makeRelatedTags($sTag, $aTagsList); $tagLinks[] = sprintf('<a rel="tag" href="%s" title="tag: %s">%s</a>', tagLink($sTag, $template), $sTag, $sTag); } $output .= "<p>" . implode(", ", $tagLinks) . "</p>\n"; reset($aTagsList); foreach ($aTagsList as $sRelated) { $sTheRelatedLinks = getEntriesWithTag($sRelated, $PIVOTX['db']->entry["code"]); if (!strlen($sTheRelatedLinks) == 0) { $output .= "\n<h3>"; $output .= __('Other entries about') . " '" . $sRelated . "'</h3>\n"; $output .= $sTheRelatedLinks; } } $output .= "\n</div>\n"; } else { $output = ''; } return $output; }
<div id="title" class="box"><h3><?php printImageTitle(true); ?> </h3></div> <div id="date" class="box"><?php echo '( ' . getImageDate(getOption('date_format')) . ' )'; ?> </div> </div> <?php if (getImageDesc() or zp_loggedin()) { echo '<div class="c"><div id="desc" class="box">'; echo printImageDesc(true); echo '</div></div>'; } if (getTags() or zp_loggedin()) { echo '<div class="c"><div id="tags" class="box">'; printTags('links', '', '', ', ', true, '', true); echo '</div></div>'; } if (function_exists('printRating')) { echo '<div class="c"><div id="rating">'; printRating(); echo '</div></div>'; } ?> </div> <div class="clear_left"></div> <div id="image"> <div> <?php
<?php $second_resource = sizeof($uri) > 0 ? array_shift($uri) : ""; $third_resource = sizeof($uri) > 0 ? array_shift($uri) : ""; if ($second_resource === "") { ?> <a href="/admin/menu"><<< Back to Menu</a><br><br> <a href="/admin/tags/new">Create new Tag</a><br><br> <table cellspacing=0> <?php $color = 1; $sortTags = getTags(); usort($sortTags, "tagSort"); foreach ($sortTags as $tag) { echo '<tr class="' . ($color > 0 ? "white" : "grey") . '"><td><a target="_blank" href="' . $mainSite . 'blog/tag/' . $tag['tag_id'] . '">' . $tag['tag_name'] . '</a></td>'; echo '<td>' . $tag['tag_id'] . '</td>'; echo '<td>' . getTagCount($tag['tag_id']) . ' Posts</td>'; echo '<td><a href="/admin/tags/edit/' . $tag['tag_id'] . '">Edit</a></td>'; echo '<td><a href="/admin/deletetag/' . $tag['tag_id'] . '" onclick="return confirm(\'are you sure?\')">Delete</a></td>'; $color *= -1; } ?> </table> <?php } else { if ($second_resource === "new") { ?> <a href="/admin/tags"><<< Back to Tag Management</a><br><br>
function textDetailsOut($response, $nameresponse, $wikipediaresponse, $langs = "en", $offset = 0) { global $db, $id, $type; if ($response) { // setting header header("Content-Type: text/html; charset=UTF-8"); $output = "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">"; // translation of name if ($nameresponse) { $name = getNameDetail($langs, $nameresponse); } // if no name is set, use the poi type as name instead if ($name[0] == "") { $tags = getTags($db, $id, $type); foreach ($tags as $key => $value) { $tag = $key . "=" . $value; if (dgettext("tags", $tag) != "") { $name[0] = dgettext("tags", $tag); } if ($name[0] != $tag) { break; } } } $phone = getPhoneFaxDetail(array($response['phone1'], $response['phone2'], $response['phone3'])); $fax = getPhoneFaxDetail(array($response['fax1'], $response['fax2'], $response['fax3'])); $mobilephone = getPhoneFaxDetail(array($response['mobilephone1'], $response['mobilephone2'])); $website = getWebsiteDetail(array($response['website1'], $response['website2'], $response['website3'], $response['website4'])); $email = getMailDetail(array($response['email1'], $response['email2'], $response['email3'])); // get wikipedia link and make translation if ($wikipediaresponse) { $wikipedia = getWikipediaDetail($langs, $wikipediaresponse); } $openinghours = getOpeninghoursDetail($response['openinghours']); $servicetimes = getOpeninghoursDetail($response['servicetimes']); // printing popup details // image, only images from domains listed on a whitelist are displayed if (imageDomainAllowed($response['image'])) { $url = getImageUrl($response['image']); $tmp = parse_url($url); if (substr_count($tmp['host'], ".") > 1) { $domain = substr($tmp['host'], strpos($tmp['host'], ".") + 1); } else { $domain = $tmp['host']; } // image from wikimedia commons if ($domain == "wikimedia.org") { // creating url to Wikimedia Commons page of this image $attribution = explode("/", $url); if (substr($url, 34, 16) == "special:filepath") { $attribution = $attribution[5]; } else { $attribution = $attribution[7]; } $output .= "<div id=\"loadingImage\"><img id=\"image\" title=\"" . _("Fullscreen") . "\" src=\"" . getWikipediaThumbnailUrl($url) . "\" /></div><div class=\"attribution\"><a target=\"_blank\" href=\"http://commons.wikimedia.org/wiki/File:" . $attribution . "\">" . _("attribution-wikimedia.org") . "</a></div>\n"; } else { if ($domain == "openstreetmap.org") { // creating url to OpenStreetMap Wiki page of this image $attribution = explode("/", $url); if (substr($url, 35, 16) == "special:filepath") { $attribution = $attribution[5]; } else { $attribution = $attribution[7]; } $output .= "<div id=\"loadingImage\"><img id=\"image\" title=\"" . _("Fullscreen") . "\" src=\"" . getOsmWikiThumbnailUrl($url) . "\" /></div><div class=\"attribution\"><a target=\"_blank\" href=\"http://wiki.openstreetmap.org/wiki/File:" . $attribution . "\">" . _("attribution-openstreetmap.org") . "</a></div>\n"; } else { $output .= "<div id=\"loadingImage\"><img id=\"image\" title=\"" . _("Fullscreen") . "\" src=\"" . $url . "\" /></div><div class=\"attribution\"><a target=\"_blank\" href=\"" . _("attribution-url-" . $domain) . "\">" . _("attribution-" . $domain) . "</a></div>\n"; } } } else { if (getWikipediaImage($wikipedia[1])) { // creating url to Wikimedia Commons page of this image $attribution = explode("/", $url); if (substr($url, 34, 16) == "special:filepath") { $attribution = $attribution[5]; } else { $attribution = $attribution[7]; } $image = getWikipediaImage($wikipedia[1]); $output .= "<div id=\"loadingImage\"><img id=\"image\" title=\"" . _("Fullscreen") . "\" src=\"" . getWikipediaThumbnailUrl($image) . "\" /></div><div class=\"attribution\"><a target=\"_blank\" href=\"http://commons.wikimedia.org/wiki/File:" . $attribution . "\">" . _("attribution-wikimedia.org") . "</a></div>\n"; } } if ($name) { $output .= "<div class=\"container hcard vcard\"><div class=\"header\">\n"; $output .= "<strong class=\"name\">" . $name[0] . "</strong>\n"; $output .= "</div>\n"; } // address information if ($response['street'] || $response['housenumber'] || $response['country'] || $response['city'] || $response['postcode']) { $output .= "<div class=\"adr\">\n"; // country-dependend format of address $output .= formatAddress($response, $response['country']); $output .= "</div>\n"; } // contact information if ($phone || $fax || $mobilephone || $email) { $output .= "<div class=\"contact\">\n"; if ($phone) { $output .= "<div class=\"tel\"><span class=\"type\">" . _("Phone") . "</span>:"; foreach ($phone as $phonenumber) { $output .= " <a class=\"value\" href=\"tel:" . $phonenumber[0] . "\">" . $phonenumber[1] . "</a>"; } $output .= "</div>\n"; } if ($fax) { $output .= "<div class=\"tel\"><span class=\"type\">" . _("Fax") . "</span>:"; foreach ($fax as $faxnumber) { $output .= " <span class=\"value\">" . $faxnumber[1] . "</span>"; } $output .= "</div>\n"; } if ($mobilephone) { $output .= "<div class=\"tel\"><span class=\"type\">" . _("Mobile phone") . "</span>:"; foreach ($mobilephone as $mobilephonenumber) { $output .= " <span class=\"value\" href=\"tel:" . $mobilephonenumber[0] . "\">" . $mobilephonenumber[1] . "</span>"; } $output .= "</div>\n"; } if ($email) { $output .= "<div>" . _("Email") . ":"; foreach ($email as $emailaddress) { $output .= " <a class=\"email\" href=\"mailto:" . $emailaddress . "\">" . $emailaddress . "</a>"; } $output .= "</div>\n"; } $output .= "</div>\n"; } // website and wikipedia links if ($website || $wikipedia[0]) { $output .= "<div class=\"web\">\n"; if ($website) { $output .= "<div>" . _("Homepage") . ":"; foreach ($website as $webaddress) { if (($caption = strlen($webaddress[1]) > 37) && strlen($webaddress[1]) > 40) { $caption = substr($webaddress[1], 0, 37) . "..."; } else { $caption = $webaddress[1]; } $output .= " <a class=\"url\" target=\"_blank\" href=\"" . $webaddress[0] . "\">" . $caption . "</a>\n"; } $output .= "</div>\n"; } if ($wikipedia[1]) { $output .= "<div class=\"wikipedia\">" . _("Wikipedia") . ": <a target=\"_blank\" href=\"" . $wikipedia[1] . "\">" . urldecode($wikipedia[2]) . "</a></div>\n"; } $output .= "</div>\n"; } // operator if ($response['operator']) { $output .= "<div class=\"operator\">" . _("Operator") . ": " . $response['operator'] . "</div>\n"; } // opening hours if ($openinghours) { $output .= "<div class=\"openinghours\">" . _("Opening hours") . ":<br />" . $openinghours; if (isOpen247($response['openinghours'])) { $output .= "<br /><b class=\"open\">" . _("Open 24/7") . "</b>"; } else { if (isPoiOpen($response['openinghours'], $offset)) { $output .= "<br /><b class=\"open\">" . _("Now open") . "</b>"; } else { if (isInHoliday($response['openinghours'], $offset)) { $output .= "<br /><b class=\"maybeopen\">" . _("Open on holiday") . "</b>"; } else { $output .= "<br /><b class=\"closed\">" . _("Now closed") . "</b>"; } } } $output .= "</div>\n"; } // service times if ($servicetimes) { $output .= "<div class=\"servicetimes\">" . _("Service hours") . ":<br />" . $servicetimes; if (isPoiOpen($response['openinghours'], $offset)) { $output .= "<br /><b class=\"open\">" . _("Now open") . "</b>"; } else { if (isInHoliday($response['servicetimes'], $offset)) { $output .= "<br /><b class=\"maybeopen\">" . _("Open on holiday") . "</b>"; } else { $output .= "<br /><b class=\"closed\">" . _("Now closed") . "</b>"; } } $output .= "</div>\n"; } $output .= "</div>\n"; return $output; } else { return false; } }
<div class="entry_info"> <h2><?php echo htmlspecialchars($entry['title']); ?> </h2> <h3 class="noBorderLine"><?php echo Timestamp::format5($entry['published']); ?> </h3> </div> <div class="content"><?php printMobileEntryContentView($blogid, $entry, null); ?> </div> <?php $entryTags = getTags($entry['blogid'], $entry['id']); if (sizeof($entryTags) > 0) { ?> <div class="entry_tags" data-role="content" data-theme="c"> <h3 class="tags_title">Tags</h3> <?php $tags = array(); $relTag = Setting::getBlogSettingGlobal('useMicroformat', 3) > 1 && (count($entries) == 1 || !empty($skin->hentryExisted)); foreach ($entryTags as $entryTag) { $tags[$entryTag['name']] = '<a href="' . $context->getProperty('uri.blog') . '/tag/' . $entryTag['id'] . '">' . htmlspecialchars($entryTag['name']) . '</a>'; } echo implode(",\r\n", array_values($tags)); ?> </div> </div> <?php
break; case 4: // create comment break; case 5: // update user bio break; case 6: //upate user tag_selection break; case 7: // update friends break; case 8: // get recommended events getRecommendedEvents($params); break; case 9: // return all user info getUserInfo($params); break; case 'debug': echo "debug_php"; break; case 20: getTags(); break; default: echo "command found found"; break; }
echo gettext("Comments:"); ?> <?php echo getCommentCount(); } ?> </span> <?php echo ' | '; printNewsCategories(", ", gettext("Categories: "), "newscategories"); ?> </div> <?php printNewsContent(); printCodeblock(1); if (getTags()) { echo gettext('<strong>Tags:</strong>'); } printTags('links', '', 'taglist', ', '); ?> <br style="clear:both;" /><br /> </div> <?php } printNewsPageListWithNav(gettext('next »'), gettext('« prev'), true, 'pagelist', true); } ?> </div><!-- content left-->