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
  #2  
Old 04-03-2013, 10:14 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: 654,114
Hall of Famer is on a distinguished road
Default

umm if you have to play with the table, it may get a bit tricky. Here is the code used to generate myadopts index table:

PHP Code:
        $adoptTable = new TableBuilder("adopttable"650);
        
$adoptTable->setAlign(new Align("center""middle"));
        
$adoptTable->buildHeaders("Gender""Name/Type""Image""Clicks""Level");
        
        while(
$aid $stmt->fetchColumn()){
            
$adopt = new OwnedAdoptable($aid);
            
$gender = new TCell($adopt->getGender("gui"));
            
$nametype = new TCell("<em>{$adopt->getName()}</em> the {$adopt->getType()}");
            
$image = new TCell(new Link("myadopts/manage/{$aid}"$adopt->getImage("gui")));
            
$clicks = new TCell($adopt->getTotalClicks());
            
$level = new TCell($adopt->getCurrentLevel());
            
$adoptTable->buildRow(array($gender$nametype$image$clicks$level));
        } 
To change the header, simply edit the words inside the line $adoptTable->buildHeader(). To edit the actual contents, you will have to define each table cell with $cellName = new TCell("Contents inside"). Then add all table cells to the table row as shown in the last line $adoptTable->buildRow(). It is very convenient to use.

Note you can still just write a string of HTML code and use the below code to append it to your document:

PHP Code:
$html "<table>Contents inside</table>";
$document->addLangvar($html); 
It is not recommended though, since the GUI system is really good to use and moreover, it works well with the new URL system especially if you use relative url. Remember relative urls will not work with the script since we are having SEO friendly URL right now, unless you apply some complex trick to it.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
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
Fatal Error with Myadopts page Abronsyth Questions and Supports 2 12-29-2014 03:54 PM
Add a new function in the myadopts page? Infernette Questions and Supports 8 07-02-2013 12:12 PM
MyAdopts page? Aasixx Questions and Supports 4 04-15-2012 06:37 PM
Sidebar wonky on the myadopts page coffeeaddict Questions and Supports 2 03-01-2011 06:56 PM
Change the MyAdopts.php page! Blue Icebox Addons/Mods Graveyard 4 05-03-2009 03:04 PM


All times are GMT -5. The time now is 11:33 AM.

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