Version: , by s.molinari
Developer Last Online: Sep 2018
Version: 2.2.x
Rating:
Released: 08-20-2001
Last Update: Never
Installs: 39
No support by the author.
Hello all,
Well I did it, my first real hack. I don't know what the rule on this is but I'll be honest and say I used alot of original vB code to make this. I don't believe in reinventing the wheel and the code in vB is so good it makes it very easy to modify.
This hack will give Admins and Mods the ability to alert users with a small message. This message works similiar to the PM popup. It also has the ability to send one user a number of messages. Each message will be denoted by the person who sent the message.
If you are not competent with Mysql and the inner workings of vB and your not sure if you need this utility I would recommend not installing it.
I consider this to be a Beta since I only tested it on my local dev computer. I would really appreciate some "experienced" users testing this hack to let me know where I've made mistakes.
If someone is real hack happy he/she they could change the hack and add the thing listed on my todo list below. If not I'll get to adding them sooner or later.
Anyhow, have fun. I'll be answering your questions here in this forum.
To do list:
1. Add option to send a message to online users only(good for telling them that the board will be closing before it's closed)
2. Timestamping the messages. Probably not a bad idea.
3. Checking that messaging is on before messages get stored in
db. Would save Mods the embarassment.
4. Add wild card function '*' to search for user names.
If you have more ideas as to how I could improve this hack feel free to post your ideas here!.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Just reporting that this hack works great on 2.3.0. You just need to follow the instructions and modify the admin/index.php and mod/index.php files abit different.
S. molinari - thx. for the hack. I was looking for something like this a little while back and couldn't find it .
I have a few notes which may help others:
In your instructions you stated:
Quote:
************************************************** ****************************/
/* insert this between lines 248 and 249 into index.php in /admin directory */
/************************************************** ***************************
<br><a href="adminpopupmsg.php?s=<?php echo $session[sessionhash]; ?>&action=start"> Send a message </a>
Like a lot of other people, I've hacked around with my index.php and therefore specifying line numbers isn't probably the best way to indicate where to add code. As I'm no expert I just looked at the control panel and placed it just after the line:
I also re-wrote the code similar to the other makenavoption line, thus:
Code:
makenavoption("Send a Popup Message","adminpopupmsg.php?t=0","<br><br>");
That gave me the control panel item I need and worked fine .
Your installation script doesn't seem to show the user options (via UserCP or Registration) for turning popup messages of this type on / off. However the AdminCP does does show the option to turn it on / off for admin / mods.
Perhaps include a line to say remove the original install file 'popupmsginstall.php' from the admin directory after installation is complete.
Might help a few other newbies like me . Other than that, the popup works great. Thx .