The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Group Messages possible?
#1
Hi!
I wonder if it is possible to tweak the message system for group threads/messages.

I already modified the messages.php and wrote a function which allows me to send messages to user groups. That wasn't too difficult. But the downside is (btw the same as if the admin sends a mass message), that the same message to every group member appears in my message-box. If someone replys he just replys to the one who wrote the message.

My purpose: Teachers should be able to send messages to classes. Therefore I've got a database named "klassen" (classes) which contains every class. The user administration (a separate permission level) manually creates the students accounts which are not only inserted in the "users" table but also in a table called "u_schueler" (u_students). This table contains the user_id (id from the users table), username, the fname/lname and the class the student visits.

At the moment it is enough for teachers to send messages to classes (I don't need messages between teachers or students). So I disabled the reply function for the students (with the super useful hasPerm function). But with 30 students per classes the message box for teachers gets rapidly unorganized.

Here is the code which works for me: https://hastebin.com/ocotesiyeq.bash

I know that it's not the best programming style but I started coding in the last two weeks. Some days ago I didn't even knew what MYSQL is. My main goal is that it works - the beauty comes with the experience

So all in all my main goal is achieved: Teachers can send group messages to a classes. My next goal is to reduce the ~30 messages in his message box, every time he does that. Does somebody have any idea which steps are needed? I'm not asking for a complete guide or code - all I need is some input/ideas where to start or which structure needs to be modified.

Have a nice day Smile
  Reply


Messages In This Thread
Group Messages possible? - by s.farg - 02-14-2018, 06:07 PM
Group Messages possible? - by Brandin - 02-17-2018, 08:39 PM
Group Messages possible? - by s.farg - 02-17-2018, 10:50 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)