OBBLM question Leader Box

However you play online - Java, Vassal, Email, Cyanide etc - talk about it here.
This is also the place for discussing the various tools for managing leagues, teams and so on.

Moderator: TFF Mods

Post Reply
User avatar
Sainthropee
Experienced
Experienced
Posts: 145
Joined: Sun Sep 07, 2014 10:32 am

OBBLM question Leader Box

Post by Sainthropee »

Hi!

I new in Obblm manage, i would like to put in most casualties box, the killed, bh and si for each player.

I'll try to put in leader boxes like a new field, but is not working... :|

Thanks for your help

Ps another question, I made some new CSS files, but only apply changes if I not logged in the page...(i have individual css template for every league in league settings locale)

Reason: ''
User avatar
Shteve0
Legend
Legend
Posts: 2479
Joined: Thu May 07, 2009 10:15 am
Location: Wellington, New Zealand

Re: OBBLM question Leader Box

Post by Shteve0 »

Hi!

Please copy your leader boxes section of the localsettings file here? I'll take a look.

Reason: ''
League and tournament hosting, blogging and individual forums - all totally free. For the most immersive tabletop sports community experience around, check out theendzone.co
User avatar
Sainthropee
Experienced
Experienced
Posts: 145
Joined: Sun Sep 07, 2014 10:32 am

Re: OBBLM question Leader Box

Post by Sainthropee »

This is a exemple of my leader boxes.

I'll try to put more fields, but I don't know how.

Thanks in advance Steve


********************* * Front page: leaders boxes
*********************/

$settings['fp_leaders'] = array(
# Please note: You can NOT make expressions out of leader fields e.g.: 'field' => 'cas+td'
# This will display a 'most CAS' player leaders box for the node (league, division or tournament) with ID = 6
array( 'id' => 6, # Node ID 'box_ID' => 3,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'league', # This sets the node to be a tournament. I.e. this will make a leaders box for the tournament with ID = 6
'title' => 'Los mas carniceros', # Table title
'field' => 'cas', # CAS
'length' => 3, # Number of entries in table
'show_team' => true, # Show player's team name?
),
);

Reason: ''
User avatar
Shteve0
Legend
Legend
Posts: 2479
Joined: Thu May 07, 2009 10:15 am
Location: Wellington, New Zealand

Re: OBBLM question Leader Box

Post by Shteve0 »

Ah, I see - sorry. I thought you wanted to add more boxes, but I can see now you want to add new stat columns within an existing leader box.

That's a lot trickier. Currently player leader boxes are only set up to include (and sort by) one field, so we'd first need to change the way fp_leader boxes are created in the sections.php file, then go back to all of your existing leader boxes and redefine the fields; but I'm getting a fair way out of my comfort zone here and while I could take a guess at how to do that I couldn't say for sure what the downstream impacts might be.

I assume you're not interested in having three boxes for this...?

Reason: ''
League and tournament hosting, blogging and individual forums - all totally free. For the most immersive tabletop sports community experience around, check out theendzone.co
User avatar
Sainthropee
Experienced
Experienced
Posts: 145
Joined: Sun Sep 07, 2014 10:32 am

Re: OBBLM question Leader Box

Post by Sainthropee »

Shteve0 wrote:Ah, I see - sorry. I thought you wanted to add more boxes, but I can see now you want to add new stat columns within an existing leader box.

That's a lot trickier. Currently player leader boxes are only set up to include (and sort by) one field, so we'd first need to change the way fp_leader boxes are created in the sections.php file, then go back to all of your existing leader boxes and redefine the fields; but I'm getting a fair way out of my comfort zone here and while I could take a guess at how to do that I couldn't say for sure what the downstream impacts might be.

I assume you're not interested in having three boxes for this...?
Hi!

I figured out that would be difficult.... and yes, i would like only one leader box with all casualties stats.

I'll take a look in those files.

The other option, is see if in standings boxes if possible to changes teams for players, but I think that will be tricky too.

thanks Steve!

Reason: ''
User avatar
Sainthropee
Experienced
Experienced
Posts: 145
Joined: Sun Sep 07, 2014 10:32 am

