Exemple #1
0
    {
    ?><div id="img-pinboard"><?
        $b_arr = process_event($item['body']);
        for($i = 0; $i < count($b_arr); $i++)
        {
            if($media[$i])
            {
            ?><div class="img-container"><? 
                $ii = $i;
                foreach($media as $m)
                { 
                    $url = m_url($m);
                    $media_urls[] = $url;
                    $media_captions[] = $m['caption'];
                    // fix relative urls
                    $relative_url = "media/" . m_pad($m['id']).".".$m['type'];  
                    $size = getimagesize($relative_url);
                    $wide_tall = (($size[0] >= $size[1]) ? wide : tall);
                    $media_dims[] = $wide_tall;

                    // random sizing

                    $padding = rand(0, 10);
                    $margin = rand(0, 20);
                    $width = rand(2, 5)*10;
                    $float = (rand(0, 1) == 0) ? 'left' : 'right';
                    $style = "width: " . $width . "%; float: " . $float . "; padding: " . $padding ."px; margin: " . $margin ."px;";
                    ?><div class="image" onclick="launch(<? echo $ii; ?>)" style="<? echo $style; ?>">
                    // move $wide_tall to js launch function, pass as json
                    // use modernart logic
                        <img src="<? echo $url; ?>" class="<? echo $wide_tall; ?>">
Exemple #2
0
"><?php 
    echo $ancestor["name1"];
    ?>
</a>
		</div><?php 
}
if ($rr->action != "update" && $uu->id) {
    // get existing image data
    $medias = $oo->media($uu->id);
    $num_medias = count($medias);
    // add associations to media arrays:
    // $medias[$i]["file"] is url of media file
    // $medias[$i]["display"] is url of display file (diff for pdfs)
    // $medias[$i]["type"] is type of media (jpg,
    for ($i = 0; $i < $num_medias; $i++) {
        $m_padded = "" . m_pad($medias[$i]['id']);
        $medias[$i]["file"] = $media_path . $m_padded . "." . $medias[$i]["type"];
        if ($medias[$i]["type"] == "pdf") {
            $medias[$i]["display"] = $admin_path . "media/pdf.png";
        } else {
            $medias[$i]["display"] = $medias[$i]["file"];
        }
    }
    // object contents
    ?>
<div id="form-container">
		<div class="self">
			<a href="<?php 
    echo $browse_url;
    ?>
"><?php 
Exemple #3
0
$r = $oo->get($uu->id);
$title = strtoupper($r['name1']);
$author = $r['deck'];
$body = $r['body'];
$gestalt_id = 77066;
// get media stuff
$fields = array("*");
$tables = array("media");
$where = array("object = '" . $r['id'] . "'", "active = '1'");
$order = array("type");
$limit = 3;
$media_all = $oo->get_all($fields, $tables, $where, $order, $limit);
$media_all = array_reverse($media_all);
$cover_img = m_url($media_all[1]);
$pdf = $media_all[0];
$source_name = m_pad($pdf['id']);
if ($pdf['caption']) {
    $display_name = $pdf['caption'];
} else {
    $display_name = $source_name;
}
$display_name = htmlspecialchars($display_name, ENT_QUOTES);
// video exception for issue 8
$video = false;
if (count($media_all) > 2) {
    $video = $media_all[2];
    $vid_caption = $video['caption'];
}
?>
<div class="mainContainer">
	<div class="detailContainer">