Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
Michael-CGC
Hangin' Around


Joined: Apr 07, 2005
Posts: 29

PostPosted: Thu Aug 18, 2005 1:47 am Reply with quote

Hi :O)

Is there a "Random Downloads Block"? I found this block made by this fellor called Raptr24 ( Only registered users can see links on this board! Get registered or login!). But I can't fnd it anywhere anymore :O/

In advance thx
Michael
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Thu Aug 18, 2005 5:09 am Reply with quote

this will do it ....

Code:


<?php
if (stristr($_SERVER['SCRIPT_NAME'], "block-Random_Download_Info")) {
    Header("Location: index.php");
    die();
}
global $prefix;
mt_srand((double)microtime()*1000000);
$total = mysql_fetch_array(mysql_query("SELECT COUNT(p.lid) AS total FROM $prefix"._downloads_downloads." AS p"));
$p = (mt_rand(0,($total[total] - 1)));
$dl = mysql_fetch_array(mysql_query("SELECT p.lid, p.title, p.description FROM $prefix"._downloads_downloads." AS p LIMIT $p,1"));
$title2 = ereg_replace("_", " ", $dl[title]);
/* Line Unused   $dl[description] = htmlentities($dl[description]);   */
$content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$dl[lid]&amp;title=$dl[title]\">$title2</a><br> $dl[description] <br>";
$a++;
?>
 
View user's profile Send private message
Michael-CGC
PostPosted: Thu Aug 18, 2005 6:17 am Reply with quote

Hi Hitwalker

Thx mate :O)

Is it possible adding the "Description Image" instead of description text?

What I'm thinking of is:

Description image (at the top. then in a new line)
DL title (center ligned)

Thx
Michael
 
hitwalker
PostPosted: Thu Aug 18, 2005 6:21 am Reply with quote

well you can try changing the p.description in the query into whatever image your talking about...
 
thefirsttouch
New Member
New Member


Joined: Jul 22, 2006
Posts: 1

PostPosted: Sat Jul 22, 2006 11:17 am Reply with quote

mm good
 
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 -> 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 ©