Welcome to Geeklog, Anonymous Tuesday, April 16 2024 @ 07:53 pm EDT

Geeklog Forums

event notification


Anonymous

Anonymous
ok i have created this peace of code.. to email you a reminder on an even but only on a personal event.. for now.. its good enough... but there is only one thing that i am fixing and that is to only get 1 or 2 email im on that right now.. but anyways.. here add this code to your lib-custom.php and add a block in your site.. <code> function phpblock_getpevent(){ global $MSG; //Check to see if there are any Events in gl_personal_events $sql = mysql_query("SELECT count(uid) FROM gl_personal_events WHERE uid='$_USER[uid]'"Wink; WHILE ($num = mysql_fetch_assoc($sql)){ $evt = $num['uid']; } if ($ent != '0'){ $today = date(" Y-m-d "Wink; $sql = "SELECT * FROM gl_personal_events WHERE datestart= '$today'"; $result = mysql_query($sql); WHILE ($row = mysql_fetch_ASSOC($result)){ $id = $row['uid']; $title = $row['title']; $event_type = $row['event_type']; $datestart = $row['datestart']; $dateend = $row['dateend']; $address1 = $row['address1']; $address2 = $row['address2']; $city = $row['city']; $state = $row['state']; $zipcode = $row['zipcode']; $allday = $row['allday']; $url = $row['url']; $description = $row['description']; $group_id = $row['group_id']; $owner_id = $row['owner_id']; $perm_owner = $row['perm_owner']; $perm_group = $row['perm_group']; $perm_members = $row['perm_members']; $perm_anon = $row['perm_anon']; $location = $row['location']; $timestart = $row['timestart']; $timeend = $row['timeend']; } //Checking date for datastart if($today) { //If num of rows are not empty if($num = mysql_num_rows($result) != '0'){ $A = mysql_query("SELECT email FROM gl_users WHERE uid='$id'"Wink; while($L = mysql_fetch_array($A)){ $email = $L['email']; } $reminder .= "This is just a reminder of your Personal eventnEvent status:n" . $title . "n" . $datestart . "n" . $address1 ."n" . $event_type . "n"; //Send email reminder $mail($email, "Event reminder", $reminder); $MSG .= "event remeindern(check your calender for the reminder)"; } return $MSG; } } } </code>
 Quote

Anonymous

Anonymous
Interesting, I was looking for a very similar feature. Unfortunately I'm really looking for an user configurable event notification system(because I can't remember $*!&Wink. I want to be able to define when I receive email reminders. see http://chronoss.sourceforge.net/ for a nice example. Not that this helps your project any...
 Quote

All times are EDT. The time is now 07:53 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content