Raven, If you do not mind I am going to post these blocks here. The support site for these blocks has issues with posting code. (It does not work right) and I am getting hit with requests.
Save this to a file call block-whatever. Upload to your blocks dir. Go to Block admin and add to you list of blocks and then activate them.
So here goes.....
Center Block with Most Viewed, Highest Rated and Latest Video with thumbnails
Code:
<?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. //
// ------------------------------------------------------------------------- //
//----------------------------------------//
//
//Center Block by Dawg//
//Based on The Random video block by Q @
Only registered users can see links on this board! Get registered or login to the forums!
//
//----------------------------------------//
//Center Block to show Latest Video, Highest Rated and Most Viewed//
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
global $prefix, $prefix, $db;
$limit = 1;
//Views
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (views) DESC LIMIT $limit");
}
//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>";
$content .="<center><b>Latest Video<b></center>\n";
$content .="<a href=modules.php?name=Video_Stream&page=watch&id=".$row['id']."><img src=".$row['imgurl']." border=\"0\" width=145 alt=".$row['vidname']."></a>\n";
$content .= "<br><center><a href=modules.php?name=Video_Stream&page=watch&id=".$row['id'].">".$row['vidname']."</a></center></td>";
}
//Rated
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (rating/rates) 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>";
$content .="<center><b>Highest Rated Video<b></center>\n";
$content .="<a href=modules.php?name=Video_Stream&page=watch&id=".$row['id']."><img src=".$row['imgurl']." border=\"0\" width=145 alt=".$row['vidname']."></a>\n";
$content .= "<br><center><a href=modules.php?name=Video_Stream&page=watch&id=".$row['id'].">".$row['vidname']."</a></center></td>";
}
?>
Side Block with Most Viewed, Highest Rated and Latest Video with thumbnails
Code:
<?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 @
Only registered users can see links on this board! Get registered or login to the forums!
//
//----------------------------------------//
//Side Block to show Latest Video, Highest Rated and Most Viewed//
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
define('NO_HEADER', true);
global $prefix, $prefix, $db;
$limit = 1;
$content = "<p align=\"center\">";
//Most Views
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (views) DESC LIMIT $limit");
}
//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 .= "<a href=modules.php?name=Video_Stream&page=watch&id=".$row['id'].">".$row['vidname']."</a><br>";
$content .="Latest Video\n";
$content .="<a href=modules.php?name=Video_Stream&page=watch&id=".$row['id']."><img src=".$row['imgurl']." border=\"0\" width=145 alt=".$row['vidname']."></a>\n";
$content .= "<br><a href=modules.php?name=Video_Stream&page=watch&id=".$row['id'].">".$row['vidname']."</a><br><br>";
}
//Rated
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (rating/rates) 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 .= "<a href=modules.php?name=Video_Stream&page=watch&id=".$row['id'].">".$row['vidname']."</a><br>";
$content .="Highest Rated Video\n";
$content .="<a href=modules.php?name=Video_Stream&page=watch&id=".$row['id']."><img src=".$row['imgurl']." border=\"0\" width=145 alt=".$row['vidname']."></a>\n";
$content .= "<br><a href=modules.php?name=Video_Stream&page=watch&id=".$row['id'].">".$row['vidname']."</a><br><br>";
}
?>
Side Block Highest Rated with thumbnail....
Code:
<?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 @
Only registered users can see links on this board! Get registered or login to the forums!
//
//----------------------------------------//
//Side Block to show Highest Rated//
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
define('NO_HEADER', true);
global $prefix, $prefix, $db;
$limit = 1;
$content = "<p align=\"center\">";
//Rated
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (rating/rates) DESC LIMIT $limit");
<?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 @
Only registered users can see links on this board! Get registered or login to the forums!
//
//----------------------------------------//
//Side Block to show Most Views//
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
define('NO_HEADER', true);
global $prefix, $prefix, $db;
$limit = 1;
$content = "<p align=\"center\">";
//Views
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (views) DESC LIMIT $limit");
<?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 @
Only registered users can see links on this board! Get registered or login to the forums!
//
//----------------------------------------//
//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;
$content = "<p align=\"center\">";
//Latest Added
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY id DESC LIMIT $limit");
If you have any questions....feel free to ask and I will try to help.
Those of you here that KNOW WAY more than me.....if you see something here that needs work...Please tell me so I can learn more.....I hear the music....just sometimes I can not carry the tune!
hmmm interesting it can help to boost up ur visitor. bring U tube into your site cool. what about the site secruity is it safe? does the sentinel have trouble dealing with member submiit link or script?
I have not looked at the Upload stuff. You would have to ask Raven about that. I do not use the upload features on my site so I did not bother. I run a regional site where most of the folks know one another to some exist. Overall it seems to work well...but still has some growing to do.
Dawg
Last edited by Dawg on Wed Nov 29, 2006 6:38 am; edited 1 time in total
I got pointed to this module from Dawgs posts and installed it and has been running for about a week. Its easy to use and install; I have come across a few minor bugs here and there, but have been able to resolve them without too much headache.
As far as security goes, i don't know for sure.
It gives members two ways to submit videos, either by the URL or by the embed code. While testing as a regular member, I did get banned by Sentinel trying to submit a video through the embed code. Although others have not had that problem.
But submitting by the video url is fine, although you then have to chose either media player or real player as the medium instead of the default for YouTube or MySpace.
All "uploads" (linking really) have to be approved by the admin and you can chose if you even want to have member upload. So there do seem to be safeguards in that respect.
As for other security vulnerabilities, well, you would have to ask Raven to look at it *hint hint wink wink* But after 2.10 comes out.
It has really upped my visitors and return members, I should add.
Srhh,
No Prroblem. I try to help when I can. I have a couple things I would like to try with this Mod. I would like to see Banners included in it. Most of my vids are from local sources so I have to host all of them. Bandwidth coast s money....so I want some way to get revenue from them. I also need to do some more work to the center block. I have a couple cool ideas for it.
Hopefully when Raven and Team get done with 2.10 we can talk them into takeing a look at it.
I am just curious if anyone have a center block for the latest video? coz i am using latest 3 videos and since slide block shows 3 videos in vertical line i can't use it in the center block.
If anyone have it please share it or is there a way i can edit the above??
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum