Page 1 of 1
OBBLM question Leader Box
Posted: Tue Aug 04, 2015 6:47 am
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)
Re: OBBLM question Leader Box
Posted: Tue Aug 04, 2015 9:16 pm
by Shteve0
Hi!
Please copy your leader boxes section of the localsettings file here? I'll take a look.
Re: OBBLM question Leader Box
Posted: Wed Aug 05, 2015 12:39 pm
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?
),
);
Re: OBBLM question Leader Box
Posted: Wed Aug 05, 2015 8:24 pm
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...?
Re: OBBLM question Leader Box
Posted: Thu Aug 06, 2015 6:03 am
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!
Re: OBBLM question Leader Box
Posted: Thu Aug 06, 2015 9:38 am
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
Re: OBBLM question Leader Box
Posted: Fri Aug 07, 2015 10:47 am
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?
Re: OBBLM question Leader Box
Posted: Fri Aug 07, 2015 6:04 pm
by funnyfingers
What is the page that gives you the error?
OBBLM question Leader Box
Posted: Fri Aug 07, 2015 10:24 pm
by Sainthropee
funnyfingers wrote:What is the page that gives you the error?
When I used Plugins, League Tables page
Re: OBBLM question Leader Box
Posted: Fri Sep 18, 2015 2:37 pm
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