} } break; default: // get the page display name from the database if (isset($s)) { extract(safe_row('*', 'pixie_core', "page_name = '{$s}'")); } // print the display name into a h3 echo "<div "; if (isset($s)) { echo "id=\"{$s}\""; } echo ">\n\t\t\t\t\t<h3>{$page_display_name}</h3>\n"; // get all the tags from the links page using the all_tags function within Pixie $tags_array = all_tags('pixie_module_links', "links_id >= '0'"); // make sure we actually got something if (count($tags_array) != 0) { // sort the tags in the array sort($tags_array); $max = 0; // begin to loop the array of tags for ($c = 1; $c < count($tags_array); $c++) { // get the current tag $current = $tags_array[$c]; // search for links tagged with the current tag $rz = safe_rows('*', 'pixie_module_links', "tags REGEXP '[[:<:]]" . $current . "[[:>:]]'"); $num = count($rz); // if found then output all those links into an unordered list if ($rz) { echo "\t\t\t\t\t<div id=\"{$current}\" class=\"link_list\">\n\t\t\t\t\t\t<h4>" . ucwords($current) . "</h4>\n\t\t\t\t\t\t<ul>\n";
while ($k <= $roundup) { $dynpgurl = createURL($pagename, 'page', $k); $cats[] = array('loc' => $dynpgurl, 'changefreq' => 'monthly', 'lastmod' => $recent); $k++; } // tag list /dynamic/tags/ $dynpgurl = createURL($pagename, 'tags'); $cats[] = array('loc' => $dynpgurl, 'changefreq' => 'monthly', 'lastmod' => $recent); // popular /dynamic/popular/ $dynpgurl = createURL($pagename, 'popular'); $cats[] = array('loc' => $dynpgurl, 'changefreq' => 'monthly', 'lastmod' => $recent); // archives /dynamic/arhcives/ $dynpgurl = createURL($pagename, 'archives'); $cats[] = array('loc' => $dynpgurl, 'changefreq' => 'monthly', 'lastmod' => $recent); // every tag /dynamic/tag/$tagname $tags_array = all_tags('pixie_dynamic_posts', "public = 'yes' and page_id = '{$pageid}'"); if (count($tags_array) != 0) { sort($tags_array); for ($final = 1; $final < count($tags_array); $final++) { $current = $tags_array[$final]; $link = str_replace(" ", "-", $current); $url1 = createURL($pagename, 'tag', $link); //print $final." ".$current."\n"; $cats[] = array('loc' => $url1, 'changefreq' => 'monthly', 'lastmod' => $recent); } } // also need a dynamic prority calculator 0 -> 1 } else { if ($type == 'module') { $change = 'monthly'; } else {
function form_tag($table, $condition) { global $s, $m, $x, $site_url, $lang; $tags_array = all_tags($table, $condition); if (count($tags_array) != 0) { $max = 0; for ($findmax = 1; $findmax < count($tags_array); $findmax++) { $current = $tags_array[$findmax]; $rz = safe_rows('*', $table, $condition . " AND tags REGEXP '[[:<:]]" . $current . "[[:>:]]'"); $total = count($rz); if ($total > $max) { $max = $total; } $max = $max - 1; $min = 1; } sort($tags_array); for ($final = 1; $final < count($tags_array); $final++) { $current = $tags_array[$final]; $rz = safe_rows('*', $table, $condition . " AND tags REGEXP '[[:<:]]" . $current . "[[:>:]]'"); $total = count($rz); if (isset($cloud)) { } else { $cloud = NULL; } $cloud .= "\t\t\t\t\t\t\t\t\t<a href=\"#\" rel=\"tag\" onclick=\"return false;\" title=\"Add tag " . $current . "\">" . $current . "</a>\n"; } $cloud = substr($cloud, 0, strlen($cloud) - 1) . ""; if ($rz) { echo "\t\t\t\t\t\t\t\t<div class=\"form_tags_suggestions\" id=\"form_tags_list\">"; echo "<span class=\"form_tags_suggestions_text\">" . $lang['form_help_current_tags'] . "</span>\n {$cloud}\n"; echo "\t\t\t\t\t\t\t\t</div>\n"; } } }
function show_shorter_posts($archive) { the_post(); echo '<div class="post-excerpt-alt">'; if (has_post_thumbnail()) { ?> <a href="<?php the_permalink(); ?> " title="<?php the_title_attribute(); ?> " > <?php the_post_thumbnail(''); ?> </a> <?php } ?> <div class="format_text entry-content"> <h4 class="entry-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h4> <p> <?php if ("search" === $archive) { the_excerpt(); } else { the_advanced_excerpt('length=40&use_words=1&no_custom=1&ellipsis=&finish_sentence=1'); } ?> </p> <?php $tag_string = get_the_tag_list('', ',', ''); $tags = explode(',', $tag_string); ?> <p class="tags"><span>Tags</span> <?php foreach ($tags as $key => $tag) { if ($key != 0) { echo " · "; } $tagless_tag = strtolower(strip_tags($tag)); if (in_array($tagless_tag, all_tags())) { echo "<strong>" . $tag . "</strong>"; } else { echo $tag; } } ?> </p> </div> </div> <?php }