More detailed logs and more frequent names

If you've programmed a new HuMo-genealogy feature (that you'd like to see included in the official version), please upload and describe your work here.
Post Reply
dani

More detailed logs and more frequent names

Post by dani »

Some may find these tweaks handy:

- To show more than 5 frequent lastnames in the main page:
on file include/mainindex_cls.php
change the number '5' in line:
$persoonqry="SELECT pers_lastname, pers_prefix,
CONCAT(pers_prefix,pers_lastname) as totaalnaam, count(pers_lastname) as aantal
FROM ".veilig($_SESSION['tree_prefix'])."person
WHERE pers_lastname NOT LIKE ''
AND pers_lastname != 'doodgeboren kind'
GROUP BY totaalnaam ORDER BY aantal DESC LIMIT 0,5";
- To keep IP addresses of visitors and whether they are regular users or administrators:
on file header.php
modify this line as shown:

Code: Select all

$sql="INSERT INTO humo_user_log SET log_date='".date("Y-m-d H:i")."', log_username='".veilig($_POST["username"])." U ".$_SERVER[REMOTE_ADDR]."'";
and on file admin/include/login.php
modify this line:

Code: Select all

$sql="INSERT INTO humo_user_log SET log_date='$datum', log_username='".veilig($_POST["username"])." A ".$_SERVER[REMOTE_ADDR]."'";
I initially put USER and ADMIN, but replaced it with U and A because the database field is not too long, so a long username may truncate the end of the IP.

Cheers
Post Reply