Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks
Author Message
blastwood
New Member
New Member



Joined: Sep 11, 2010
Posts: 12
Location: Bucharest

PostPosted: Fri Jan 13, 2012 8:08 pm Reply with quote

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&amp;page=watch&amp;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&amp;page=watch&amp;id=".$row['id'].">".$row['vidname']."</a><br>";

}
?>



I tried something I am sorry but I gave up and finally broke

Thanks
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Fri Jan 13, 2012 9:14 pm Reply with quote

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&amp;page=watch&amp;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&amp;page=watch&amp;id=".$row['id'].">".$row['vidname']."</a><br>";
}

?>

_________________
Tricked Out News

Last edited by nuken on Wed Feb 08, 2012 8:48 am; edited 1 time in total 
View user's profile Send private message Send e-mail Visit poster's website
blastwood







PostPosted: Sat Jan 14, 2012 4:30 am Reply with quote

Thank you all
 
blastwood







PostPosted: Tue Feb 07, 2012 4:31 pm Reply with quote

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 @ [ Only registered users can see links on this board! Get registered or login! ] //
//----------------------------------------//


//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&amp;page=watch&amp;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&amp;page=watch&amp;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&amp;page=watch&amp;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&amp;page=watch&amp;id=$vid1\">$thumb_title1</a></b>";
$content .="    </center>";
$content .="    </td>";
$content .="    <td><center><b><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=$vid2\">$thumb_title2</a></b>";
$content .="    </center>";
$content .="    </td>";
$content .="    <td><center><b><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=$vid3\">$thumb_title3</a></b>";
$content .="    </center>";
$content .="    </td>";
$content .="  </tr>";
$content .="</table>";

                    }
                     }
                      }
   
?>
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Feb 09, 2012 11:42 pm Reply with quote

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 @ [ Only registered users can see links on this board! Get registered or login! ] //
//----------------------------------------//


//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&amp;page=watch&amp;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&amp;page=watch&amp;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&amp;page=watch&amp;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&amp;page=watch&amp;id=$vid1\">$thumb_title1</a></b>";
         $content .="    </center>";
         $content .="    </td>";
         $content .="    <td><center><b><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=$vid2\">$thumb_title2</a></b>";
         $content .="    </center>";
         $content .="    </td>";
         $content .="    <td><center><b><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;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. 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©