Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-06-2012, 01:01 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 655,509
Hall of Famer is on a distinguished road
Default

No worries, I will give you more details on how to accomplish this. Can you show me what you've done with the 10 random adoptables page? It would be easier for me to tell you what to do this way, otherwise Id have to write an arbitrary script and explain some concepts that may not make much sense to you.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #2  
Old 06-07-2012, 03:37 AM
Lonin Lonin is offline
Member
 
Join Date: Jan 2012
Location: England
Posts: 17
Gender: Female
Credits: 10,894
Lonin is on a distinguished road
Default

Yup yup

Code:
<?php

include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("inc/lang.php");

//***************//
//  START SCRIPT //
//***************//
$article_title = "Random adoptables";
$article_content = $article_content."<br><h3>".$lang_randomadopts."</h3>".$lang_randomtext."<br>
<br /><form>
<input type='button' onClick='history.go(0)' value='Refresh'>
</form><br><table>
  <tr>
    <th>Adoptable Image: </th>
    <th>Adoptable Name: </th>
    <th>Owned By: </th>
    <th>Total Clicks: </th>
    <th>Current Level: </th>
  </tr>";

// Loop out code...
$query = "SELECT * FROM ".constant("PREFIX")."owned_adoptables, ".constant("PREFIX")."adoptables, ".constant("PREFIX")."levels WHERE "
.constant("PREFIX")."adoptables.type = ".constant("PREFIX")."owned_adoptables.type AND ".constant("PREFIX")."levels.thisislevel = ".constant("PREFIX")."owned_adoptables.currentlevel AND ".constant("PREFIX")."levels.adoptiename = ".constant("PREFIX")."adoptables.type"
." ORDER BY RAND() DESC LIMIT 10";
$stmt = $adopts->query($query);

//Loop out code
while ($row = $stmt->fetchObject()) {
	$aid=$row->aid;
	$currentlevel=$row->currentlevel;
	$owner=$row->owner;
	$type=$row->type;
	$name=$row->name;
	$eggimage=$row->eggimage;
	$usealternates=$row->usealternates;
	$totalclicks=$row->totalclicks;
	$primaryimage=$row->primaryimage;
	$alternateimage=$row->alternateimage;

	if ($usealternates=='yes') { $image = $alternateimage; }
	else { $image = $primaryimage; }
	if ($currentlevel==0) { $image = $eggimage; }
	if ($image=='') { $image = $primaryimage; }

	$article_content = $article_content."<tr>
		<td><center><a href='levelup.php?id={$aid}'><img src='{$image}' 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>";

}

$article_content = $article_content."</table><br><form>
<input type='button' onClick='history.go(0)' value='Refresh'>
</form>";


//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title, $article_content, $date);

?>
__________________
Reply With Quote
Reply


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
Ads won't show. Mortain Questions and Supports 2 12-01-2015 02:46 AM
Only display pets a user hasn't clicked in daycare Hwona Suggestions and Feature Requests 3 08-16-2014 04:53 PM
I can't make my adoptables show up/active! MintChip Questions and Supports 25 10-04-2012 09:45 PM
show adoptables Blackmagic Questions and Supports 0 11-02-2009 02:36 AM
is there anyway to find out how many times someone has clicked adoptables? aroymart Questions and Supports 4 04-13-2009 03:36 PM


All times are GMT -5. The time now is 06:18 PM.

Currently Active Users: 2005 (0 members and 2005 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