PDA

View Full Version : A 2-column table?


Quillink
06-04-2009, 05:34 AM
Does anyone know how to display the user's adoptables in a two-column table? What I was after was something like this:

[Name and image][Stats/manage link]
[Name and image][Stats/manage link]
[Name and image][Stats/manage link]
[Name and image][Stats/manage link]
...And so on

Could anyone write me a script for this? I can edit the contents of each column myself. :)

Ashje
06-04-2009, 06:51 AM
It's quite simple, in myadopts.php, find:

$article_content = $article_content."<td><div align='center'><p><p>".$name."</p><a href='myadopts.php?act=manage&id=".$aid."'><img src='".$image."' border=0></a></p><p>
<b><a href='myadopts.php?act=manage&id=".$aid."'>Manage</a></b></p></div></td>";


and replace it with:

$article_content = $article_content."<td><div align='center'><p><p>".$name."</p><a href='myadopts.php?act=manage&id=".$aid."'><img src='".$image."' border=0></a></p><p>
<td><div align='center'><b><a href='myadopts.php?act=manage&id=".$aid."'>Manage</a></b></p></div></td>";

Quillink
06-04-2009, 08:25 AM
Thanks Ashje, with your help I managed to piece together just what I wanted. :D
Now, for the next step - how hard exactly would it be to work together something like this, anyone?
http://i6.photobucket.com/albums/y208/oORossOo/eg2.jpg

I'm not looking for the actual coding for the content - I worked that out myself - just the tabular layout.
Thanks in advance ^ ^

Seapyramid
06-04-2009, 10:33 AM
If you look in the donator forum there is a mod for the my adopts page. It is not the 2 per line.. it is still only one, but it has all the info. you could use the above info and modify it to 2 column :)

Quillink
06-05-2009, 04:05 AM
Thanks, but I've already sorted that part out. :)

I've managed to create two (4) columns, but the right hand one is just a replica of the left one. Is there any way to stagger them?
This is what I've got at the moment:
// Our code to determine if we show the table or not...

$article_content = $article_content."<table width='530' border='1' bordercolor='#CCCCCC' rules=rows frame=hsides><tr>";

// Output the table information...
// Get the current adoptable's image

$image = getcurrentimage($aid);

$article_content = $article_content."<td width=110 height=110><div align='center'><a href=levelup.php?id=".$aid."'><img src='".$image."' border=0></a>
<td width=115><div align='left'>
<b> - ".$name."</b><br>
<i>Current Level:</i> ".$currentlevel."<br>
<i>Total Clicks:</i> ".$totalclicks."<br>
<b><a href='myadopts.php?act=manage&id=".$aid."'>More info</a></b>
<td><div align='left'>
</div></td></div></td>";

$article_content = $article_content."<td width=110 height=110><div align='center'><a href=levelup.php?id=".$aid."'><img src='".$image."' border=0></a>
<td width=115><div align='left'>
<b> - ".$name."</b><br>
<i>Current Level:</i> ".$currentlevel."<br>
<i>Total Clicks:</i> ".$totalclicks."<br>
<b><a href='myadopts.php?act=manage&id=".$aid."'>More info</a></b>
<td><div align='left'>
</div></td></div></td>";

$article_content = $article_content."</tr></table>";
As you can see, all I've done is copy/paste another two columns in..
Thanks in advance. :)

Ashje
06-05-2009, 05:07 AM
Here's where it gets confusing, and beyond my knowledge of html tables. Try PMing/asking Bloodrun or Brandon, because they know what they're doing. Sorry =(

zhiichiro
06-12-2009, 05:26 AM
can i ask something??

what ashje said is working fine on myadopts.php..

how to apply it on adopt.php? or is it possible?

SieghartZeke
10-06-2009, 10:29 AM
I have used the second code of quicklink but...i need to delete the multiple character!!!!
Here can show have happened.
Srry but is much Big...
Ok...i have risolved this problem..but i dont have 2 column!

vexel
09-23-2010, 02:26 PM
hot to delete multiple characters?
please help me ;D