1
diginin
PM Hack - No Send for NonAdmins
  • 2006/3/23 17:29

  • diginin

  • Just popping in

  • Posts: 10

  • Since: 2006/3/22


This was born out of the need to send news notifications to users without allowing them to communicate with one another.

If you find any errors or have any comments please let me know.


Files Involved

viewpmsg.php
readpmsg.php

open viewpmsg.php

find
-------------------------
$send_button = new XoopsFormButton('', 'send', _PM_SEND);

insert before
-------------------------
if($xoopsUser->isAdmin()){

find
-------------------------
pm/pmlite.php?send=1\",\"pmlite\",550,450);'");

insert after
-------------------------
}


find
-------------------------
$pmform->addElement($send_button);

Replace with
-------------------------
if($xoopsUser->isAdmin()){
$pmform->addElement($send_button);
}

open readpmsg.php

find
-------------------------
if($pm->getVar('from_userid') != $xoopsUser->getVar('uid')){

Replace with
-------------------------
if($xoopsUser->isAdmin() && $pm->getVar('from_userid') != $xoopsUser->getVar('uid')){

Then only Admin (standard setting for Webmasters) can send and reply to PM's


Shawn Beasley

The Dig"IT"al Ninja

Login

Who's Online

245 user(s) are online (25 user(s) are browsing Support Forums)


Members: 0


Guests: 245


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits