forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: jesusarmy on January 08, 2008, 02:37:33 pm

Title: Buddy manager bugfix
Post by: jesusarmy on January 08, 2008, 02:37:33 pm
I hope it's OK to post this here. I guess there must be some instructions on bug reports, but I really can't find them :-(

1. The buddy manager meta refresh pages don't display gracefully, as they show the main buddy manage page as well as the notifications. Depending on the custom theme, that may result in headers being shown halfway down the page. To fix this, in buddy_manage.php, find:

Code: [Select]
pagefooter();replace (10* times) with:

Code: [Select]
pagefooter();ob_end_flush();die();
*That is, every time except the last one, 2 or 3 lines just before the end.

2. The second "form" doesn't terminate if there are no buddies. This potentially affects the display of the footer (for example, I have language and theme select forms at the bottom of the page). Also, the "select all" check box doesn't work, as the second form starts after the check box.

Find:
Code: [Select]
if ($tot_view[$view] == 0) { // if no buddies in this box we don't need the check/ uncheck all box in the toptable header
$display_checkall = "";
} else {
$display_checkall = <<<EOT
<span class="smallfont" style="float:right">
<label for="checkall_all">
$lang_buddy[users]: <strong>$total</strong>
<input type="checkbox" name="allbox" id="checkall_all"  onclick="checkBoxes(this.form, this.checked)">
</label>
</span>
EOT;
}



echo <<<EOT
<form action="buddy_manage.php" method="post" name="form">

Change to:

Code: [Select]
if ($tot_view[$view] == 0) { // if no buddies in this box we don't need the check/ uncheck all box in the toptable header
$display_checkall = "";
} else {
$display_checkall = <<<EOT
<form action="buddy_manage.php" method="post" name="form">
<span class="smallfont" style="float:right">
<label for="checkall_all">
$lang_buddy[users]: <strong>$total</strong>
<input type="checkbox" name="allbox" id="checkall_all"  onclick="checkBoxes(this.form, this.checked)">
</label>
</span>
EOT;
}



echo <<<EOT
Title: Re: Buddy manager bugfix
Post by: Stramm on January 08, 2008, 03:11:37 pm
Thank you ;)