Happu Birthday pop-up message - stopped by pop up blockers

Mod that adds a birthday field to the users profile, theire age are displayed beside the posts, and on there birthday they will have a greeting popup
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Happu Birthday pop-up message - stopped by pop up blockers

Postby ChristianR on Mon 17. Jan, 2005 13:38

Anyway to stop this from happening?

or change of code to allow it to pop up?
ChristianR
Poster
Poster
 
Posts: 47
Joined: Sun 18. Jan, 2004 14:17

Postby danko on Mon 04. Jul, 2005 19:17

when a user with an birtday log in on the forum the user_next_birthday_greeting is updatet to the next year. If that user has an popupblocker, he wil see that the some popup is blocked. but if he enabel popups for your forum he won't see that popup again (because user_next_birthday_greeting has allready been updates)

If a user is noticed that an popup is blocked he has the possibillity to enable popups for your forum, when you change this the user will see the popup because the user_next_birthday_greeting is not updates, it wil be updates if the popup is really loaded and not blocked by an popupblocker.

not really an sollution but it is better then how it was.

(sorry for my english...)

Code: Select all
#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php


#
#-----[ FIND & REMOVE ]------------------------------------------------
#
   $sql = "UPDATE " . USERS_TABLE . "
      SET user_next_birthday_greeting = " . (create_date('Y', time(), $board_config['board_timezone'])+1) . "
      WHERE user_id = " . $userdata['user_id'];
   if( !$status = $db->sql_query($sql) )
   {
   message_die(GENERAL_ERROR, "Could not update next_birthday_greeting for user.", "", __LINE__, __FILE__, $sql);
   }


#
#-----[ OPEN ]------------------------------------------------
#
birthday_popup.php


#
#-----[ FIND ]------------------------------------------------
#
//
// End session management
//


#
#-----[ AFTER, ADD ]------------------------------------------
#
// update user_next_birthday_greeting
if ( $userdata['user_birthday']!=999999 && $board_config['birthday_greeting'] && create_date('Ymd', time(), $board_config['board_timezone'])  >= $userdata['user_next_birthday_greeting'].realdate ('md',$userdata['user_birthday'] ) )
{
   $sql = "UPDATE " . USERS_TABLE . "
      SET user_next_birthday_greeting = " . (create_date('Y', time(), $board_config['board_timezone'])+1) . "
      WHERE user_id = " . $userdata['user_id'];
   if( !$status = $db->sql_query($sql) )
   {
   message_die(GENERAL_ERROR, "Could not update next_birthday_greeting for user.", "", __LINE__, __FILE__, $sql);
   }
}


#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
danko
Poster
Poster
 
Posts: 3
Joined: Fri 28. Nov, 2003 23:00


Return to Birthday [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron