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 04-02-2013, 08:09 AM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 67,283
AlexC is an unknown quantity at this point
Default How to Restyle Myadopts Page?

So for a while I've redone the myadopts page on my site on a different style, which I prefer and find easier and quicker, but since the code change, I'm having trouble changing it - every time I try, the page goes blank and won't load.

I wanted it to look like this;

| image | trade status | rename - freeze - pound | click |
| name + species (gender) | # clicks / level # | stats - get codes - change trade status | |

imagine that is a table, with four cells and one row. I'm not entirely sure how to put things on top of other stuff in the new coding, let alone how to add other stuff.
__________________
Reply With Quote
  #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: 333,760
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
  #3  
Old 04-03-2013, 08:15 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 67,283
AlexC is an unknown quantity at this point
Default

Wait, how do I do another row though?
__________________

Last edited by AlexC; 04-03-2013 at 08:30 PM.
Reply With Quote
  #4  
Old 04-04-2013, 10:34 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: 333,760
Hall of Famer is on a distinguished road
Default

All you have to do is to build an additional row above the standard table rows and below the table header. Use this syntax:

PHP Code:
            $adoptTable->buildRow(array("Column 1""Column 2""Column 3""Column 4")); 
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
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
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 08:50 AM.

Currently Active Users: 9674 (0 members and 9674 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636