No lines separating whitelist blacklist entries

Report bugs and workarounds
Post Reply
cyberwired
Posts: 33
Joined: 03 Jan 2014 21:57

No lines separating whitelist blacklist entries

Post by cyberwired »

Something that needs updating, really need a line between each entry on the whitelist and blacklist
I just went to delete something and its difficult to line up what you want to delete and the correct entry
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: No lines separating whitelist blacklist entries

Post by shawniverson »

I agree. I'll post an enhancement to git.

I am also wondering about adding some alternating background colors to really set them apart.
cyberwired
Posts: 33
Joined: 03 Jan 2014 21:57

Re: No lines separating whitelist blacklist entries

Post by cyberwired »

Yeah that would be good, could really start making it nice and have an onhover or onmouseover and highlight the line when you mouse over :)
buzzzo
Posts: 94
Joined: 03 Feb 2014 09:09

Re: No lines separating whitelist blacklist entries

Post by buzzzo »

very easy:

First cp /var/www/html/mailscanner/lists.php /var/www/html/mailscanner/lists.php.bak <--- BACKUP

Then edit lists.php
Put on the top just after html_start("Whitelist/Blacklist",0,false,false);
the following:

(These are the two colours you would like to use in the rows )

Code: Select all


$bgcolor1 = "#BDBDBD";
$bgcolor2 = "#D8D8D8" ;

Next modify the function build_table as follow:

Add just after function build_table($sql,$list) :

Code: Select all


 global $bgcolor1,$bgcolor2;

And then replace the while code with:

Code: Select all

 while($row=mysql_fetch_row($sth)) {
    $i++;
    $bgcolor= ( $i %2 == 0 ) ? $bgcolor1 : $bgcolor2  ;
   echo ' <tr>'."\n";
   echo '  <td bgcolor='.$bgcolor.'>'.$row[1] . '</td>'."\n";
   echo '  <td bgcolor='.$bgcolor.'>'.$row[2].'</td>'."\n";
   echo '  <td bgcolor='.$bgcolor.'><a href="'.$_SERVER['PHP_SELF'].'?submit=Delete&id='.$row[0].'&to='.$row[2].'&list='.$list.'">Delete</a><td>'."\n";
   echo ' </tr>'."\n";
  }
cyberwired
Posts: 33
Joined: 03 Jan 2014 21:57

Re: No lines separating whitelist blacklist entries

Post by cyberwired »

Fantastic cheers

shawniverson: something to add to next version?
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: No lines separating whitelist blacklist entries

Post by shawniverson »

Awesome, will add this and recommend change to upstream mailwatch devs....

https://github.com/E-F-A/v3/issues/57
Post Reply