FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » How to include ALL of text in email notifications to those subscribed to a topic?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to include ALL of text in email notifications to those subscribed to a topic? [message #33328 is a reply to message #31787] Sat, 26 August 2006 22:47 Go to previous messageGo to previous message
ky@smi is currently offline  ky@smi   Denmark
Messages: 27
Registered: June 2006
Karma:
Junior Member
Hi Again,
Please disregard the question about how to view queries. I got mysql query browser to work.

I've been going through the sql queries from the /* send new thread notifications to forum subscribers */

$c = uq('SELECT u.email, u.icq, u.users_opt
FROM phpgw_fud_forum_notify fn
INNER JOIN phpgw_fud_users u ON fn.user_id=u.id
LEFT JOIN phpgw_fud_forum_read r ON r.forum_id=fn.forum_id AND r.user_id=fn.user_id
INNER JOIN phpgw_fud_group_cache g1 ON g1.user_id=2147483647 AND g1.resource_id='.$mtf->forum_id.'
LEFT JOIN phpgw_fud_group_cache g2 ON g2.user_id=fn.user_id AND g2.resource_id='.$mtf->forum_id.'
WHERE
fn.forum_id='.$mtf->forum_id.' AND fn.user_id!='.(int)$mtf->poster_id.'
AND (CASE WHEN (r.last_view IS NULL AND (u.last_read=0 OR u.last_read >= '.$mtf->frm_last_post_date.')) OR r.last_view > '.$mtf->frm_last_post_date.' THEN 1 ELSE 0 END)=1
AND ((CASE WHEN g2.id IS NOT NULL THEN g2.group_cache_opt ELSE g1.group_cache_opt END) & 2) > 0');

and found that excluding
AND (CASE WHEN (r.last_view IS NULL AND (u.last_read=0 OR u.last_read >= '.$mtf->frm_last_post_date.')) OR r.last_view > '.$mtf->frm_last_post_date.' THEN 1 ELSE 0 END)=1 AND ((CASE WHEN g2.id IS NOT NULL THEN g2.group_cache_opt ELSE g1.group_cache_opt END) & 2) > 0

gives me the correct list. The list goes wrong when

AND (CASE WHEN... ELSE 0 END)=1 is included.

The full version of Fudforum doesn't run this if smart notifications is disabled.

I don't understand the above. When someone posts a new topic, the r.last_view is never null because it immediately comes up in the next window that the poster sees.

Also, I don't understand
r.last_view > '.$mtf->frm_last_post_date.'
Can I interpret this as
if the last view of the thread is after the last post date in the forum, then TRUE?

Am I making an error in interpretation here?

RE:the 2nd half of the filter, what is the g2.group_cache supposed to do?
[Message index]
 
Read Message icon5.gif
Read Message
Read Message icon5.gif
Read Message
Read Message icon5.gif
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Signature doesn't show up when i post through mail
Next Topic: Posting and reading by email
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 21:26:21 GMT 2024

Total time taken to generate the page: 0.06265 seconds