This hack is merely a bug fix and feature fix, as when I originally used the script I noticed a lot of small visual problems as well as misc other things.
Lots of the linking was a bit messed up, when you read peoples PM's you couldnt tell who they were from, it only shown who they were to etc.. Just a lot of stuff, I added who they were sent from, and sent to and clicking on the names take your to Their inbox instead of their userinfo section in the Admin Panel etc..
So yes, they get all the credit, I just thought people would want the bug fixed version. If scott or xiphoids wants to take this thread down, and stick the script in their original thread - fine by me.
Enjoy, and thanks you for making it first, lol.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I am also giving this hack serious consideration. I would however, like to change the name from "private messages" to "Network Messages" the only draw back so far is there are many many templates to change.
Anyone have advice to offer as to a quick and easy method to change the private message reference to network message?
You have a place in your control panel to modify Phrases for a reason
That does get rid of all "line 156 errors", but actually creates a new problem... now when viewing member's "sent items" mailbox for instance, the "sent to" column no longer shows the member name the PM was sent to. This is also the case when viewing the members "inbox" although in that case, it's rather obvious who's name the PM was sent to, as you're viewing all their PMs.
If your not worried about other admins reading PM's just Find and remove this code.
Lines 41 -47
Code:
// User Is Not SuperAdmin
if (!in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)))
{
// Output Header/Message
print_cp_header('Your Not Authorized');
print_cp_message('You have to be a super administrator to read private messages, this can be set within config.php');
}
I'M ONLY SUGGESTING THE FOLLOWING CAUSE THERE IS SOMETHING WRONG WITH THE WAY YOURS INSTALLED, THIS IS PRETTY MUCH THE SAME THING AS BEFORE JUST NOT READING FROM CONFIG.PHP AND FOR ONLY ONE USER.
step 1:
Find code above and replace it with:
Code:
if ($bbuserinfo['userid'] == XX)
{
< REPLACE XX WITH YOUR USERID --- If you want more then one user then it should look like this if (($bbuserinfo['userid'] == XX) OR ($bbuserinfo['userid'] == XX)) >
step 2:
Find this:
Code:
/*======================================================================*\
|| This file is distributed through http://www.vBulletin.nl/
\*======================================================================*/
Above ADD:
Code:
}
else
{
// Output Header/Message
print_cp_header('Your Not Authorized');
print_cp_message('ENTER YOUR ERROR MESSAGE HERE');
}
Again as this may work, I would suggest finding what is wrong. Maybe Your Config.php is wrong someone. I've done it before.
Config.php should look something like this
Code:
// ****** SUPER ADMINISTRATORS ******
// The users specified below will have permission to access the administrator permissions
// page, which controls the permissions of other administrators
$superadministrators = 'X, X, X';
IF THIS VIOLATES SOMETHING THEN PLEASE DELETE THIS POST. JUST TRYIN TO HELP OUT.