Example #1
0
                    $start = $posts_per_page * ($p - 1);
                    $mtitle = "{$page_display_name} (" . $lang['tag'] . ": {$x}, " . $lang['dynamic_page'] . " {$p})";
                    $rs = safe_rows_start('*', 'pixie_dynamic_posts', "page_id = '{$page_id}' and public = 'yes' and tags REGEXP '[[:<:]]" . $x . "[[:>:]]' order by posted desc limit {$start}, {$posts_per_page}");
                    show_all($rs);
                } else {
                    $x = squash_slug($x);
                    $mtitle = "{$page_display_name} (" . $lang['tag'] . ": {$x})";
                    $rs = safe_rows_start('*', 'pixie_dynamic_posts', "page_id = '{$page_id}' and public = 'yes' and tags REGEXP '[[:<:]]" . $x . "[[:>:]]' order by posted desc limit {$posts_per_page}");
                    show_all($rs);
                }
                break;
            case 'tags':
                if (isset($s)) {
                    $id = get_page_id($s);
                    echo "<h3>{$page_display_name} (" . $lang['tags'] . ")</h3>\n\t\t\t\t\t<div class=\"tag_section\">\n";
                    public_tag_cloud('pixie_dynamic_posts', "page_id = {$id} and public = 'yes'");
                    echo "\t\t\t\t\t</div>\n";
                }
                break;
            default:
                $mtitle = "{$page_display_name}";
                if (isset($s)) {
                    $id = get_page_id($s);
                    $rs = safe_rows_start('*', 'pixie_dynamic_posts', "page_id = '{$id}' and public = 'yes' order by posted desc limit {$posts_per_page}");
                    show_all($rs);
                }
                break;
        }
        break;
}
// ------------------------------------------------------------------
 * @author Scott Evans
 * @author Sam Collett
 * @author Tony White
 * @author Isa Worcs
 * @link http://www.getpixie.co.uk
 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3
 *
 */
if (isset($s)) {
    $id = get_page_id($s);
    $type = check_type($s);
    global $lang;
    global $timezone;
    if ($type == 'dynamic') {
        $table = 'pixie_dynamic_posts';
    } else {
        if ($type == 'module') {
            $table = "pixie_module_{$s}";
        }
    }
    echo "\t\t\t\t\t<div id=\"block_tagcloud\" class=\"block\">\n\t\t\t\t\t\t<div class=\"block_header\">\n\t\t\t\t\t\t\t<h4>" . $lang['tags'] . "</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"block_body\">\n";
    if ($type == 'dynamic') {
        public_tag_cloud($table, "page_id = {$id} and public = 'yes'");
    } else {
        $condition = "{$s}_id >= '0'";
        if (isset($table)) {
            public_tag_cloud($table, $condition);
        }
    }
    echo "\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"block_footer\"></div>\n\t\t\t\t\t</div>\n";
}