<?php $prefix = 'indonez_'; $video = get_post_meta($post->ID, $prefix . 'video_embed', true); ?> <?php if ($video) { ?> <div class="blog-media"> <?php if (is_youtube($video)) { echo '<div class="video-container-post"><a href="' . $video . '" rel="youtube"></a></div>'; } elseif (is_vimeo($video)) { echo '<div class="video-container-post"><a href="' . $video . '" rel="vimeo"></a></div>'; } elseif (is_quicktime($video)) { echo '<div class="video-container-post"><a href="' . $video . '" rel="quicktime"></a></div>'; } elseif (is_flash($video)) { echo '<div class="video-container-post"><a href="' . $video . '" rel="flash"></a></div>'; } ?> </div> <?php } ?> <?php } ?> <h3 class="posttitle"><a href="<?php
// Remove HTML tags as we can't trust what we receive //foreach($CLEAN['data'] as $key => $value) $CLEAN['data'][$key] = html_entity_decode(strtr($value, $HTML_SUBST)); // get the dimensions $result = cpg_db_query("SELECT pwidth, pheight FROM {$CONFIG['TABLE_PICTURES']} WHERE pid = '{$CLEAN['data']['pid']}'"); if (!mysql_num_rows($result)) { cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__); } $row = mysql_fetch_assoc($result); mysql_free_result($result); if ($row['pwidth'] != 0 && $row['pheight'] != 0) { $image_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['picture_width'], 'normal'); $dimensions = $image_size['geom']; } else { $dimensions = ''; } if (is_flash($CLEAN['data']['p'])) { $pic_markup = <<<EOT <object id="SWFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" type="application/x-shockwave-flash" {$dimensions}> <param name="autostart" value="true" /> <param name="src" value="{$CLEAN['data']['p']}" /> </object> EOT; } else { $pic_markup = '<img src="' . $CLEAN['data']['p'] . '" ' . $dimensions . ' alt="" vspace="8" border="0" class="image" />'; } // Load template parameters $params = array('{LANG_DIR}' => $lang_text_dir, '{TITLE}' => sprintf($lang_ecard_php['ecard_title'], $CLEAN['data']['sn']), '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'], '{VIEW_ECARD_TGT}' => '', '{VIEW_ECARD_LNK}' => '', '{PIC_URL}' => $CLEAN['data']['p'], '{URL_PREFIX}' => '', '{GREETINGS}' => $CLEAN['data']['g'], '{MESSAGE}' => bb_decode(process_smilies($CLEAN['data']['m'])), '{SENDER_EMAIL}' => $CLEAN['data']['se'], '{SENDER_NAME}' => $CLEAN['data']['sn'], '{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'], '{VIEW_MORE_LNK}' => $lang_ecard_php['view_more_pics'], '{PID}' => $CLEAN['data']['pid'], '{PIC_TITLE}' => $CLEAN['data']['pt'], '{PIC_CAPTION}' => bb_decode($CLEAN['data']['pc']), '{PIC_MARKUP}' => $pic_markup); // Parse template echo template_eval($template_ecard, $params); } else { cpg_die(CRITICAL_ERROR, $lang_db_ecard_php['invalid_data'], __FILE__, __LINE__);
} if (is_array($CLEAN['data'])) { // Remove HTML tags as we can't trust what we receive //foreach($CLEAN['data'] as $key => $value) $CLEAN['data'][$key] = html_entity_decode(strtr($value, $HTML_SUBST)); // get the dimensions $result = cpg_db_query("SELECT pwidth, pheight from {$CONFIG['TABLE_PICTURES']} WHERE pid='{$CLEAN['data']['pid']}'"); if (!mysql_num_rows($result)) { cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__); } $row = mysql_fetch_array($result); if ($row['pwidth'] != 0 && $row['pheight'] != 0) { $dimensions = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"'; } else { $dimensions = ''; } if (is_flash($CLEAN['data']['p']) == TRUE) { $pic_markup = <<<EOT <object id="SWFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" type="application/x-shockwave-flash" {$dimensions}> <param name="autostart" value="true" /> <param name="src" value="{$CLEAN['data']['p']}" /> <embed {$dimensions} src="{$CLEAN['data']['p']}" autostart="true" type="application/x-shockwave-flash" ></embed> </object> EOT; } else { $pic_markup = '<img src="' . $CLEAN['data']['p'] . '" ' . $dimensions . ' alt="" vspace="8" border="0" class="image" />'; } // Load template parameters $params = array('{LANG_DIR}' => $lang_text_dir, '{TITLE}' => sprintf($lang_ecard_php['ecard_title'], $CLEAN['data']['sn']), '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'], '{VIEW_ECARD_TGT}' => '', '{VIEW_ECARD_LNK}' => '', '{PIC_URL}' => $CLEAN['data']['p'], '{URL_PREFIX}' => '', '{GREETINGS}' => $CLEAN['data']['g'], '{MESSAGE}' => bb_decode(process_smilies($CLEAN['data']['m'])), '{SENDER_EMAIL}' => $CLEAN['data']['se'], '{SENDER_NAME}' => $CLEAN['data']['sn'], '{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'], '{VIEW_MORE_LNK}' => $lang_ecard_php['view_more_pics'], '{PID}' => $CLEAN['data']['pid'], '{PIC_TITLE}' => $CLEAN['data']['pt'], '{PIC_CAPTION}' => $CLEAN['data']['pc'], '{PIC_MARKUP}' => $pic_markup); // Parse template echo template_eval($template_ecard, $params); } else {
$row['pwidth'] = $CONFIG['thumb_width']; $row['pheight'] = floor($CONFIG['thumb_width'] * 2 / 3); } $smilies = generate_smilies(); echo <<<EOT <form method="post" name="post" id="cpgform" action="{$CPG_PHP_SELF}?album={$album}&pid={$pid}"> EOT; starttable("100%", $icon_array['ecard'] . $lang_ecard_php['title'], 3); echo <<<EOT <tr> <td class="tableh2" colspan="2"> <strong>{$lang_ecard_php['from']}</strong> </td> <td rowspan="6" align="center" valign="top" class="tableb"> EOT; if (is_flash($row['filename'])) { $n_picname = get_pic_url($row, 'fullsize'); echo <<<EOT <object id="SWFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" type="application/x-shockwave-flash" width="{$thumb_size['width']}" height="{$thumb_size['height']}"> <param name="autostart" value="true" /> <param name="src" value="{$n_picname}" /> </object> EOT; } else { echo <<<EOT <a href="displayimage.php?pid={$pid}"> <img src="{$thumb_pic_url}" width="{$thumb_size['width']}" height="{$thumb_size['height']}" alt="" vspace="8" border="0" class="image" /> </a> EOT; } echo <<<EOT
if ($row['pwidth'] == 0 || $row['pheight'] == 0) { $row['pwidth'] = $CONFIG['thumb_width']; $row['pheight'] = floor($CONFIG['thumb_width'] * 2 / 3); } $thumb_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['thumb_width']); echo <<<EOT <form method="post" name="post" id="cpgform" action="{$CPG_PHP_SELF}?album={$album}&pid={$pid}"> EOT; starttable("100%", $lang_ecard_php['title'], 3); echo <<<EOT <tr> <td class="tableh2" colspan="2"><b>{$lang_ecard_php['from']}</b></td> <td rowspan="6" align="center" valign="top" class="tableb"> <a href="displayimage.php?pid={$pid}"> EOT; if (is_flash($row['filename']) == TRUE) { $n_picname = get_pic_url($row, 'fullsize'); echo <<<EOT <object id="SWFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" type="application/x-shockwave-flash" width="{$thumb_size['width']}" height="{$thumb_size['height']}"> <param name="autostart" value="true" /> <param name="src" value="{$n_picname}" /> <embed width="{$thumb_size['width']}" height="{$thumb_size['height']}" src="{$n_picname}" autostart="true" type="application/x-shockwave-flash" ></embed> </object> EOT; } else { echo '<img src="' . $thumb_pic_url . '" width="' . $thumb_size['width'] . '" height="' . $thumb_size['height'] . '" alt="" vspace="8" border="0" class="image" />'; } echo <<<EOT </a> </td> </tr>
?> <div class="portfolio_movie_container"><a href="<?php echo $pf_link; ?> " rel="vimeo"></a></div> <?php } else { if (is_quicktime($pf_link)) { ?> <div class="portfolio_movie_container"><a href="<?php echo $pf_link; ?> " rel="quicktime"></a></div> <?php } else { if (is_flash($pf_link)) { ?> <div class="portfolio_movie_container"><a href="<?php echo $pf_link; ?> " rel="flash"></a></div> <?php } else { ?> <?php if (function_exists('has_post_thumbnail') && has_post_thumbnail()) { ?> <img src="<?php echo get_template_directory_uri(); ?> /timthumb.php?src=<?php
function func_blog_post_col_indonez($showpost = "", $cat_id = "") { global $post; $out = ''; $out .= '<div class="masorny_col">'; query_posts('cat=' . $cat_id . '&posts_per_page=' . $showpost . '&orderby=date&order=DESC'); while (have_posts()) { the_post(); $out .= '<div class="four column mobile-two">'; $out .= '<div class="teaser">'; $out .= '<div class="teaser-preview-box">'; if (has_post_format('gallery')) { $args = array('order' => 'ASC', 'post_type' => 'attachment', 'post_parent' => $post->ID, 'post_mime_type' => 'image', 'post_status' => null, 'orderby' => 'menu_order', 'numberposts' => -1); $attachments = get_posts($args); $out .= '<div class="banner_blog_container">'; $out .= '<div class="banner-blog">'; $out .= '<ul>'; foreach ($attachments as $attachment) { $image_attributes = wp_get_attachment_image_src($attachment->ID, 'custom-medium-image'); $out .= '<li data-transition="slidehorizontal"><img src="' . $image_attributes[0] . '"></li>'; } $out .= '</ul>'; $out .= '<div class="tp-bannertimer tp-top"></div>'; $out .= '</div>'; $out .= '</div>'; } elseif (has_post_format('audio')) { $prefix = 'indonez_'; $audio = get_post_meta($post->ID, $prefix . 'audio_embed', true); if ($audio) { $out .= '<audio preload="auto" controls>'; $out .= '<source src="' . $audio . '">'; $out .= '</audio>'; } } elseif (has_post_format('video')) { $prefix = 'indonez_'; $video = get_post_meta($post->ID, $prefix . 'video_embed', true); if ($video) { if (is_youtube($video)) { $out .= '<div class="video-container-post"><a href="' . $video . '" rel="youtube"></a></div>'; } elseif (is_vimeo($video)) { $out .= '<div class="video-container-post"><a href="' . $video . '" rel="vimeo"></a></div>'; } elseif (is_quicktime($video)) { $out .= '<div class="video-container-post"><a href="' . $video . '" rel="quicktime"></a></div>'; } elseif (is_flash($video)) { $out .= '<div class="video-container-post"><a href="' . $video . '" rel="flash"></a></div>'; } else { } } } elseif (has_post_format('quote')) { $prefix = 'indonez_'; $quote_text = get_post_meta($post->ID, $prefix . 'quote_text', true); $quote_info_text = get_post_meta($post->ID, $prefix . 'quote_info_text', true); $out .= '<div class="note">'; $out .= '<blockquote><p>' . stripslashes($quote_text) . '</p><cite>' . $quote_info_text . '</cite></blockquote>'; $out .= '<div class="clear"></div>'; $out .= '</div>'; } elseif (has_post_format('link')) { $prefix = 'indonez_'; $link = get_post_meta($post->ID, $prefix . 'link_embed', true); if ($link) { $out .= '<div class="note">'; $out .= '<p class="lead">'; $out .= '<a href="' . $link . '" title="' . $link . '" target="_blank">' . $link . '</a>'; $out .= '</p>'; $out .= '</div>'; } } else { if (has_post_thumbnail()) { $out .= get_the_post_thumbnail('custom-medium-image', array('class' => 'max-image')); } } $out .= '</div>'; //end teaser-preview-box $out .= '<h6><a href="' . get_permalink() . '">' . get_the_title() . '</a></h6>'; $out .= '<h6 class="subheader">' . get_the_time('M d, Y', $post->ID) . '</h6>'; if (!has_post_format('quote')) { $excerpt = get_the_excerpt(); $out .= '<p>' . indonez_excerpt_limit_char($excerpt, 50, '...') . '</p>'; } $out .= '<a href="' . get_permalink() . '" class="more-link"><span class="button small rdm">' . __('Read More', 'indonez') . '</span></a>'; $out .= '</div>'; $out .= '</div>'; } wp_reset_query(); $out .= '</div>'; return $out; }