× 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
Messaging System Mods
#1
Hello!

I made a few changes to the Messaging System I hope you like. As I change it I will post updates.

Please include Jwerty to handle the shortcuts I included:
https://github.com/keithamus/jwerty

Code:
message.php
https://hastebin.com/ikewopizar.xml

Code:
messages.php
https://hastebin.com/ayulakuqol.xml

And your custom function additions:
https://hastebin.com/gucezulubo.php

Alter your table to have a archive_from and archive_to:
https://hastebin.com/wofomizeci.sql

Code:
fetchMessageUsers
lets you define exclusions for users - I have user ID 1 and 30 (default sysadmin and Guest User in my system). You can remove these by editing the function or what have you.

Code:
archiveThreads
lets you mark the archive in threads, allows allows unarchive. Value of 0 is unarchived, value of 1 is archived.

Code:
messageUser
lets you send a System Message to a user, for example through an automated script or such, you can integrate it however you want.

Enjoy!
  Reply
#2
Furthermore:
You will need to add this file as
Code:
combobox.js
and make sure you modify the call on
Code:
messages.php
appropriately:
https://hastebin.com/jumexofaqu.js

I modified the page to be more container-like, comparable to the other UC pages.

I changed the view to have the Create Message in a Modal instead of its own page, and it uses ComboBox (as above). Anyone with Level 2 access (what I call System Administrator or the default admin level) can send a mass message (currently sends to all users in the fetchMessageUsers function - including yourself).

You can archive and unarchive threads. If there are no threads archived, the "View Unarchived Threads" link disappears.

The
Code:
message.php
page has a "Read" and "Delivered" function for messages you send. You can use the quick reply and the modal for advanced reply.

Here are some screenshots showing the changes.

Main Page:
http://oub.ca/screenshots/chrome_2017-06...-54-07.png

Archived Threads:
http://oub.ca/screenshots/chrome_2017-06...-56-39.png

Thread View:
http://oub.ca/screenshots/chrome_2017-06...-57-16.png

Advanced Reply:
http://oub.ca/screenshots/chrome_2017-06...-59-44.png
  Reply
#3
nice job ?? any reason for not using bootstraps own modal ?
  Reply
#4
I thought I did use the Bootstrap Modals? Maybe I didn't lol - I never used any plugins for the modals, the JS plugins are for different events such as keystroke firing and ESC features and what not.
  Reply
#5
my bad lol ?

will have a look at this on a vanilla build and consider implementing into my build.
is there any option to delete archived messages ?
  Reply
#6
Not yet - this was a quick deploy on my system because I needed it done ASAP, that is my next step... Big Grin
  Reply
#7
Awesome. Thanks for this. I have these on my tracking spreadsheet. If you do tinker with that modal, let me know and I will add that too. Camp ends for me July 26, so I'm counting down to getting back to developing.
  Reply
#8
Brandin,
What do you mean by "system message?" When I hear that, I think of windows pop-up dialogues from the sysadmin sending the domain usesrs a mass message that they are going to do something to the LAN connectivity.

I just integrated an email alert using the php mail function that sends a quick email to the member who is receiving a message on the site.

I'm going to check out your archive function. Thanks for sharing.
  Reply
#9
I use the system message to send messages (like you would emails) for different purposes within the code, e.g. I have a request system, so instead of emailing the person or manually sending a message.
  Reply
#10
i love the idea of email notification when a user gets a message preferably user selectable, i.e a user can choose to receive notifications.
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)