Menu

#25 Notification about new topic

v2,_Trinity
open
nobody
6
2003-04-13
2003-01-28
Anonymous
No

It would be great to have a possibility to recive
notification about new topics in board. This might be
helpfull for moderators.

For users this may be turned on/off by administrator.

Discussion

  • David Recordon

    David Recordon - 2003-02-02
    • priority: 5 --> 6
     
  • David Recordon

    David Recordon - 2003-04-13
    • milestone: --> v2,_Trinity
     
  • Nobody/Anonymous

    Logged In: NO

    I added this (untidy) code in the post.php 1.5.2 in function
    post2 at the end of the loop "if (newtopic)...

    $request = mysql_query("
    SELECT b.ID_BOARD as bid, b.name as bname,
    c.ID_CAT as cid, c.memberGroups, c.name as cname,
    b.isAnnouncement
    FROM {$db_prefix}boards as b, {$db_prefix}
    categories as c
    WHERE (b.ID_BOARD = $board
    AND b.ID_CAT=c.ID_CAT)") or
    database_error(__FILE__, __LINE__);

    if \(mysql\_num\_rows\($request\) == 0\)
        fatal\_error\($txt\['yse232'\]\);
    
    $bcinfo = mysql\_fetch\_array\($request\);
    $curcat = $bcinfo\['cid'\];
    $cat = $bcinfo\['cname'\];
    $currentboard = $bcinfo\['bid'\];
    $boardname = $bcinfo\['bname'\];
    

    // BOARD ID END

    //Now loop through all the members
    $subject = New
    message: ' . $cat . ' - ' . $boardname;
    $body = 'A New Message
    has been posted to the ' . $cat . ' - ' . $boardname . 'Board.
    ';
    $body .= "
    @ https://your.website.com/YaBB/index.php?board=" .
    $board . ";action=display;threadid=" . $threadid . ";start=new";
    $body .= '
    ==================== Message
    ====================
    ';
    $body .= $mailmessage;
    $body .= '
    ==================== Message
    ====================
    ';
    $body .= 'Regards,
    ';
    $body .= "The Management.
    ";
    $body .= "
    ";
    $body .= "Note: This email
    comes from a post-only account.
    ";
    $members = mysql_query("
    SELECT
    realName,emailAddress
    FROM {$db_prefix}members
    WHERE ID_MEMBER != '1'
    AND
    emailAddress != ''
    AND
    ID_MEMBER != $ID_MEMBER
    ") or
    database_error(__FILE__, __LINE__);

            while \($rowmember =
    

    mysql_fetch_array($members))
    {
    $bodystart = "Notification
    for " . $rowmember['realName'] . "
    ";

    $mailfrom=$webmaster\_email;
            $mailbody = $bodystart .
    

    $body;
    // sendmail($rowmember
    ['emailAddress'],$subject,$mailbody,$mailfrom);
    }
    }
    }

     

Log in to post a comment.