DISCUZ changes the group posting system to remind the Member icationication_add to send the notification prompt function

Source: Internet
Author: User
DISCUZ change group posting system alert member icationication_add send notification function notification_add ($ touid, $ type, $ note, $ notevarsarray (), $ system0) $ touid: who to send? $ Type: method? Commonly used is post $ note: you can edit the content by yourself. $ notevars DISCUZ changes the group posting system and reminds the member icationication_add to send the notification prompt function.

Notification_add ($ touid, $ type, $ note, $ notevars = array (), $ system = 0)

$ Touid: Who is the sender?

$ Type: method? Usually post

$ Note: you can edit the content yourself.

$ Notevars = some content parameters

$ System = 0 by default

Add the following code to line 3 of the souse/class/module/module_forum_thread.php file.

If ($ this-> param ['isgroup'] = 1 ){
$ Bt = $ this-> param ['subobject'];
$ Querys = DB: fetch_all ('select * from pre_forum_groupuser wherefid = '. $ this-> forum ['fid']);
Foreach ($ querysas $ arr ){
Notification_add ($ arr ['uid'], 'system', $ author. 'Published :'. $ bt, array ('from _ id' => 0, 'from _ idtype' => 'sendnotice '), 1 );
}
}

Effect: If any member of the group posts in the group, all the members of the group will receive a system reminder and receive a system reminder.

Author: If you have any questions, add them to the group.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.