Last visit was: less than a minute ago
It is currently 20 Jun 2013, 13:26
Exercitum
Forum rules
caution, make sure your links work. posts with invalid urls will be deleted.
caution, make sure your links work. posts with invalid urls will be deleted.
34 posts • Page 2 of 4 • 1, 2, 3, 4
- DorEli
- Posts: 19
- Joined: 14 Apr 2008, 15:09
Re: Exercitum
Nice one
A suggestion for the php-part to make it a little bit shorter ...
A suggestion for the php-part to make it a little bit shorter ...
- Code: Select all
$member_block = ($row['member_class'] == 'Death Knight') ? 'members_row_dk' : '';
$member_block = ($row['member_class'] == 'Druid') ? 'members_row_dru' : $member_block;
$member_block = ($row['member_class'] == 'Hunter') ? 'members_row_hunter' : $member_block;
$member_block = ($row['member_class'] == 'Mage') ? 'members_row_mag' : $member_block;
... add all classes ...
$template->assign_block_vars($member_block, array(
'LINK' => $site,
'SERVER' => $server,
'END' => $end,
'CLASS' => $row['member_class'],
'CLASSID' => $class[$row['member_class']],
'NAME' => $row['member_name'],
'PROFILE' => $row['member_name'],
'RACE' => $row['member_race'],
'RACEID' => $race[$row['member_race']],
'GNOTE' => $ra,
'LVL' => $row['member_level'],
'MAXLVLID' => $maxlvlid,
'GENDER' => $row['member_gender'],
'GENDERID' => $gender[$row['member_gender']]
));
- ircowmoo
- Posts: 6
- Joined: 18 Jan 2009, 12:45
Re: Exercitum
This looks great on your site! Ive been spending hours trying to customize mine similar to yours. I keep having problems with the way the players are sorted line by line though.
On the top line of each class, i may have 3 or 4 players, with the following line having 4 or 5, then the last line with 2 people. as an example,
DK 1 DK 2
DK 3 DK 4 DK 5 DK 6
Dk 7 DK 8 DK 9
Dru 1 Dru 2 Dru 3
Dru 4
Dru 5 Dru 6 Dru 7 Dru 8
Then the other issue I have is, the colums dont align from class to class.
Could you give us a copy of your full code for both roster.php and roster.html?
On the top line of each class, i may have 3 or 4 players, with the following line having 4 or 5, then the last line with 2 people. as an example,
DK 1 DK 2
DK 3 DK 4 DK 5 DK 6
Dk 7 DK 8 DK 9
Dru 1 Dru 2 Dru 3
Dru 4
Dru 5 Dru 6 Dru 7 Dru 8
Then the other issue I have is, the colums dont align from class to class.
Could you give us a copy of your full code for both roster.php and roster.html?
- ircowmoo
- Posts: 6
- Joined: 18 Jan 2009, 12:45
Re: Exercitum
Well i solved the problem of my items not lining up properly, I had a stray div in there centering one of the sections.
However I still have the main problem, where some lines dont add up properly. I have a theory, but have no idea where to look for an answer to fix it.
My theory is that the error comes from the previous line not being complete. I have it set to display 4 items per line. Because some classes only have say 3 members, or 7 etc, numbers other than 4, those lines are not complete.
so what I am seeing is as follows.
DK1 DK2 DK3 DK4
DK5 DK6 DK7
DRU1
DRU2 DRU3 DRU4 DRU5
DRU6
HUN1 HUN2 HUN3
HUN4 HUN5 HUN6 HUN7
Hopefully you see the pattern there. when a line is less than four, it attempts to finish that string in the next line, only displaying the amount left out from the above line.
Now this is only when I sort by class, should I choose to sort by name, lvl, or rank, it messes up even more!
anyway if youd like to see, ive been working on a test forum, so nothing for the style is really complete yet lol.
However I still have the main problem, where some lines dont add up properly. I have a theory, but have no idea where to look for an answer to fix it.
My theory is that the error comes from the previous line not being complete. I have it set to display 4 items per line. Because some classes only have say 3 members, or 7 etc, numbers other than 4, those lines are not complete.
so what I am seeing is as follows.
DK1 DK2 DK3 DK4
DK5 DK6 DK7
DRU1
DRU2 DRU3 DRU4 DRU5
DRU6
HUN1 HUN2 HUN3
HUN4 HUN5 HUN6 HUN7
Hopefully you see the pattern there. when a line is less than four, it attempts to finish that string in the next line, only displaying the amount left out from the above line.
Now this is only when I sort by class, should I choose to sort by name, lvl, or rank, it messes up even more!
anyway if youd like to see, ive been working on a test forum, so nothing for the style is really complete yet lol.
- DorEli
- Posts: 19
- Joined: 14 Apr 2008, 15:09
Re: Exercitum
ircowmoo wrote:DK1 DK2 DK3 DK4
DK5 DK6 DK7
DRU1
DRU2 DRU3 DRU4 DRU5
DRU6
HUN1 HUN2 HUN3
HUN4 HUN5 HUN6 HUN7
With the code from above/bbdkp only total members are counted - not grouped and counted by class, thats the problem ...
You have to move the data to an array an build the template from this instead of building template-output within the while-loop ...
Example ... phph-part I:
- Code: Select all
$roster_ary[$class_id][] = array(
'name' => $name,
'level' => $level,
'img' => $img_portrait,
'link1' => $link_armory,
'link2' => $link_char,
'count' => $totalmembers,
);
php-part II ... I makes no sense to post my code, because it very different to bbdkp ones ... http://wiki.phpbb.com/Template.assign_b ... ted_blocks should help
After the while-loop split the array and build the template ...
- Code: Select all
foreach ($roster_ary as $rclass_id => $rclass_ary)
{
$template->assign_block_vars('block1', array(
'HEADER' => ... output class-names here ...
));
foreach ($rclass_ary as $key => $char)
{
$key = ++$key;
$template->assign_block_vars('block1.block2', array(
... output char data here ...
'END' => ($key % $num_cols == 0) ? '</tr><tr>' : false,
));
My template looks like this ...
- Code: Select all
<div class="tt1">
<!-- BEGIN block1 -->
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<thead>
<tr>
<th colspan="{CSS_COLSPAN}"><h3 style="text-align: left;">{block1.HEADER}</h3></th>
</tr>
</thead>
<tbody>
<tr>
<!-- BEGIN block2 -->
<td class="sw64 <!-- IF block1.block2.S_ROW_COUNT is even -->bg2<!-- ELSE -->bg3<!-- ENDIF -->" align="center">
<a href="{block1.block2.U_ARSENAL_LINK}">{block1.block2.IMG}</a>
</td>
<td class="<!-- IF block1.block2.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg3<!-- ENDIF -->" align="center" style="width: {CSS_COLWIDTH}%;"><!-- {block1.block2.CHARNUMBER}. --><span style="font-size: 14px"><a href="{block1.block2.U_CHAR_LINK}"><strong>{block1.block2.NAME}</strong></a></span><br />Level {block1.block2.LEVEL}<br /></td>
<!-- IF not block1.block2.S_LAST_ROW -->{block1.block2.END}<!-- ENDIF -->
<!-- END block2 -->
</tr>
</tbody>
</table>
<!-- END block1 -->
</div>
- Znuff
Re: Exercitum
Hi there!
Any chance you could release the icon package you use there?
I'm loving those 20x20 px icons.
Any chance you could release the icon package you use there?
I'm loving those 20x20 px icons.
- Oougly
- Posts: 24
- Joined: 20 Oct 2008, 16:03
Re: Exercitum
Updated to RC1, including new style, shoutbox and self auth apply mod.
Read the First Post for more details.
Read the First Post for more details.
- Ocnarian
- Posts: 38
- Joined: 19 Nov 2008, 18:19
- Oougly
- Posts: 24
- Joined: 20 Oct 2008, 16:03
Re: Exercitum
I've been updating the website a little, still loads to do though! got to style the forum, roster and dkp pages, I'm also adding in a gallery and video section soon.
- Blazeflack
- Posts: 954
- Joined: 21 Mar 2009, 22:02
Re: Exercitum
Looks really awesome.
Please don't PM me for support. Create a new topic with your question, this way everyone gains from the information shared.
34 posts • Page 2 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: Internet Archive [Bot] and 0 guests
-
- Advertisement