The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Messaging System Mods - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Modifications and Hackery (https://userspice.com/forums/forumdisplay.php?fid=29)
+--- Thread: Messaging System Mods (/showthread.php?tid=615)

Pages: 1 2 3 4


Messaging System Mods - Brandin - 06-28-2017

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!


Messaging System Mods - Brandin - 06-28-2017

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-28_18-54-07.png

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

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

Advanced Reply:
http://oub.ca/screenshots/chrome_2017-06-28_18-59-44.png


Messaging System Mods - firestorm - 06-29-2017

nice job ?? any reason for not using bootstraps own modal ?


Messaging System Mods - Brandin - 06-29-2017

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.


Messaging System Mods - firestorm - 06-29-2017

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 ?



Messaging System Mods - Brandin - 06-29-2017

Not yet - this was a quick deploy on my system because I needed it done ASAP, that is my next step... Big Grin


Messaging System Mods - mudmin - 06-29-2017

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.


Messaging System Mods - jdmfarms - 07-03-2017

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.


Messaging System Mods - Brandin - 07-03-2017

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.


Messaging System Mods - firestorm - 07-03-2017

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.