Beispiel #1
0
function album_content($category_name)
{
    $page_data = "";
    $photos_directory = sculpt_system("content_path") . 'albums/' . $category_name;
    if ($category_name) {
        if (file_exists($photos_directory)) {
            $page_data .= '<h2>' . ucfirst($category_name) . '</h2>';
            if (file_exists($photos_directory . '/index.md')) {
                echo $page_data;
                sculpt_parse_markdown_file($photos_directory . '/index.md');
                $page_data = "";
            }
            $page_data .= '<div id="photos">';
            $photos = glob($photos_directory . '/*.{png,PNG,jpg,JPG,jpeg,JPEG,gif,GIF}', GLOB_BRACE);
            foreach ($photos as $photo) {
                $photo_info = pathinfo($photo);
                $photo_name = $photo_info['filename'];
                $page_data .= album_image_thumb($photo, $photo_name);
            }
            $page_data .= '</div>';
            echo $page_data;
        }
    } else {
    }
}
Beispiel #2
0
function rand_image()
{
    $directory = sculpt_system("content_path") . '/images/rotating/';
    if (file_exists($directory)) {
        $image_list = array_diff(scandir($directory), array('..', '.'));
        // find out if count includes empty items
        if (count($image_list) > 2) {
            $selected_picture = rand(2, count($image_list) - 1);
            echo '<img src="' . $directory . $image_list[$selected_picture] . '" />';
        }
    }
}
<?php

$blog_page_title = "Blog";
$blog_directory = sculpt_system("content_path") . 'blog';
$show_dates = true;
$date_format = 'l jS \\of F Y h:i:s A';
Beispiel #4
0
function text_engine_location($engine_name)
{
    global $registered_processors;
    if (isset($registered_processors[$engine_name])) {
        return sculpt_system("plugin_path") . $registered_processors[$engine_name];
    } else {
        return "";
    }
}