Re: OBBLM question Leader Box

Post by Sainthropee »

@steve and the question about css, when I not logged in the page, each league (http://www.yejabb.hol.es) has different stylesheet, but when I log to the page, all leagues have the same stylesheet.
league 3 login vs log out.JPG
log out is in the left, log in is on right

This have any solution? I want to see the same format for every league, with log and without logging in the page
You do not have the required permissions to view the files attached to this post.

Reason: ''
User avatar
Sainthropee
Experienced
Experienced
Posts: 145
Joined: Sun Sep 07, 2014 10:32 am

Re: OBBLM question Leader Box

Post by Sainthropee »

another problem

I have this error
Warning: Division by zero in ...../class_stats.php on line 187

The code is

if (empty($N)) {
$LIMIT = "";
}
else {
$delta = $N[1];
$page = $N[0]-1; # Page 1 should in MySQL be page 0.
$LIMIT = "LIMIT ".($page*$delta).",$delta";
}

$query .= "
GROUP BY ".$relations_obj[$obj]['id']."
".((!empty($HAVING)) ? ' HAVING '.implode(' AND ', $HAVING) : '')."
".((!empty($sortRule)) ? ' ORDER BY '.implode(', ', $sortRule) : '')."
$LIMIT";

# echo $query;
# return;

$ret = array();
if (($result = mysql_query($query)) && is_resource($result) && mysql_num_rows($result) > 0) {
while ($r = mysql_fetch_assoc($result)) {
array_push($ret, $r);
}
}

if (!empty($N)) {
$query_cnt = str_replace($LIMIT, '', $query);
$result = mysql_query($query_cnt);
$pages = ceil(mysql_num_rows($result)/$delta); (this is line 187)
}
else {
$pages = 1;
}

return array($ret, $pages);
}

any ideas?

Reason: ''
funnyfingers
Emerging Star
Emerging Star
Posts: 418
Joined: Tue Jul 14, 2009 8:41 pm
Contact:

Re: OBBLM question Leader Box

Post by funnyfingers »

What is the page that gives you the error?

Reason: ''
Webhosting with the latest version of OBBLM installed: OBBLM Web Hosting (be sure to choose the OBBLM tab)
User avatar
Sainthropee
Experienced
Experienced
Posts: 145
Joined: Sun Sep 07, 2014 10:32 am

OBBLM question Leader Box

Post by Sainthropee »

funnyfingers wrote:What is the page that gives you the error?
When I used Plugins, League Tables page

Reason: ''
kynoppy
Rookie
Rookie
Posts: 1
Joined: Thu Apr 25, 2013 7:58 am

Re: OBBLM question Leader Box

Post by kynoppy »

Sainthropee wrote:another problem

I have this error
Warning: Division by zero in ...../class_stats.php on line 187

The code is

if (empty($N)) {
$LIMIT = "";
}
else {
$delta = $N[1];
$page = $N[0]-1; # Page 1 should in MySQL be page 0.
$LIMIT = "LIMIT ".($page*$delta).",$delta";
}

$query .= "
GROUP BY ".$relations_obj[$obj]['id']."
".((!empty($HAVING)) ? ' HAVING '.implode(' AND ', $HAVING) : '')."
".((!empty($sortRule)) ? ' ORDER BY '.implode(', ', $sortRule) : '')."
$LIMIT";

# echo $query;
# return;

$ret = array();
if (($result = mysql_query($query)) && is_resource($result) && mysql_num_rows($result) > 0) {
while ($r = mysql_fetch_assoc($result)) {
array_push($ret, $r);
}
}

if (!empty($N)) {
$query_cnt = str_replace($LIMIT, '', $query);
$result = mysql_query($query_cnt);
$pages = ceil(mysql_num_rows($result)/$delta); (this is line 187)
}
else {
$pages = 1;
}

return array($ret, $pages);
}

any ideas?
same error here!
when i launch plugins/league tables obblm respond me with a dvision by zero error in class_stats.php on line 187
league tables is module class_leaguetables.php

Reason: ''
Post Reply