130 lines
4.0 KiB
PHP
130 lines
4.0 KiB
PHP
|
|
<?php
|
|
//echo "jhfdsfh";
|
|
|
|
$args = array(
|
|
'numberposts' => 300,
|
|
'orderby' => 'date',
|
|
'order' => 'DESC',
|
|
'post_type' => 'marker',
|
|
'post_status' => 'publish',
|
|
'tag_id' => 809
|
|
);
|
|
|
|
|
|
$all_posts=new WP_Query($args);
|
|
//var_dump($all_posts->posts);
|
|
//krumo($all_posts);
|
|
|
|
$contador=1;
|
|
$titulos = array();
|
|
$paneles = array();
|
|
|
|
foreach( $all_posts->posts as $post ) : setup_postdata($post); ?>
|
|
<?php
|
|
$tit = array();
|
|
$tit['titulo'] = $post->post_title;
|
|
$tit['id'] = $post->ID;
|
|
$data = array();
|
|
$files = get_post_meta($post->ID, 'soundmap_attachments_id', FALSE);
|
|
$data['m_files'] = array();
|
|
foreach ($files as $key => $value){
|
|
$file = array();
|
|
$att = get_post($value);
|
|
$file['id'] = $value;
|
|
$file['fileURI'] = wp_get_attachment_url($value);
|
|
$file['filePath'] = get_attached_file($value);
|
|
$file['info'] = soundmap_get_id3info($file['filePath']);
|
|
$file['name'] = $att->post_name;
|
|
$data['m_files'][] = $file;
|
|
}
|
|
|
|
$tit['archivos'] = $data['m_files'];
|
|
// $tit['rendered'] = '<li><a href="#" rel="' . $post->ID . '">' . $post->post_title . '</a></li>';
|
|
$titulos[]=$tit;
|
|
|
|
$pan = array();
|
|
$pan['id'] = $post->ID;
|
|
ob_start();
|
|
?>
|
|
<div class="box" id="<?php print $post->ID ?>">
|
|
<h2 class="post-title"><?php the_title(); ?></h2>
|
|
<?php echo get_the_post_thumbnail($page->ID,'medium'); ?>
|
|
<?php the_content() ?>
|
|
<?php
|
|
$post_meta=get_post_meta($post->ID, "enclosure",true);
|
|
$enclosure_info=explode("mp3",$post_meta);
|
|
$file_name=$enclosure_info[0] . "mp3";
|
|
?>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
$pan['rendered'] = ob_get_contents();
|
|
ob_end_clean();
|
|
$paneles[] = $pan;
|
|
$contador=$contador + 1;
|
|
|
|
endforeach;?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
//players_reference.push("jquery_jplayer_<?php echo $contador; ?>");
|
|
files_reference = '<?php echo json_encode($titulos);?>';
|
|
|
|
</script>
|
|
|
|
|
|
<div id="jp_container_1" class="jp-audio">
|
|
<div class="jp-type-playlist">
|
|
<div id="jquery_jplayer_1" class="jp-jplayer"></div>
|
|
<div class="jp-gui jp-interface">
|
|
<ul class="jp-controls">
|
|
<li><a href="javascript:;" class="jp-previous" tabindex="1">previous</a></li>
|
|
<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
|
|
<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
|
|
<li><a href="javascript:;" class="jp-next" tabindex="1">next</a></li>
|
|
<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
|
|
<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
|
|
<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
|
|
<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
|
|
</ul>
|
|
<div class="jp-progress">
|
|
<div class="jp-seek-bar">
|
|
<div class="jp-play-bar"></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="jp-volume-bar">
|
|
<div class="jp-volume-bar-value"></div>
|
|
</div>
|
|
<div class="jp-current-time"></div>
|
|
<div class="jp-duration"></div>
|
|
<ul class="jp-toggles">
|
|
<li><a href="javascript:;" class="jp-shuffle" tabindex="1" title="shuffle">shuffle</a></li>
|
|
<li><a href="javascript:;" class="jp-shuffle-off" tabindex="1" title="shuffle off">shuffle off</a></li>
|
|
<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
|
|
<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="jp-playlist">
|
|
<ul>
|
|
<li></li>
|
|
</ul>
|
|
</div>
|
|
<div class="jp-no-solution">
|
|
<span>Update Required</span>
|
|
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>.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
// var_dump($titulos);
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
|
|