• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Add another type of Homeblock

Started by wolftbpg,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wolftbpgTopic starter

Hello Alexander , could help me with the code of the homepage , which sent her message?
I would like to stay in the picture I sent you .
it appears the most watched video.


  •  

wolftbpgTopic starter

  •  

PHPVibe A.

If you think the fact that the youtube importer is failing, and needs to be upgraded asap to API v3 is less important than this, here you go:

Place under

<div id="home-content" class="main-holder span12">

this, and modify it as you please
<div id="uvholder">
<div class="box-body">
<?php $options = DB_PREFIX."videos.id,".DB_PREFIX."videos.title,".DB_PREFIX."videos.media,".DB_PREFIX."videos.user_id,".DB_PREFIX."videos.thumb,".DB_PREFIX."videos.views,".DB_PREFIX."videos.liked,".DB_PREFIX."videos.duration,".DB_PREFIX."videos.nsfw"; 
$tq= "select ".$options.", ".DB_PREFIX."users.name as owner FROM ".DB_PREFIX."videos LEFT JOIN ".DB_PREFIX."users ON ".DB_PREFIX."videos.user_id = ".DB_PREFIX."users.id WHERE ".DB_PREFIX."videos.views > 0 and pub > 0 ORDER BY ".DB_PREFIX."videos.views DESC ".this_offset(5);
$trending = $db->get_results($tq);
?>
<h3 class="loop-heading"><span><?php echo _lang('Trending'); ?></span></h3>
<div class="clearfix"></div>
<?php
if($trending) {
echo '<div class="block video-related profile-theone"><ul>'; 
$first = true;  
foreach ($trending as $video) {
			$title = _html(_cut($video->title, 70));
			$full_title = _html(str_replace("\"", "",$video->title));			
			$url = video_url($video->id , $video->title);
echo '
<li id="video-'.$video->id.'" class="item-post">
<div class="inner">
<div class="thumb">
		<a class="clip-link" data-id="'.$video->id.'" title="'.$full_title.'" href="'.$url.'">
			<span class="clip">
				<img src="'.thumb_fix($video->thumb, true, 410,300).'" alt="'.$full_title.'" /><span class="vertical-align"></span>
			</span>
          	<span class="overlay"></span>
		</a>
	
		';
if($video->duration > 0) { echo '   <span class="timer">'.video_time($video->duration).'</span>'; }
echo '</div>	
<div class="data">
	<span class="title"><a href="'.$url.'" title="'.$full_title.'">'._html($title).'</a></span>						
	<span class="usermeta">
		'._lang("by").' <a href="'.profile_url($video->user_id, $video->owner).'" title="'.$video->owner.'">'.$video->owner.'</a> <span class="pull-right">'.$video->views.' '._lang('views').'</span>
	</span>
</div>	
</div>	
	</li>
';
if($first) {
echo '</ul></div><div class="block video-related profile-trending"><ul>'; 
}
$first = false;
}
echo '</ul><div class="clearfix"></div></div>';
}

?>
</div>
<div class="clearfix"></div>

wolftbpgTopic starter

eu gostaria de criar um bloco na home como o da imagem que lhe enviei.
  •  

wolftbpgTopic starter

  •  

wolftbpgTopic starter

  •  

Similar topics (7)