PDA

View Full Version : Rare Values System



additional
30-07-2007, 01:31 PM
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.


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

VPSwow
30-07-2007, 01:33 PM
Have you got a link where you installed it?

So i can see what you mean

additional
30-07-2007, 01:37 PM
Sure mate.

*REMOVED*

Edited by Elkaa (Forum Super Moderator): Please do not link to RETRO hotels.

VPSwow
30-07-2007, 01:41 PM
So do you want it like Habbox's? Where it is like 5 per row for example?

additional
30-07-2007, 01:45 PM
Yes I would like it like that.

Assassinator
30-07-2007, 02:22 PM
If you want it like 4 At the top and 4 down,

just do 4 then put <br> then do it again?

Sygon..
30-07-2007, 02:44 PM
Change it to something like this youd need to find the displayrare function but when you do itll probaly be a loop so:


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

MrCraig
30-07-2007, 03:01 PM
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.



<?
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

Blob
30-07-2007, 03:34 PM
Do something like this:



<?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

timROGERS
30-07-2007, 04:36 PM
Speak to Luckyrare, I think he knows how :) I can't do any coding atm, as I'm on holiday without my code.

Luckyrare
30-07-2007, 05:51 PM
Speak to Luckyrare, I think he knows how :) I can't do any coding atm, as I'm on holiday without my code.
mm...

I did this for a website. Ill tell you how I did it

I had to add some CSS onto the main page and edit the main function.

Changed it so the divs floated to the left and where like 20% width. worked fine

additional
31-07-2007, 02:04 AM
mm...

I did this for a website. Ill tell you how I did it

I had to add some CSS onto the main page and edit the main function.

Changed it so the divs floated to the left and where like 20% width. worked fine

Feel like sharing the code?

VPSwow
19-08-2007, 03:46 PM
Slight bump but please share i really need it for HabMate.

Want to hide these adverts? Register an account for free!