Changing Indentations

Scans for, and displays main/alt relations in your Guild

Moderator: PleegWat

Changing Indentations

Postby sedrikk » Wed Jul 26, 2006 10:25 pm

This mod is great, thanks. However to some the altmonitor page is a little confusing. Alts, start out at the sam indentation level as mains that have alts because of the +/- button. However, mains that do not have alts are further over. How can this be changed so that mains without alts, have spacing like current alts, so they line up, and alts, have a larger indentation than they do now?
User avatar
sedrikk
WR.net Apprentice
WR.net Apprentice
 
Posts: 30
Joined: Wed Jul 05, 2006 11:56 pm

Changing Indentations

Postby PleegWat » Fri Jul 28, 2006 4:03 pm

In altlist.php you'll have to edit serveral spots. Line 300-311:

Code: Select all
    if ( $current_col == )
    {
        
$tableHeaderRow .= '    <thead><th colspan="2" class="membersHeader"><a href="?roster_addon_name='.$_GET['roster_addon_name'].'&amp;s='.$field.$desc.'&amp;action='.$action.'&amp;altopen='.$_GET['altopen'].'">'.$th_text."</a></th>\n";
    }
    elseif ( 
$current_col == $cols )
    {
        
$tableHeaderRow .= '    <th class="membersHeaderRight"><a href="?roster_addon_name='.$_GET['roster_addon_name'].'&amp;s='.$field.$desc.'&amp;action='.$action.'&amp;altopen='.$_GET['altopen'].'">'.$th_text."</a></th>\n";
    }
    else
    {
        
$tableHeaderRow .= '    <th class="membersHeader"><a href="?roster_addon_name='.$_GET['roster_addon_name'].'&amp;s='.$field.$desc.'&amp;action='.$action.'&amp;altopen='.$_GET['altopen'].'">'.$th_text."</a></th>\n";
    }
 


Increment the width of the first header column if you want double indents

Code: Select all
    if ( $current_col == )
    {
        
$tableHeaderRow .= '    <thead><th colspan="3" class="membersHeader"><a href="?roster_addon_name='.$_GET['roster_addon_name'].'&amp;s='.$field.$desc.'&amp;action='.$action.'&amp;altopen='.$_GET['altopen'].'">'.$th_text."</a></th>\n";
    }
    elseif ( 
$current_col == $cols )
    {
        
$tableHeaderRow .= '    <th class="membersHeaderRight"><a href="?roster_addon_name='.$_GET['roster_addon_name'].'&amp;s='.$field.$desc.'&amp;action='.$action.'&amp;altopen='.$_GET['altopen'].'">'.$th_text."</a></th>\n";
    }
    else
    {
        
$tableHeaderRow .= '    <th class="membersHeader"><a href="?roster_addon_name='.$_GET['roster_addon_name'].'&amp;s='.$field.$desc.'&amp;action='.$action.'&amp;altopen='.$_GET['altopen'].'">'.$th_text."</a></th>\n";
    }
 


Line 427-447:
Widen the various possible ways in which the first collumn is added. There are 3 echoes of $cell_value. The first is main with alts, you'll want to add colspan="2" to that table collumn.
The second is main without alts, you'll want to put an empty <td class='$stripe_class'> in front.
The third is alt, you'll want to widen the empty <td> in that one by adding colspan="2" to that tag.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Changing Indentations

Postby sedrikk » Fri Jul 28, 2006 9:12 pm

Thanks. I made those changes and then made one more:

I added

style='padding-left: 20px'


To the cell for the alts name.

Now the alts are indented further than all the mains, which are all lined up. You can see the result here:

http://www.thereapersminions.com/roster ... AltMonitor
Last edited by sedrikk on Fri Jul 28, 2006 9:20 pm, edited 1 time in total.
ImageImage
User avatar
sedrikk
WR.net Apprentice
WR.net Apprentice
 
Posts: 30
Joined: Wed Jul 05, 2006 11:56 pm

Re: Changing Indentations

Postby mook » Mon Aug 14, 2006 10:35 pm

Could anyone possibly post a modified 'altlist.php' for download that incorporates these changes? I've been trying to mod it manually myself, but all I'm accomplishing is breaking the tables.

Much appreciated! :mrgreen:
mook
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Thu Jul 27, 2006 1:53 am

Re: Changing Indentations

Postby sedrikk » Mon Aug 14, 2006 11:38 pm

This is my altlist.php

It should have the changes.
Attachments
altlist.zip
altlist.php
(7.86 KiB) Downloaded 242 times
Last edited by sedrikk on Mon Aug 14, 2006 11:40 pm, edited 1 time in total.
ImageImage
User avatar
sedrikk
WR.net Apprentice
WR.net Apprentice
 
Posts: 30
Joined: Wed Jul 05, 2006 11:56 pm

Re: Changing Indentations

Postby mook » Tue Aug 15, 2006 1:07 am

Awesome Sedrikk, thank you - that worked like a charm!
mook
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Thu Jul 27, 2006 1:53 am


Return to AltMonitor

Who is online

Users browsing this forum: No registered users and 1 guest