>>  Site Map >>  Forums >>  Blocks

Forum module - topics in forum:



Blocks - Having problems with a block? Code doesn't work, get help here.



Latest Videos Block help

i want to to look something like this: ( where white squares is would be about video thumbs.)



video_01.gif is the top bar of the picture above.
video_02.gif is the whole bottom half
but i keep messing up the code:
Quote: :
<?php
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// ------------------------------------------------------------------------- //

//----------------------------------------//
//Block by Dawg//
//Based on The Random video block by Q @ www.3c0x1.net //
//----------------------------------------//


//Side Block to show Latest Video//

if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
define('NO_HEADER', true);
global $prefix, $prefix, $db;
$limit = 1;
$videos ="<a href=modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."><img src=".$row['imgurl']." border=\"0\" width=80 height=80 alt=".$row['vidname']."></a>\n";
$content .= " <tr>\n";
$content .= " <img src=\"images/video_01.gif\" width=\"514\" height=\"21\" alt=\"\"></td>\n";
$content .= " </tr>\n";
//Latest Added
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY id DESC LIMIT $limit");

while ($row = $db->sql_fetchrow($result)) {
$imsrc = $row['imgurl'];
if ($row['vidname'] != '') {
$thumb_title = $row['vidname'];
} else {
$thumb_title = substr($row['imgurl'], 0, -4);
}
$content .= " <td background=\"images/video_02.gif\" width=\"514\" height=\"105\" alt=\"\" align=\"center\">$videos</td>\n";




}
?>





Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS