Author |
Message |
blastwood
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Sep 11, 2010
Posts: 12
Location: Bucharest
|
Posted:
Fri Jan 13, 2012 8:08 pm |
|
Salutare
Vreau sa convertim un bloc de la nuke evo in R.N 2.4
Modulul este instalat si ruleaza perfect dar block ul nu il afiseaza pe pagina de index
Nu folosesc G.T Next Gen adica nu este activat tap ul pentru paginile mele
Code:
//Side Block to show Latest Video//
if(!defined('NUKE_EVO')) exit;
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");
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 .="Latest Added 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>";
}
?>
|
I tried something I am sorry but I gave up and finally broke
Thanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/3234de284ee21bd39eecd.jpg)
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Fri Jan 13, 2012 9:14 pm |
|
Try this:
Code:
<?php
if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}
global $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");
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 .="Latest Added 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>";
}
?>
|
|
_________________ Only registered users can see links on this board! Get registered or login!
Last edited by nuken on Wed Feb 08, 2012 8:48 am; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
blastwood
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jan 14, 2012 4:30 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
blastwood
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 07, 2012 4:31 pm |
|
greeting
I have not opened the topic for that I think was not necessary
Sorry I wrote in Romanian I did not notice at the time
I want to convert the video from Video Stream H3 block modules that look last 3 videos added
I tried to copy the source code showing but did not work last video gave error
I tried to change the number of video sites in November added a show not to look 3 .... but do not know what line that gives the number
Thank you very much for all
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 at ravenphpscripts.com//
//Validated with CSE HTML Validator by Dawg//
//Based on The Random video block by Q @ www.3c0x1.net //
//----------------------------------------//
//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
$result1 = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (views) DESC LIMIT $limit");
while ($row1 = $db->sql_fetchrow($result1)) {
$imsrc1 = $row1['imgurl'];
$vid1 = $row1['id'];
if ($row1['vidname'] != '') {
$thumb_title1 = $row1['vidname'];
} else {
$thumb_title1 = substr($row1['imgurl'], 0, -4);
}
// echo "$thumb_title1";
// echo "$imsrc1";
// echo "$vid1";
//Latest Added
$result2 = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY id DESC LIMIT $limit");
while ($row2 = $db->sql_fetchrow($result6)) {
$imsrc2 = $row2['imgurl'];
$vid2 = $row2['id'];
if ($row2['vidname'] != '') {
$thumb_title2 = $row2['vidname'];
} else {
$thumb_title2 = substr($row2['imgurl'], 0, -4);
}
// echo "$thumb_title2";
// echo "$imsrc2";
// echo "$vid2";
//Rated
$result3 = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (rating/rates) DESC LIMIT $limit");
while ($row3 = $db->sql_fetchrow($result3)) {
$imsrc3 = $row3['imgurl'];
$vid3 = $row3['id'];
if ($row3['vidname'] != '') {
$thumb_title3 = $row3['vidname'];
} else {
$thumb_title3 = substr($row3['imgurl'], 0, -4);
}
// echo "$thumb_title3";
// echo "$imsrc3";
// echo "$vid3";
$content .=" <table width=\"100%\">";
$content .=" <tr>";
$content .=" <td><center><b>Cel mai vazut video !</b></center></td>";
$content .=" <td><center><b>Ultimul adaugat !</b></center></td>";
$content .=" <td><center><b>Cel mai bine cotat !</b></center></td>";
$content .=" </tr>";
$content .=" <tr>";
$content .=" <td><center><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid1\"><img src=\"$imsrc1\" border=\"0\" width=\"145\" alt=\"$thumb_title1\" /></a>";
$content .=" </center>";
$content .=" </td>";
$content .=" <td><center><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid2\"><img src=\"$imsrc2\" border=\"0\" width=\"145\" alt=\"$thumb_title2\" /></a>";
$content .=" </center>";
$content .=" </td>";
$content .=" <td><center><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid3\"><img src=\"$imsrc3\" border=\"0\" width=\"145\" alt=\"$thumb_title3\" /></a>";
$content .=" </center>";
$content .=" </td>";
$content .=" </tr>";
$content .=" <tr>";
$content .=" <td><center><b><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid1\">$thumb_title1</a></b>";
$content .=" </center>";
$content .=" </td>";
$content .=" <td><center><b><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid2\">$thumb_title2</a></b>";
$content .=" </center>";
$content .=" </td>";
$content .=" <td><center><b><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid3\">$thumb_title3</a></b>";
$content .=" </center>";
$content .=" </td>";
$content .=" </tr>";
$content .="</table>";
}
}
}
?>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Thu Feb 09, 2012 11:42 pm |
|
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 at ravenphpscripts.com//
//Validated with CSE HTML Validator by Dawg//
//Based on The Random video block by Q @ www.3c0x1.net //
//----------------------------------------//
//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
$result1 = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (views) DESC LIMIT $limit");
while ($row1 = $db->sql_fetchrow($result1)) {
$imsrc1 = $row1['imgurl'];
$vid1 = $row1['id'];
if ($row1['vidname'] != '') {
$thumb_title1 = $row1['vidname'];
} else {
$thumb_title1 = substr($row1['imgurl'], 0, -4);
}
// echo "$thumb_title1";
// echo "$imsrc1";
// echo "$vid1";
//Latest Added
$result2 = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY id DESC LIMIT $limit");
while ($row2 = $db->sql_fetchrow($result2)) {
$imsrc2 = $row2['imgurl'];
$vid2 = $row2['id'];
if ($row2['vidname'] != '') {
$thumb_title2 = $row2['vidname'];
} else {
$thumb_title2 = substr($row2['imgurl'], 0, -4);
}
// echo "$thumb_title2";
// echo "$imsrc2";
// echo "$vid2";
//Rated
$result3 = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY (rating/rates) DESC LIMIT $limit");
while ($row3 = $db->sql_fetchrow($result3)) {
$imsrc3 = $row3['imgurl'];
$vid3 = $row3['id'];
if ($row3['vidname'] != '') {
$thumb_title3 = $row3['vidname'];
} else {
$thumb_title3 = substr($row3['imgurl'], 0, -4);
}
// echo "$thumb_title3";
// echo "$imsrc3";
// echo "$vid3";
$content .=" <table width=\"100%\">";
$content .=" <tr>";
$content .=" <td><center><b>Cel mai vazut video !</b></center></td>";
$content .=" <td><center><b>Ultimul adaugat !</b></center></td>";
$content .=" <td><center><b>Cel mai bine cotat !</b></center></td>";
$content .=" </tr>";
$content .=" <tr>";
$content .=" <td><center><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid1\"><img src=\"$imsrc1\" border=\"0\" width=\"145\" alt=\"$thumb_title1\" /></a>";
$content .=" </center>";
$content .=" </td>";
$content .=" <td><center><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid2\"><img src=\"$imsrc2\" border=\"0\" width=\"145\" alt=\"$thumb_title2\" /></a>";
$content .=" </center>";
$content .=" </td>";
$content .=" <td><center><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid3\"><img src=\"$imsrc3\" border=\"0\" width=\"145\" alt=\"$thumb_title3\" /></a>";
$content .=" </center>";
$content .=" </td>";
$content .=" </tr>";
$content .=" <tr>";
$content .=" <td><center><b><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid1\">$thumb_title1</a></b>";
$content .=" </center>";
$content .=" </td>";
$content .=" <td><center><b><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid2\">$thumb_title2</a></b>";
$content .=" </center>";
$content .=" </td>";
$content .=" <td><center><b><a href=\"modules.php?name=Video_Stream&page=watch&id=$vid3\">$thumb_title3</a></b>";
$content .=" </center>";
$content .=" </td>";
$content .=" </tr>";
$content .="</table>";
}
}
}
?>
|
|
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|