Welcome Guest, Not a member yet? Register   Sign In
How to add some video gallery to your website,(made simple)
#2

[eluser]ebot[/eluser]
Here are the views both the one displaying the video and the on watching video playing:
Code:
<div class="videos">
&lt;?php if($videos->num_rows() == 0){
echo 'No video was found, please use \'Create a new video\' link above to add a new video';
}?&gt;

&lt;?php
    foreach($videos->result() as $postblogs){
       echo "<h2><a href='#'>".$postblogs->title."</a></h2>";?&gt;
        <i class="postinfo"><img src="&lt;?=base_url();?&gt;images/ico_auth.jpg" alt="Author" /> : &nbsp;&lt;?=$postblogs->author?&gt;</i>
        Date Posted : &nbsp;&lt;?=$postblogs->date?&gt;</i><br />
        <img >thumbnail;?&gt;" title="&lt;?=$postblogs->title;?&gt;"><br>
        <b class="post_end"><img src="&lt;?=base_url()?&gt;images/ico_link.jpg" alt="permalink" />
        <a >video_id?&gt;" title="&lt;?=$postblogs->title;?&gt;">Play this video</a>&nbsp;&nbsp;
        <img src="&lt;?=base_url()?&gt;images/ico_com.jpg" alt="Comment" width="18" height="13" />Comments(&lt;?=$this->videoM->getVideoCommentCount($postblogs->video_id);?&gt;)
        
        </b>
        &lt;?
        echo "<br />";
        echo "<br />";
        echo "<br />";
        echo "<br />";
        echo "<br />";
        
    }
?&gt;
&lt;?php
    //$this->load->library('pagination');
    $config['base_url'] = base_url().'myvideo/videos';
    $config['total_rows'] = $totalNum;
    $config['per_page'] = $perpage;
    $config['full_tag_open'] = '<p>';
    $config['full_tag_close'] = '</p>';
    
    $this->pagination->initialize($config);
    echo $this->pagination->create_links();
?&gt;
</div>

the view for watching the video
Code:
<div class="post">
<h1 style="color:#333333;">You're watching a video! ^_^<sup>?</sup></h1>

<br/>
<br/>

<br/>
&lt;?php foreach ($video as $field): ?&gt;
<h3>Title: &nbsp;&lt;?=$field->title;?&gt;</h3><br/>
<i class="postinfo"><img src="&lt;?=base_url();?&gt;images/ico_auth.jpg" alt="Author" /><sub style="font-size:8px;">Author</sub> : &nbsp;&lt;?=$field->author;?&gt;</i>
Date Posted:&nbsp;&lt;?=$field->date;?&gt;<br/>
<img src="&lt;?=base_url()?&gt;images/ico_com.jpg" alt="Comment" width="18" height="13" />Comments(&lt;?=$Videocount;?&gt;)
<br/>
<br/>
  [removed][removed]
     <a  
    >vid;?&gt;"  
    style="display:block;width:425px;height:300px;"  
    id="player">
    </a>
    [removed]
    flowplayer("player", "&lt;?=base_url();?&gt;flowplayer-3.1.1.swf");
    [removed]      
<br/>
<br/>

&lt;?php endforeach;?&gt;

for the player (flowplayer-3.1.1) whi you can get from : <a href="flowplayer.org">flowplayer</a>

if any problem or enquiries, please do drop me mail at ebot.tabi[at]gmail[dot]com or PM me
thanks


Messages In This Thread
How to add some video gallery to your website,(made simple) - by El Forum - 07-06-2009, 05:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB