phpBB Forum

It is currently Wed 23. May 2012, 10:02

All times are UTC + 1 hour

Forum rules


Hello dearest user and welcome to our EQDKP-Plus support forum.

Please read the following rules and terms before posting anything! Failure in doing so will result in being ignored or being banned. Posting in our boards means you have read, understood and accepted those rules.

English Board Rules – Click here



Post new topic Reply to topic  [ 8 posts ] 
Author Message
Offline
 Post subject: Leaderboard with 2 rows (12 classes each row)
PostPosted: Fri 1. Jul 2011, 19:12 

Joined: Fri 15. Apr 2011, 05:50
Posts: 5
Hello,

As the subject line says, I am looking for a way to modify the listmembers page to have two rows on the leaderboard with 12 classes in each row, I recently updated to the latest version and tried the leaderboard slider and don't like the look of it.

I tried searching as well and saw a few old posts asking the same question but none with answers by the look of it (at least none in the english forums).

Thanks in Advance



Top
 Profile  
 
Offline
 Post subject: Re: Leaderboard with 2 rows (12 classes each row)
PostPosted: Thu 14. Jul 2011, 19:45 

Joined: Fri 15. Apr 2011, 05:50
Posts: 5
Is there no one that has done this before or can point me to a site that has it? Figured it would be an easy fix



Top
 Profile  
 
Offline
 Post subject: Re: Leaderboard with 2 rows (12 classes each row)
PostPosted: Tue 19. Jul 2011, 01:19 

Joined: Fri 15. Apr 2011, 05:50
Posts: 5
Ok,

I didn't get any help on the site so I decided to look into it today (finally had some free time).

You can see the result at eq2dream.com/eqdkp (certain classes not showing because we don't have those classes on raids, hence being hidden).

The solution boiled downed to editing two files, maybe not the cleanest solution but it was a quick fix.

First file was eqdkp/pluskernel/include/dkplus.class.php, look for the following code and modify it:


global $eqdkp, $db, $tpl, $SID, $conf_plus, $htmlPlus, $filter, $dkpplus, $html, $pdc;

to

global $eqdkp, $db, $tpl, $SID, $conf_plus, $htmlPlus, $filter, $dkpplus, $html, $pdc, $columncountforme;

====================================================

// create the header row
$tpl->assign_block_vars('classheader_row', array(
'ICON' => get_ClassIcon($class_row['class_id']),
'ROW_CLASS' => $eqdkp->switch_row_class(),
'NAME_ENG' => get_classColorChecked($class_row['class_name']),
'NAME' => $class_row['class_name'],
'PERCENT' => 100/$clas_count,
'ROW' =>$eqdkp->switch_row_class(),
));
$j++;

to

$columncountforme++;
if($columncountforme < 13)
{
// create the header row
$tpl->assign_block_vars('classheader_row', array(
'ICON' => get_ClassIcon($class_row['class_id']),
'ROW_CLASS' => $eqdkp->switch_row_class(),
'NAME_ENG' => get_classColorChecked($class_row['class_name']),
'NAME' => $class_row['class_name'],
'PERCENT' => 100/$clas_count,
'ROW' =>$eqdkp->switch_row_class(),
));
$j++;
}else
{
// create the header row
$tpl->assign_block_vars('classheader_row_two', array(
'ICON' => get_ClassIcon($class_row['class_id']),
'ROW_CLASS' => $eqdkp->switch_row_class(),
'NAME_ENG' => get_classColorChecked($class_row['class_name']),
'NAME' => $class_row['class_name'],
'PERCENT' => 100/$clas_count,
'ROW' =>$eqdkp->switch_row_class(),
));
$j++;
}

=========================================================

}else
{
$tpl->assign_block_vars('classheader_row.classlist_row', array(
'NAME' => $row['rank_prefix'] . (( $row['member_status'] == '0' ) ? '<i>' . get_coloredLinkedName($row['member_name']) . '</i>' : get_coloredLinkedName($row['member_name'])) . $row['rank_suffix'],
'CURRENT' => runden($row['member_current']),
'C_CURRENT' => color_item(runden($row['member_current'])),
'U_VIEW_MEMBER' => 'viewmember.php' . $SID . '&amp;' . URI_NAME . '='.$row['member_name']));

$membercount++;
}

to

}else if($columncountforme < 13)
{
$tpl->assign_block_vars('classheader_row.classlist_row', array(
'NAME' => $row['rank_prefix'] . (( $row['member_status'] == '0' ) ? '<i>' . get_coloredLinkedName($row['member_name']) . '</i>' : get_coloredLinkedName($row['member_name'])) . $row['rank_suffix'],
'CURRENT' => runden($row['member_current']),
'C_CURRENT' => color_item(runden($row['member_current'])),
'U_VIEW_MEMBER' => 'viewmember.php' . $SID . '&amp;' . URI_NAME . '='.$row['member_name']));

$membercount++;
}else
{
$tpl->assign_block_vars('classheader_row_two.classlist_row', array(
'NAME' => $row['rank_prefix'] . (( $row['member_status'] == '0' ) ? '<i>' . get_coloredLinkedName($row['member_name']) . '</i>' : get_coloredLinkedName($row['member_name'])) . $row['rank_suffix'],
'CURRENT' => runden($row['member_current']),
'C_CURRENT' => color_item(runden($row['member_current'])),
'U_VIEW_MEMBER' => 'viewmember.php' . $SID . '&amp;' . URI_NAME . '='.$row['member_name']));

$membercount++;
}

second file is eqdkp/templates/default/listmembers_leaderboard.html

look for


<!-- BEGIN classheader_row -->
<td align="center" nowrap="nowrap" valign="top" class="{classheader_row.ROW_CLASS}">
<table width="100%" class="borderless" border="0" cellspacing="0" cellpadding="2">
<tr>
<th colspan="2"><a href='listmembers.php?s=&filter={classheader_row.NAME}' class="{classheader_row.NAME_ENG}" >{classheader_row.ICON} {classheader_row.NAME} </a></th>
</tr>
<!-- BEGIN classlist_row -->
<tr onmouseover="this.className='rowHover';" onmouseout="this.className='{classheader_row.classlist_row.NAME_ENG}';">
<td align="left"><a href="{classlist_row.U_VIEW_MEMBER}">{classheader_row.classlist_row.NAME}</a></td>
<td class="{classheader_row.classlist_row.C_CURRENT}" align="right">{classheader_row.classlist_row.CURRENT}</td>
</tr>
<!-- END classlist_row -->
</table>
</td>
<!-- END classheader_row -->
</tr>

and add after it


<tr>
<!-- BEGIN classheader_row_two -->
<td align="center" nowrap="nowrap" valign="top" class="{classheader_row_two.ROW_CLASS}">
<table width="100%" class="borderless" border="0" cellspacing="0" cellpadding="2">
<tr>
<th colspan="2"><a href='listmembers.php?s=&filter={classheader_row_two.NAME}' class="{classheader_row_two.NAME_ENG}" >{classheader_row_two.ICON} {classheader_row_two.NAME} </a></th>
</tr>
<!-- BEGIN classlist_row -->
<tr onmouseover="this.className='rowHover';" onmouseout="this.className='{classheader_row_two.classlist_row.NAME_ENG}';">
<td align="left"><a href="{classlist_row.U_VIEW_MEMBER}">{classheader_row_two.classlist_row.NAME}</a></td>
<td class="{classheader_row_two.classlist_row.C_CURRENT}" align="right">{classheader_row_two.classlist_row.CURRENT}</td>
</tr>
<!-- END classlist_row -->
</table>
</td>
<!-- END classheader_row_two -->
</tr>



Top
 Profile  
 
Offline
 Post subject: Re: Leaderboard with 2 rows (12 classes each row)
PostPosted: Mon 8. Aug 2011, 20:39 

Joined: Sat 7. Mar 2009, 07:36
Posts: 116
Just took a look at it. Nice work, just curious how it will look with 13 classes at the end of the year when Beastlord is added.



Top
 Profile  
 
Offline
 Post subject: Re: Leaderboard with 2 rows (12 classes each row)
PostPosted: Mon 8. Aug 2011, 22:35 

Joined: Fri 15. Apr 2011, 05:50
Posts: 5
will have to have 13 on the top or bottom row



Top
 Profile  
 
Offline
 Post subject: Re: Leaderboard with 2 rows (12 classes each row)
PostPosted: Mon 8. Aug 2011, 23:31 

Joined: Sat 7. Mar 2009, 07:36
Posts: 116
Actually I like this but I think i'm going to try to modify it to make 4 rows of 6 for now since I have the portal menu's that stretch the screen a bit. But thanks I could never have figured that one out on my own...



Top
 Profile  
 
Offline
 Post subject: Re: Leaderboard with 2 rows (12 classes each row)
PostPosted: Tue 9. Aug 2011, 06:44 

Joined: Sat 7. Mar 2009, 07:36
Posts: 116
K I gave up. No clue how to add a 3rd and 4th row lol.



Top
 Profile  
 
Offline
 Post subject: Re: Leaderboard with 2 rows (12 classes each row)
PostPosted: Tue 8. Nov 2011, 14:25 

Joined: Fri 8. Jul 2011, 22:45
Posts: 5
Is it possible to adapt this modification, it also works with multi-DKP?
That would be incredibly awesome.

Tia.



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

(C) The EQdkp-Plus Developer Team
EQdkp Plus Template by Ramon Kaes