firefly, I'm almost there, byt placing the code right before loading the header template breaks the following:
1) logged out users cannot log-in
2) new users that have just registered cannot log in.
other than that; the code (for registered users) who have not logged out works great.
here's my code; do you have any ideas?
PHP Code:
// begin hack for testing when last photo was posted compared to last date user visited site
$fbmenu='';
eval("\$fbmenu = \"".gettemplate('fb_menu')."\";");
echo $userlastvisit;
$user=$DB_site->query_first("SELECT * FROM user WHERE userid=$bbuserinfo[userid]");
$username=$user[username];
$userlastvisit=$user['lastvisit'];
$db1name = "PhotoPost_info";
$link_id = mysql_connect($servername, $dbusername, $dbpassword);
mysql_select_db($db1name, $link_id);
$result = mysql_query("SELECT max(photos.date) as lastphoto from photos");
while($query_data = mysql_fetch_row($result)) { $lastphoto = $query_data[0]; }
mysql_select_db($dbname);
if ($lastphoto < $userlastvisit) {
eval("\$fbmenu = \"".gettemplate('fb_menu')."\";");
} else {
eval("\$fbmenu = \"".gettemplate('fb_menu1')."\";");
}
// end hack