-
Rare Values System
Hello,
I recently downloaded a copy of Project Rare vaules by NintendoNews and I have noticed that the rare vaules are displayed downwards. I would like the rare vaules displayed across the page if possible. Just so people don't have to go though files, here is the default style and test.php files.
This is the Style CSS.
PHP Code:
body {
background-color: #6699FF;
margin-top: 10px;
}
#main {
margin-left: auto;
width: 500px;
background-color: #FFFFFF;
margin-right: auto;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
padding: 0px;
padding-bottom: 3px;
padding-top: 0px;
overflow: hidden;
}
#navigator {
width: 150px;
float: left;
padding: 5px;
margin-right: 5px;
}
#content {
width: 320px;
float: right;
padding: 5px;
}
This is in the Test.php
PHP Code:
<?php
require("functions.inc.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
displayRares("rare", "150");
?>
</body>
</html>
If anybody could possible help me with the code to display it across ways, I'll be happy :)
Thanks,
Rob.
-
Have you got a link where you installed it?
So i can see what you mean
-
Sure mate.
*REMOVED*
Edited by Elkaa (Forum Super Moderator): Please do not link to RETRO hotels.
-
So do you want it like Habbox's? Where it is like 5 per row for example?
-
Yes I would like it like that.
-
If you want it like 4 At the top and 4 down,
just do 4 then put <br> then do it again?
-
Change it to something like this youd need to find the displayrare function but when you do itll probaly be a loop so:
PHP Code:
echo "<table width=\"100%\"><tr>";
$i = 0;
while(QUERYS HERE)
{
$i = 1;
echo "Bla the rare stuff";
if($i == 5) {
echo "</tr><tr>";
}
$i = 0;
}
Thats off the top of my head so im not sure if itll work
-
Erm.. I dno if you can do it with the function in. But i dont have a copy of the script so i wouldnt know how to get round the function. Something like this would work for across the way, but i dont know the structure of the database, so i really dont know.
PHP Code:
<?
require("functions.inc.php");
$sql = mysql_query("select * from rarevalues");
while($rares = mysql_fetch_array($sql);){
echo("<img src=\"$rares[image]\" alt=\"$rares[updated]\" /><br />$rares[desc]");
}
?>
and just change the stuff to suit the path to the image (image), the alt will be where it stores last updated (updated) and desc will be the value.
But its really just a guess
-
Do something like this:
PHP Code:
<?php
$sql = mysql_query( "SELECT * FROM `rares`" );
echo '<table border="0">';
for( $i = 5; $i <= mysql_num_rows( $sql ); $i++ )
{
$start = $i - 5;
$sql = mysql_query( "SELECT * FROM `rares` LIMIT $start, $i" );
echo "<tr>";
while( $result = mysql_fetch_array( $sql )
{
echo "<td>" . $result["name"] . "</td>";
}
echo "</tr>";
}
echo "</table";
?>
Just edit the mysql etc etc and it should work
-
Speak to Luckyrare, I think he knows how :) I can't do any coding atm, as I'm on holiday without my code.