* the Main Template File

* the Main Template File

<p><?php /** * The main template file. * * @package WordPress * @subpackage Kin */</p><p>/** * Get all photos **/</p><p>$page_bg_gallery_id = get_option('pp_home_cat'); $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $page_bg_gallery_id, 'order' => 'ASC', 'orderby' => 'menu_order', ); $bg_photo_arr = get_posts( $args ); get_header(); ?></p><p><?php if(!empty($bg_photo_arr)) { ?></p><p><!-- Begin content --> <div id="content_wrapper"></p><p><?php $pp_gallery_height = 600; $image_index = -1; $image_array = array("http://www.mysite.com/page1.php", "http://www.mysite.com/page2.php", "http://www.mysite.com/page3.php", "http://www.mysite.com/page4.php");</p><p>?></p><p><div class="inner" style="height:<?php echo $pp_gallery_height; ?>px"></p><p><input type="hidden" id="gallery_width" name="gallery_width" value="900"/> <?php foreach($bg_photo_arr as $key => $photo) { $image_url = $photo->guid; $image_url = wp_get_attachment_image_src( $photo->ID, 'gallery' ); $full_image_url = wp_get_attachment_image_src( $photo->ID, 'full' ); If (strpos($full_image_url[0],”1-397x600.png”) !== false) { $image_index = 1; } If (strpos($full_image_url[0],”2-397x600.png”) !== false) { $image_index = 2; } If (strpos($full_image_url[0],”3-397x600.png”) !== false) { $image_index = 3; } If (strpos($full_image_url[0],”4-397x600.png”) !== false) { $image_index = 4; } ?></p><p><div class="card" style="width:<?php echo intval($image_url[1]); ? >px;height:<?php echo intval($image_url[2]); ?>px;"> <a href="<?php echo $image_array[$image_index]; ?>" rel="slide"> " style="width:<?php echo intval($image_url[1]); ?>px;height:<?php echo intval($image_url[2]); ?>px;" alt=""/> </a></p><p><?php if(!empty($photo->post_title) OR !empty($photo->post_content)) { ?></p><p><div class="title"></p><p><?php $pp_gallery_title = get_option('pp_gallery_title');</p><p> if(!empty($pp_gallery_title) && !empty($photo- >post_title)) { ?> <h2><?php echo $photo->post_title?></h2> <?php } ?> </div></p><p><?php } ?></p><p></div></p><p><?php } ?></p><p></div></p><p><div id="move_prev"></div> <div id="move_next"></div></p><p></div> <!-- End content --></p><p><br class="clear"/><br/></p><p><div id="content_slider_wrapper"><div id="content_slider"></div></div></p><p><?php } ?></p><p><?php $pp_blog_display_social = get_option('pp_blog_display_social');</p><p> if(!empty($pp_blog_display_social)): ?> <div class="post_social"> <!-- Place this tag where you want the +1 button to render --> <g:plusone size="medium" href="<?php echo $page->guid; ?>"></g:plusone></p><p><!-- Place this render call where appropriate --> <script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script></p><p><iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode($page->guid); ? >&amp;send=false&amp;layout=button_count&amp;width=200&amp;show_faces=false&amp;action=like&amp;c olorscheme=light&amp;font&amp;height=21&amp;appId=268239076529520" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true" class="facebook_button"></iframe></p><p><a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="<? php the_title(); ?>" data-url="<?php echo $page->guid; ?>">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script> </div> <br class="clear"/> <?php endif; ?></p><p><?php $pp_homepage_music_m4a = get_option('pp_homepage_music_m4a'); $pp_homepage_music_ogg = get_option('pp_homepage_music_ogg'); $pp_homepage_music_mp3 = get_option('pp_homepage_music_mp3');</p><p> if(!empty($pp_homepage_music_m4a) && !empty($pp_homepage_music_mp3) && ! empty($pp_homepage_music_ogg)) { ?> <!-- Audio Player --> <div id="jquery_jplayer_1"></div> <div id="jp_interface_1"> <a href="#" class="jp-play">Play</a> <a href="#" class="jp-pause">Pause</a> </div> <?php } ?></p><p><script> $j(document).ready(function() { <?php if(!empty($pp_homepage_music_m4a) && !empty($pp_homepage_music_mp3) && ! empty($pp_homepage_music_ogg)) { $pp_homepage_music_play_script = ''; $pp_homepage_music_play = get_option('pp_homepage_music_play');</p><p> if(!empty($pp_homepage_music_play)) { $pp_homepage_music_play_script = '.jPlayer("play")'; } ?> $j("#jquery_jplayer_1").jPlayer({ ready: function () { $j(this).jPlayer("setMedia", { mp3: "<?php echo THEMEUPLOADURL.$pp_homepage_music_mp3; ?>", m4a: "<?php echo THEMEUPLOADURL.$pp_homepage_music_m4a; ?>", oga: "<?php echo THEMEUPLOADURL.$pp_homepage_music_ogg; ?>", end: "" })<?php echo $pp_homepage_music_play_script; ?> }, //solution: "flash, html", // Flash with an HTML5 fallback. swfPath: "<?php echo get_stylesheet_directory_uri(); ?>/js/", supplied: "mp3,m4a,oga" }); <?php } ?> }); </script></p><p><?php get_footer(); ?></p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us