Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 05-28-2009, 10:52 AM
trollis76 trollis76 is offline
Member
 
Join Date: Feb 2009
Posts: 160
Credits: 18,416
trollis76
Default RE: series of questions

3. You can copy the stats.php file, and then name the file to "random.php" for an example.
Then you delete this part:
Code:
$article_content = $lang_stats_explain."<h2>".$lang_top10."</h2>".$lang_top10_exp."<br><br><table width='680' border='1'>
  <tr>
    <td width='288'><strong>Adoptable Image: </strong></td>
    <td width='130'><strong>Adoptable Name: </strong></td>
    <td width='93'><strong>Owned By: </strong></td>
    <td width='82'><strong>Total Clicks: </strong></td>
    <td width='53'><strong>Current Level: </strong></td>
  </tr>";

// Loop out code...

$query = "SELECT * FROM ".$prefix."owned_adoptables ORDER BY totalclicks DESC LIMIT 10";
$result = mysql_query($query);
$num = mysql_numrows($result);

//Loop out code
$i=0;
while ($i < $num) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$owner=@mysql_result($result,$i,"owner");
$currentlevel=@mysql_result($result,$i,"currentlevel");
$totalclicks=@mysql_result($result,$i,"totalclicks");

$img = getcurrentimage($aid);

$article_content = $article_content."<tr>
    <td><center><a href='levelup.php?id=".$aid."'><img src='".$img."' border=0></a></center></td>
    <td><center>".$name."</center></td>
    <td><center><a href='profile.php?user=".$owner."'>".$owner."</a></center></td>
    <td><center>".$totalclicks."</center></td>
    <td><center>".$currentlevel."</center></td>
  </tr>";


$i++;
}
And turn this:
Code:
$query = "SELECT * FROM ".$prefix."owned_adoptables ORDER BY RAND() LIMIT 5 OFFSET ".$offset."";
Into this:

Code:
$query = "SELECT * FROM ".$prefix."owned_adoptables ORDER BY RAND() LIMIT 100 OFFSET ".$offset."";
[hr]
Oh, and if you want to delete the random adoptables from the stats.php, you delete this part:
Code:
$article_content = $article_content."</table><br><h2>".$lang_randomadopts."</h2>".$lang_randomtext."<br><br><table width='680' border='1'>
  <tr>
    <td width='288'><strong>Adoptable Image: </strong></td>
    <td width='130'><strong>Adoptable Name: </strong></td>
    <td width='93'><strong>Owned By: </strong></td>
    <td width='82'><strong>Total Clicks: </strong></td>
    <td width='53'><strong>Current Level: </strong></td>
  </tr>";

// Loop out code...

$num = 0;

$query = "SELECT * FROM ".$prefix."owned_adoptables ORDER BY totalclicks DESC LIMIT 10";
$result = mysql_query($query);
$num = mysql_numrows($result);

$gennum = $num;

if($num > 5){
$gennum = $num - 5;
}

$offset = rand(0,$gennum);

$query = "SELECT * FROM ".$prefix."owned_adoptables ORDER BY RAND() LIMIT 5 OFFSET ".$offset.""; 
$result = mysql_query($query);
$num = mysql_numrows($result);

//Loop out code
$i=0;
while ($i < $num) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$owner=@mysql_result($result,$i,"owner");
$currentlevel=@mysql_result($result,$i,"currentlevel");
$totalclicks=@mysql_result($result,$i,"totalclicks");

$img = getcurrentimage($aid);

$article_content = $article_content."<tr>
    <td><center><a href='levelup.php?id=".$aid."'><img src='".$img."' border=0></a></center></td>
    <td><center>".$name."</center></td>
    <td><center><a href='profile.php?user=".$owner."'>".$owner."</a></center></td>
    <td><center>".$totalclicks."</center></td>
    <td><center>".$currentlevel."</center></td>
  </tr>";


$i++;
}
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flux Series ipengu Templates and Themes 7 10-17-2011 09:00 AM
Just some Questions i have. rickasawr Questions and Supports 3 04-30-2011 11:04 PM
Some Questions? :) blondbananamix Questions and Supports 10 04-25-2011 01:47 PM
two questions RoconzaArt Questions and Supports 10 02-24-2011 09:15 AM


All times are GMT -5. The time now is 02:48 AM.

Currently Active Users: 4006 (0 members and 4006 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636