Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function drfb_content_html( $newcontent ) {
- global $stored_container;
- if ( $stored_container['page-number'] && $stored_container['row-number'] ) {
- global $stored_page_1,$stored_page_2,$stored_page_3,$stored_page_4;
- if( $stored_container['page-number' =='page-1'] && (!isset($stored_page_1) || !$stored_page_1 ) ) return;
- if( $stored_container['page-number' =='page-2'] && (!isset($stored_page_2) || !$stored_page_2 ) ) return;
- if( $stored_container['page-number' =='page-3'] && (!isset($stored_page_3) || !$stored_page_3 ) ) return;
- if( $stored_container['page-number' =='page-4'] && (!isset($stored_page_4) || !$stored_page_4 ) ) return;
- $colwidth = explode(":", $stored_container['row-layout'], 4 );
- array_unshift($colwidth, 0);
- $styleclass = $stored_container['page-number'] .'-'. $stored_container['row-number'];
- //Build Layout
- $layout ='';
- $layout = $layout .' <div class="'.$styleclass.'">' ."\n";
- for ($counter=1; $counter < 4; $counter++) {
- if ( $colwidth[$counter] ) {
- $layout = $layout .' <div class="'.$styleclass .$counter .'">' ."\n";
- $layout = $layout .' <div class="'.$styleclass .$counter .'-inner">' ."\n";
- if ( $newcontent['column-video-'.$counter] ) {
- $style='style="text-align:'. $newcontent['video-align-'.$counter] .';"';
- if ( $newcontent['video-size-'.$counter] == 'large' ) {
- $width=480;
- $height=385;
- }else{
- $width=290;
- $height=220;
- }
- $layout = $layout .' <div class="youtube-video" '.$style.'>' ."\n";
- $layout = $layout .' <ul>' ."\n";
- $layout = $layout .' <li>' ."\n";
- $layout = $layout .' <object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$newcontent['column-video-'.$counter].'&hl=en&fs=1&rel=0&border=1"></param>' ."\n";
- $layout = $layout .' <param name="allowFullScreen" value="true"></param>' ."\n";
- $layout = $layout .' <param name="allowscriptaccess" value="always"></param>' ."\n";
- $layout = $layout .' <embed src="http://www.youtube.com/v/'.$newcontent['column-video-'.$counter].'&hl=en&fs=1&rel=0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'.$width.'" height="'.$height.'"></embed>' ."\n";
- $layout = $layout .' </object>' ."\n";
- $layout = $layout .' </li>' ."\n";
- $layout = $layout .' </ul>' ."\n";
- $layout = $layout .' </div>' ."\n";
- }
- $layout = $layout .' '.$newcontent['column-text-'.$counter] ."\n";
- $layout = $layout .' </div>' ."\n";
- $layout = $layout .' </div>' ."\n";
- }
- }
- $layout = $layout .' </div>' ."\n";
- $stored_page_1['row-1-html'] = $layout;
- update_option( 'drfb_page_1', $stored_page_1 );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment