PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Mon Jun 22, 2009 4:38 pm Reply with quote Back to top

[ Added by Raven: This is a continuation of a thread that was started at
Only registered users can see links on this board!
Get registered or login to the forums!
but had to be locked due to some trolling. ]



Please dont muck up my thread guys.

@@Dawg - the fixes you provided were perfect!

I would indeed love the blocks.

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


Joined: Nov 07, 2003
Posts: 884

PostPosted: Mon Jun 22, 2009 5:20 pm Reply with quote Back to top

Blocks....Here ya go....

block-Video_H_3.php
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 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
$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>Most Viewed Video</b></center></td>";
$content .="    <td><center><b>Latest Video</b></center></td>";
$content .="    <td><center><b>Highest Rated Video</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>";

                    }
                     }
                      }
   
?>
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Mon Jun 22, 2009 5:22 pm Reply with quote Back to top

Random Video

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.                                      //
// ------------------------------------------------------------------------- //

//----------------------------------------//
//Random video block by Q @
Only registered users can see links on this board!
Get registered or login to the forums!
//
//----------------------------------------//

if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");
    die();
}
define('NO_HEADER', true);
global $prefix, $prefix, $db;
$limit = 1;
$content = "<p align=\"center\">";
$result = $db->sql_query("SELECT * FROM " .$prefix. "_video_stream GROUP BY id ORDER BY RAND() 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&amp;page=watch&amp;id=".$row['id'].">".$row['vidname']."</a><br>";
      $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>";

}
?>
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Mon Jun 22, 2009 5:23 pm Reply with quote Back to top

Most Views...

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 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");

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 .="Most Viewed 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>";

}
?>
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Mon Jun 22, 2009 5:26 pm Reply with quote Back to top

I made a side block with all three as well...but I can't find it.


Just take H 3 and change the layout at the bottom of the screen to fit your needs.
Dawg
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Mon Jun 22, 2009 5:31 pm Reply with quote Back to top

I also recently posted a new Referrs Block that works with RN....You can get it here...

Only registered users can see links on this board!
Get registered or login to the forums!


Dawg
View user's profile Send private message
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Mon Jun 22, 2009 9:05 pm Reply with quote Back to top

Thanks Dawg.
Whenever you do anything with this module it loads a popup.

Works on your site in both firefox and IE ... but on mine only works in IE>

Therefore can I have your javascript.php file from this module please Smile I have narrowed it down to this and I researched it this night - from what I can tell of the javascript docs its coded properly... so beats me why it works on one and not the other. I would have to see whats different.

Many Many thanks!
View user's profile Send private message
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Mon Jun 22, 2009 9:08 pm Reply with quote Back to top

LOL and Dawg, While your at it - will you install it and upload a bunch of videos and then send a bunch of traffic to watch them for me too Laughing Embarassed ROTFL Embarassed gawd I hate feeling needy.
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Tue Jun 23, 2009 2:36 am Reply with quote Back to top

Draxx,
I sent you a PM with a downlaod link for the zip. Hope that helps. IT is not really packaged for others use. I am happy to help where I can.

Dawg
View user's profile Send private message
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 366
Location: France

PostPosted: Tue Jun 23, 2009 4:20 am Reply with quote Back to top

Good job dawg , huhm , can you guys point me to the download of that module so I can make the blocks work Wink I can't seem to find it anywhere on this site and their site is down Sad
View user's profile Send private message Visit poster's website MSN Messenger
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Tue Jun 23, 2009 9:17 am Reply with quote Back to top

I sent you a PM with it. I will sit down and package it up for Everyones use and post it.

Dawg
View user's profile Send private message
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Tue Jun 23, 2009 11:13 am Reply with quote Back to top

Thanks Dawg.

Now I'm completely baffeled. On your site my firefoxx loads that popup just fine. On mine it doesnt. Same javascript.php

What could I be missing about open.window ?

Any ideas? Anyone?
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Tue Jun 23, 2009 12:26 pm Reply with quote Back to top

What is the error and I will see if I have seen it before....Dawg
View user's profile Send private message
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Tue Jun 23, 2009 12:30 pm Reply with quote Back to top

It doesnt error. It opens a new window with the same page that called it. It's supposed to open a new window with the form for comment/submission or a popup player.

It sizes the window to the window.open specifications but the content in the window is always the same page it was clicked on from.
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

PostPosted: Tue Jun 23, 2009 12:42 pm Reply with quote Back to top

Sounds like you may have more than one listener then for the window.open event, possibly a chat block ??
View user's profile Send private message Send e-mail Visit poster's website
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Tue Jun 23, 2009 1:01 pm Reply with quote Back to top

It works on IE but not Firefoxx. ? Still possible? I've no chat blocks ... ?
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Tue Jun 23, 2009 7:24 pm Reply with quote Back to top

Drax,
Just to make sure of what we are looking at. Did you overwrite everything I gave you in the zip file?

Look through your includes/javascript.php and see if you see anything that is calling that same javascript function.

I think G is right. There is more than one call....

Shoot me a PM with the URL and I will have a look at it.

Dawg
View user's profile Send private message
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Tue Jun 23, 2009 10:28 pm Reply with quote Back to top

Okay its got something to do with & and &amp;

Code:


function loadcomment(id, modcom) {
   window.open('modules.php?name=Video_Stream&page=comment&moderateVS='+modcom+'&id='+id+'','','scrollbars=no,menubar=no,height=250,width=500,resizable=no,toolbar=no,location=no,status=no');
}
function loadsend(id) {
   window.open('modules.php?name=Video_Stream&page=send&id='+id+'','','scrollbars=no,menubar=no,height=240,width=200,resizable=no,toolbar=no,location=no,status=no');
}
function loadadd() {
   window.open('modules.php?name=Video_Stream&page=vidadd','','scrollbars=no,menubar=no,height=600,width=360,resizable=no,toolbar=no,location=no,status=no');
}
function loadrate(rate, id) {
   window.open('modules.php?name=Video_Stream&page=rate&id='+id+'&rate='+rate+'','','scrollbars=no,menubar=no,height=50,width=250,resizable=no,toolbar=no,location=no,status=no');
}
function loadvidpop(id, height, width) {
   window.open('modules.php?name=Video_Stream&page=vidpop&id='+id+'','','scrollbars=no,menubar=no,height='+height+',width='+width+',resizable=yes,toolbar=no,location=no,status=no');
}


Firefoxx subs the & with &amp; and that doesnt work. It must be & ... even if I load it with &amp; in the window it does not open.
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Tue Jun 23, 2009 10:36 pm Reply with quote Back to top

If you roll through the code and change the "&" to "&amp;" it doesn't work?

&amp; should be converted to & by php.....Heck if I know....

Dawg
View user's profile Send private message
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Tue Jun 23, 2009 11:52 pm Reply with quote Back to top

Nope if I change the & to &amp; it doesnt work. And firefoxx or the java seems to convert the & to the &amp; by itself.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum