Advertisement
Guest User

Untitled

a guest
Feb 21st, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 24.25 KB | None | 0 0
  1. <?php $memorial_template = get_post_meta( get_the_ID(), 'memorial_template', true );
  2. $img = get_field('memorial_photo');
  3. if(!$img){
  4.  $img =$template_uri.'/images/placeholder.png';
  5. }
  6.  
  7.  
  8. $post_id = get_the_ID();
  9. $args = array(
  10.   'post_type' => 'tribute',
  11.   'meta_key' => 'memorial_id',
  12.   'meta_value' => (string)$post_id
  13. );
  14.  
  15. // get results
  16. $the_query = new WP_Query( $args );
  17.  
  18.  
  19. if ( isset( $_POST['html-upload'] ) && !empty( $_FILES ) ) {
  20.  
  21.     $type = $_FILES['async-upload']['type'];
  22.     if ( preg_match( '#^image#', $type ) || preg_match( '#^audio#', $type ) ) {
  23.       require_once(ABSPATH . 'wp-admin/includes/admin.php');
  24.       $id = media_handle_upload('async-upload', $post_id); //post id of Client Files page
  25.       unset($_FILES);
  26.       if ( is_wp_error($id) ) {
  27.           $errors['upload_error'] = $id;
  28.           $id = false;
  29.       }
  30.       add_post_meta(  $id , 'user_gallery', $post_id , true ) || update_post_meta(   $id , 'user_gallery', $post_id  );
  31.       if (@$errors) {
  32.           echo '<p>'.$errors['upload_error'].'</p>';
  33.       } else {
  34.          
  35.           wp_redirect( get_permalink($post_id) );
  36.           exit();
  37.       }
  38.     }else{
  39.       echo "<p>Only images are accepted.</p>";
  40.     }
  41. }
  42.  
  43. if ( isset( $_POST['embed-submit']) ) {
  44.  
  45. }
  46.  
  47. $galargs = array(
  48.   'post_parent' => $post_id,
  49.   'post_type' => 'attachment',
  50.   'post_mime_type' => 'image',  
  51.   'meta_key' => 'user_gallery',
  52.   'meta_value' => (string)$post_id,
  53.   'post_status' => 'inherit',
  54.   'orderby' => 'date',
  55.   'order' => 'ASC'
  56. );
  57.  
  58. // get results
  59. $the_galquery = new WP_Query( $galargs );
  60.  
  61.  
  62. $audioargs = array(
  63.   'post_parent' => $post_id,
  64.   'post_type' => 'attachment',
  65.   'post_mime_type' => 'audio',  
  66.   'meta_key' => 'user_gallery',
  67.   'meta_value' => (string)$post_id,
  68.   'post_status' => 'inherit',
  69.   'orderby' => 'date',
  70.   'order' => 'ASC'
  71. );
  72.  
  73. // get results
  74. $the_audioquery = new WP_Query( $audioargs );
  75.  
  76. $vidargs = array(
  77.   'post_type' => '_user_video',
  78.   'meta_key' => 'memorial_id',
  79.   'meta_value' => (string)$post_id,
  80.   'post_status' => 'publish'
  81. );
  82.  
  83. // get results
  84. $the_vidquery = new WP_Query( $vidargs );
  85.  
  86. ?>
  87. <!DOCTYPE html>
  88.  
  89. <html>
  90. <head>
  91.     <title><?php the_field('first_name'); ?> <?php the_field('last_name'); ?>
  92.     memorial</title>
  93.     <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
  94.     <link href="<?php echo $template_uri; ?>/css/template<?php echo (empty($memorial_template) ? '1' :$memorial_template)?>.css" rel="stylesheet"
  95.     type="text/css">
  96.       <link href="<?php echo $template_uri; ?>/css/jquery.fancybox.css" rel="stylesheet"
  97.     type="text/css">
  98.      <link href="<?php echo $template_uri; ?>/css/jplayer.blue.monday.css" rel="stylesheet"
  99.     type="text/css">
  100.     <link rel="stylesheet" href="<?php echo $template_uri; ?>/css/flexslider.css" type="text/css">
  101.     <script type="text/javascript">
  102. addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
  103. var ajaxurl = '/wp-admin/admin-ajax.php',
  104.     pagenow = 'cycloneslider',
  105.     typenow = 'cycloneslider',
  106.     adminpage = 'post-php',
  107.     thousandsSeparator = ',',
  108.     decimalPoint = '.',
  109.     isRtl = 0;
  110. </script>
  111.  
  112.  
  113. <script type='text/javascript' src='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/js/store-json2.min.js?ver=2.8.2'></script>
  114.  
  115.    <link rel='stylesheet' id='font-awesome-css'  href='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/libs/font-awesome/css/font-awesome.min.css?ver=2.8.2' type='text/css' media='all' />
  116. <link rel='stylesheet' id='cycloneslider-admin-styles-css'  href='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/css/admin.css?ver=2.8.2' type='text/css' media='all' />
  117. <link rel='stylesheet' id='sbe-admin-icon-css'  href='http://dev.rgbdesignuk.com/wp-content/plugins/subscribe-by-email/assets/css/icon-styles.css?ver=20130605' type='text/css' media='all' />
  118. <link rel='stylesheet' id='grunion-menu-alter-css'  href='http://dev.rgbdesignuk.com/wp-content/plugins/jetpack/modules/contact-form/css/menu-alter.css?ver=3.8.1' type='text/css' media='all' />
  119. <link rel='stylesheet' id='jetpack-icons-css'  href='http://dev.rgbdesignuk.com/wp-content/plugins/jetpack/_inc/jetpack-icons/jetpack-icons.css?ver=2.8' type='text/css' media='all' />
  120. <link rel='stylesheet' id='cyclone-template-style-dark-css'  href='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/templates/dark/style.css?ver=2.8.2' type='text/css' media='all' />
  121. <link rel='stylesheet' id='cyclone-template-style-default-css'  href='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/templates/default/style.css?ver=2.8.2' type='text/css' media='all' />
  122. <link rel='stylesheet' id='cyclone-template-style-standard-css'  href='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/templates/standard/style.css?ver=2.8.2' type='text/css' media='all' />
  123. <link rel='stylesheet' id='cyclone-template-style-thumbnails-css'  href='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/templates/thumbnails/style.css?ver=2.8.2' type='text/css' media='all' />
  124.  
  125. </head>
  126.  
  127. <body>
  128.     <div id="wrapper">
  129.         <div id="memorialheader">
  130.              <div id="headmenu">
  131.             <a href='../../'>Home</a>|<a href='../../create-memorial/'>Edit Memorial</a>|<?php echo do_shortcode('[wp-modal-login login_text="login" logout_text="logout"]') ?>
  132.   <!--audio--><div id="audioplayer">
  133.                 <div id="jquery_jplayer_1" class="jp-jplayer"></div>
  134.                 <div id="jp_container_1" class="jp-audio" style='float:right'>
  135.                     <div class="jp-type-single">
  136.                         <div class="jp-gui jp-interface">
  137.                             <ul class="jp-controls">
  138.                                
  139.                                 <!-- comment out any of the following <li>s to remove these buttons -->
  140.                                 <li><a href="javascript:;" class="jp-previous" tabindex="1">previous</a></li>
  141.                                 <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
  142.                                 <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
  143.                                 <li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
  144.                                 <li><a href="javascript:;" class="jp-next" tabindex="1">next</a></li>
  145.                                 <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
  146.                                 <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
  147.                                 <!--<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>-->
  148.                             </ul>
  149.                            
  150.                             <!-- you can comment out any of the following <div>s too -->
  151.                            
  152.                             <div class="jp-progress">
  153.                                 <div class="jp-seek-bar">
  154.                                     <div class="jp-play-bar"></div>
  155.                                 </div>
  156.                             </div>
  157.                                      
  158.                         </div>
  159.                         <div class="jp-title"></div>
  160.                         <div class="jp-no-solution">
  161.                             <span>Update Required</span>
  162.                             To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
  163.                         </div>
  164.                     </div>
  165.                 </div>
  166.               </div><!--audio-->
  167.             </div>
  168.              <div id="frame">
  169.               <div id="headimage">
  170.              <?php
  171.  
  172.               /*
  173.                *  Show selected image
  174.                *  Return value = URL
  175.                */
  176.  
  177.                ?>
  178.                 <img src='<?php echo $img ?>' alt="" width='150', height='150'/>
  179.             </div>
  180.             </div>
  181.            
  182.             <div id="temp_title">
  183.               <h1><p><?php the_field('first_name'); ?>
  184.               <?php the_field('last_name'); ?>
  185.               <br><br>
  186.               <?php $dateOfBirth  = DateTime::createFromFormat('Ymd', get_field('Date_of_Birth'));
  187.                 $dateOfPassing  = DateTime::createFromFormat('Ymd', get_field('date_of_passing'));?>
  188.               <?php echo $dateOfBirth->format('Y'); ?> to <?php echo $dateOfPassing->format('Y'); ?></p>
  189.              
  190.               </h1><!-- .header-->
  191.             </div>        
  192.         </div><!-- <div id="navigation">
  193.             <p>This is the Menu</p>
  194.         </div>-->
  195.  
  196.         <div id="contentwrapper">
  197.             <div id="contentliquid">
  198.                 <div id="content">
  199.                     <div class="container">
  200.                         <ul class="tabs">
  201.                             <li><a href="#tab1">About</a></li>
  202.  
  203.                             <li><a href="#tab2">Their Life</a></li>
  204.  
  205.                             <li><a href="#tab3">Gallery</a></li>
  206.  
  207.                             <li><a href="#tab4">Stories</a></li>
  208.                         </ul>
  209.  
  210.                         <div class="tab_container">
  211.                             <div class="tab_content" id="tab1">
  212.                                 <h3>About <?php the_field('first_name'); ?>
  213.                                 <?php the_field('last_name'); ?></h3>
  214.                                  
  215.                                   <?php $dateOfBirth  = DateTime::createFromFormat('Ymd', get_field('Date_of_Birth'));
  216.                                   $dateOfPassing  = DateTime::createFromFormat('Ymd', get_field('date_of_passing'));?>
  217.                                 <br/>
  218.                                 Born on <?php echo $dateOfBirth->format('d/m/Y'); ?>
  219.                                 <br/>
  220.                                 passed on <?php echo $dateOfPassing->format('d/m/Y'); ?>
  221.                                 <br/>
  222.                             <?php the_field('loved_one_details'); ?>
  223.  
  224.                                    <p><h2>Memorial Tributes</h2></p>
  225.        
  226.                              
  227.                          
  228.                             <?php if( $the_query->have_posts() ): ?>
  229.                      
  230.                               <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
  231.                                 <div style='background:#fff; margin-bottom:10px;'>
  232.                                     <div><?php the_time('F jS, Y') ?></div>
  233.                                     <div><?php the_content(); ?> <br/>from <?php the_author(); ?></div>
  234.                                    
  235.                                  </div>
  236.                               <?php endwhile; ?>
  237.                             <?php endif; ?>
  238.                              
  239.                             <?php wp_reset_query();  // Restore global post data stomped by the_post(). ?>
  240.                            
  241.                          
  242.                           <?php if ( is_user_logged_in() ): ?>
  243.                           <h3>Add tribute</h3>
  244.                              <form method='post'>
  245.                                     <textarea name='copy' rows="4" cols="50"></textarea>
  246.                                     <input type='hidden' name='post_id' value='<?php echo get_the_ID()?>'/>
  247.                                     <input type='submit' name='submit_tribute' value='submit'/>
  248.                                    </form>
  249.                            
  250.                           <?php  endif ?>
  251.                           </div>
  252.                           <div class="tab_content" id="tab2">
  253.                                 <h2>Their Life</h2>
  254.  
  255.                                 <p><?php the_field('about_thier_life'); ?></p>
  256.                             </div>
  257.  
  258.                             <div class="tab_content" id="tab3">
  259.                                 <h2>Gallery</h2>
  260.                            
  261.                             <?php if(get_field('gallery')):?>
  262.                                 <?php foreach (get_field('gallery') as $gal ):?>
  263.                                     <a class="fancybox" rel="gallery1" href="<?php echo $gal['url']?>" title="<?php echo $gal['caption'] ?>"><img src="<?php echo $gal['sizes']['thumbnail']?>" alt="" /></a>
  264.                                 <?php endforeach ?>
  265.                             <?php endif; ?>  
  266.                            
  267.                             <?php if( $the_galquery->have_posts() ): ?>
  268.                      
  269.                               <?php while ( $the_galquery->have_posts() ) : $the_galquery->the_post(); ?>
  270.                             <a class="fancybox" rel="gallery1" href="<?php echo wp_get_attachment_url( get_the_ID()); ?>" ><?php echo wp_get_attachment_image( get_the_ID(), 'thumbnail'); ?></a>
  271.                               <?php endwhile; ?>
  272.                             <?php endif; ?>
  273.  
  274.                             <?php if ( !(get_field('gallery')) && !($the_galquery->have_posts() ) ):?>
  275.                             <p>No Gallery images added</p>
  276.                           <?php endif ?>
  277.                          
  278. <h2 style='clear:both'>Videos</h2>
  279.                           <!-- Video loop -->
  280.                          
  281.                            <?php if( $the_vidquery->have_posts() ): ?>
  282.                               <?php while ( $the_vidquery->have_posts() ) : $the_vidquery->the_post(); ?>
  283.                              
  284.                                <a class="fancybox-media" rel="gallery1" href="http://<?php echo get_post_meta( get_the_ID(), 'video' , 'true'); ?>" ><img width='150' src="<?php echo get_post_meta( get_the_ID(), 'image_url' , 'true'); ?>"></a>
  285.                               <?php endwhile; ?>
  286.                             <?php endif ?>
  287.                             <!-- end if -->
  288.                              <?php if ( is_user_logged_in() ): ?>
  289.                                 <form  style='clear:both' id="file-form" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="POST">
  290.                                   <p>Add image or mp3</p>
  291.                                   <p id="async-upload-wrap"><label for="async-upload">upload</label>
  292.                                   <input type="file" id="async-upload" name="async-upload"> <input type="submit" value="Upload" name="html-upload"></p>
  293.  
  294.                                   <p><input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id ?>" />
  295.                                   <?php wp_nonce_field('client-file-upload'); ?>
  296.                                   <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" /></p>
  297.  
  298.                                   <p><input type="submit" value="Save all changes" name="save" style="display: none;"></p>
  299.                                 </form>
  300.                                
  301.                                 <form  style='clear:both' id="embed-form"  method="POST" enctype='multipart/form-data'>
  302.                                   <p>Add video to gallery</p>
  303.                                   <label for="embed">YouTube / vimeo url:</label>
  304.                                   <textarea id='embed' name="embed"></textarea>
  305.                                   <input name='submit_video' type="submit" value="submit" onclick="MakeLinkSafe()" >
  306.                                   <p>
  307.                                     <input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id ?>" />
  308.                                   <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" /></p>
  309.                                 </form>
  310.                               <?php endif?>
  311.                             </div>
  312.  
  313.                             <div class="tab_content" id="tab4">
  314.                                 <h2>Stories</h2>
  315.  
  316.                                 <p><?php comments_template( '', true ); ?></p>
  317.                             </div>
  318.                         </div><br clear="left">
  319.                     </div>
  320.                 </div>
  321.             </div>
  322.  
  323.             <div id="rightcolumn1">
  324.              <p>
  325.           <h4>   <?php  if ( is_active_sidebar( 'secondary' ) ) : ?>
  326.     <ul id="sidebar">
  327.         <?php dynamic_sidebar( 'secondary' ); ?>
  328.     </ul>
  329. <?php endif;  ?></h4><br/>
  330. <?php //echo do_shortcode("[rsSlider id=751]"); ?>
  331.             <!-- Invite your family and friends
  332.              to Visit This Memorial-->
  333.               <form method="post" action="/memorial/test-test/">
  334.              <input type="text" name="mail" value="" placeholder="E-mail">
  335.              <br/><br/>
  336.              <input type="submit" class="subemail" name="iemail" value="Invite"></form>
  337.              <?php
  338.              if (isset($_POST["iemail"]))
  339.   {
  340.       $mail = $_POST['mail'];
  341.       $from = "PUC"; // sender
  342.     $subject = "Invitation";
  343.     $message = "I want you to join this website";
  344.     // message lines should not exceed 70 characters (PHP rule), so wrap it
  345.     $message = wordwrap($message, 70);
  346.     // send mail
  347.     mail($mail,$subject,$message,"From: $from\n");
  348.  
  349.    
  350.   }
  351.              ?>
  352.              </p>
  353.               <?php echo recommend_a_friend_link( $permalink, $image_url, $text_link ); ?>
  354.             </div>
  355. <div id="rightcolumn2">
  356.  <p><!--Recive email and notification
  357.              when this memorial update-->
  358.             <?php  if ( is_active_sidebar( 'footer-3' ) ) : ?>
  359.     <ul id="sidebar">
  360.         <?php dynamic_sidebar( 'footer-3' ); ?>
  361.     </ul>
  362. <?php endif;  ?></p>
  363. </div>
  364. <div id="rightcolumn3">
  365. <div style="left: 11px;padding-left: 13px;">
  366.  <?php //echo do_shortcode('[rsSlider id="751"]'); ?>
  367.  <?php //if ( function_exists( "easingsliderlite" ) ) { easingsliderlite(); } ?>
  368.  <?php if( function_exists('cyclone_slider') ) cyclone_slider('sliders'); ?>
  369.  </div>
  370.  <!--slider starts-->
  371.              <!-- Start Photo Slider -->
  372. <?php /* if( $the_galquery->have_posts() ): ?>
  373.  
  374. <?php while ( $the_galquery->have_posts() ) : $the_galquery->the_post(); ?>
  375. <a class="fancybox" rel="gallery1" href="<?php echo wp_get_attachment_url( get_the_ID()); ?>" ><?php echo wp_get_attachment_image( get_the_ID(), 'thumbnail'); ?></a>
  376. <?php endwhile; ?>
  377. <?php endif; ?>
  378.  
  379. <div id="slider" class="flexslider">
  380.   <ul class="slides">
  381.     <?php foreach(get_field('gallery') as $gal): ?>
  382.       <li>
  383.         <img src="<?php echo $gal['url']; ?>" alt="<?php echo $gal['alt']; ?>" />
  384.       </li>
  385.     <?php endforeach; ?>
  386.   </ul>
  387. </div>
  388. <?php
  389.  */
  390. /*
  391. *  The following code creates the thumbnail navigation
  392. */
  393.  
  394. ?>
  395. <!--<div id="carousel" class="flexslider">
  396.   <ul class="slides">
  397.     <?php /*foreach(get_field('gallery') as $gal): ?>
  398.       <li>
  399.         <img src="<?php echo $gal['sizes']['thumbnail']; ?>" alt="<?php echo $gal['alt']; ?>" />
  400.       </li>
  401.     <?php endforeach;*/ ?>
  402.   </ul>
  403. </div>-->
  404. <div id="single-gallery1">
  405.   <?php the_post_thumbnail('full'); ?>
  406. </div>
  407.  
  408. <!-- End Photo Slider -->
  409.  
  410.              </div>
  411.  
  412.  </div>
  413.         <div id="footer">
  414.             <div id="footerlogo">
  415.             <img height="50" src=
  416.             "<?php echo $template_uri; ?>/images/logo%20(1).png"
  417.             width="160">
  418.             </div>
  419.             <div id="footmenu">
  420.             <a href='../../'>Home</a>|<a href='../../create-memorial/'>Edit Memorial</a><a href='../../account-4/'>Edit account</a>|<?php echo do_shortcode('[wp-modal-login login_text="login" logout_text="logout"]') ?>
  421.             </div>
  422.         </div>
  423.     </div>
  424.  
  425.     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
  426.     <script src="<?php echo $template_uri; ?>/js/jquery.fancybox.js"></script>
  427.      <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  428.     <script src="<?php echo $template_uri; ?>/js/helpers/jquery.fancybox-media.js"></script>
  429.       <script src="<?php echo $template_uri; ?>/js/jquery.jplayer.min.js"></script>
  430.       <script src="<?php echo $template_uri; ?>/js/jplayer.playlist.min.js"></script>
  431.       <script src="<?php echo $template_uri; ?>/js/jquery.flexslider-min.js"></script>
  432.    
  433. <script type="text/javascript">
  434.   var $f = jQuery.noConflict(true);
  435.     $f(window).load(function() {
  436.       // The slider being synced must be initialized first
  437.       $f('#carousel').flexslider({
  438.       animation: "slide",
  439.       controlNav: false,
  440.       animationLoop: false,
  441.       slideshow: false,
  442.       itemWidth: 75,
  443.       itemMargin: 5,
  444.       asNavFor: '#slider'
  445.       });
  446.        
  447.       $f('#slider').flexslider({
  448.       animation: "slide",
  449.       controlNav: false,
  450.       animationLoop: false,
  451.       slideshow: false,
  452.       sync: "#carousel"
  453.       });
  454.     });
  455. </script>
  456.  
  457.     <script type="text/javascript">
  458.  
  459.     $(document).ready(function() {
  460.  
  461.     $(".fancybox").fancybox({
  462.         openEffect  : 'none',
  463.         closeEffect : 'none'
  464.     });
  465.  
  466.    $('.fancybox-media').fancybox({
  467. openEffect : 'none',
  468. closeEffect : 'none',
  469. 'type': 'swf',
  470. 'swf': {
  471. 'wmode': 'transparent',
  472. 'allowfullscreen': 'true'
  473. }
  474. });
  475.     //Default Action
  476.     $(".tab_content").hide(); //Hide all content
  477.     $("ul.tabs li:first").addClass("active").show(); //Activate first tab
  478.     $(".tab_content:first").show(); //Show first tab content
  479.      
  480.     //On Click Event
  481.     $("ul.tabs li").click(function() {
  482.         $("ul.tabs li").removeClass("active"); //Remove any "active" class
  483.         $(this).addClass("active"); //Add "active" class to selected tab
  484.         $(".tab_content").hide(); //Hide all tab content
  485.         var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
  486.         $(activeTab).fadeIn(); //Fade in the active content
  487.         return false;
  488.     });
  489.  
  490.  
  491.     });
  492.  
  493.     function trim(str, chars) {  
  494.     return ltrim(rtrim(str, chars), chars);  
  495. }  
  496.  
  497. function ltrim(str, chars) {  
  498.     chars = chars || "\\s";  
  499.     return str.replace(new RegExp("^[" + chars + "]+", "g"), "");  
  500. }  
  501.  
  502. function rtrim(str, chars) {  
  503.     chars = chars || "\\s";  
  504.     return str.replace(new RegExp("[" + chars + "]+$", "g"), "");  
  505. }  
  506.  
  507. function MakeLinkSafe(){  
  508.     var e = document.getElementById('embed')  
  509.     str = trim(e.value);  
  510.     if(str.substr(0, 7) == 'http://'){  
  511.         e.value = str.substr(7);  
  512.     }  
  513.     return true;  
  514. }  
  515.     </script>
  516.  
  517.    
  518.     <script>
  519. playlist =  new jPlayerPlaylist({
  520.     jPlayer: "#jquery_jplayer_1",
  521.     cssSelectorAncestor: "#jp_container_1"
  522.     },
  523.     {
  524.     swfPath: "../js",
  525.     supplied: "webmv, ogv, m4v",
  526.     smoothPlayBar: true,
  527.     keyEnabled: true
  528.     });
  529.  
  530.    
  531.  
  532.  <?php if( $the_audioquery->have_posts() ): ?>
  533.     <?php while ( $the_audioquery->have_posts() ) : $the_audioquery->the_post(); ?>
  534.    
  535.       playlist.add({
  536.        title:"<?php the_title()?>",
  537.       mp3:" <?php echo wp_get_attachment_url( $post->ID ); ?>"
  538.   });
  539.  
  540.    
  541.     <?php endwhile; ?>
  542.   <?php endif ?>
  543.     $("#jquery_jplayer_1").jPlayer("play");
  544.     </script>
  545.     <script type='text/javascript' src='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/libs/cycle2/jquery.cycle2.min.js?ver=2.8.2'></script>
  546. <script type='text/javascript' src='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/libs/cycle2/jquery.cycle2.carousel.min.js?ver=2.8.2'></script>
  547. <script type='text/javascript' src='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/libs/cycle2/jquery.cycle2.swipe.min.js?ver=2.8.2'></script>
  548. <script type='text/javascript' src='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/libs/cycle2/jquery.cycle2.tile.min.js?ver=2.8.2'></script>
  549. <script type='text/javascript' src='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/libs/cycle2/jquery.cycle2.video.min.js?ver=2.8.2'></script>
  550. <script type='text/javascript' src='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/templates/dark/script.js?ver=2.8.2'></script>
  551. <script type='text/javascript' src='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/templates/thumbnails/script.js?ver=2.8.2'></script>
  552. <script type='text/javascript' src='http://dev.rgbdesignuk.com/wp-content/plugins/cyclone-slider-2/js/client.js?ver=2.8.2'></script>
  553. </body>
  554. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement