vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Request - Private Message Hack (https://vborg.vbsupport.ru/showthread.php?t=42819)

Rose 08-27-2002 05:25 PM

Request - Private Message Hack
 
I did a quick search and couldn't find what I"m looking for. If I've overlooked something, please let me know and point me in the right direction. ;)

Anyway, I'd like to set private message permissions via usergroup. Not all usergroups, just one.


I've setup a certain group of members. It's important that they cannot read private messages unless it comes from an administrator or from someone in the same usergroup. The group-group pm'ing isn't super important, but having this group receive pm's from Admin is.


Is this possible? I don't want them to be able to send or receive any pm's unless it comes from admin. (or within their group if possible).

g-force2k2 08-27-2002 05:47 PM

hmm... lets see... right now im at school so i can't tell you where to find the coding in the private.php

but for allowing usergroups to send pms only to certain usergroups is pretty easy to do i believe... i will set something up for you when i get home in a little... regards...

g-force2k2

Rose 08-27-2002 06:22 PM

Thanks, G-Force. I'll pm you my IM info if you want to chat. Otherwise, I will anxiously await here. ;)

g-force2k2 08-27-2002 06:47 PM

okay whatever is cool... shouldn't be hard at all... just installing my 2.2.7 and i'll do the test on that ;) regards...

g-force2k2

g-force2k2 08-27-2002 07:36 PM

find ::

PHP Code:

  if (!$touserinfo['receivepm'] or !$touserinfo['canusepm']) {
    eval(
"standarderror(\"".gettemplate("error_pmrecipturnedoff")."\");");
    exit;
  } 

under it add:

PHP Code:

  if(($touserinfo[usergroupid] != $bbuserinfo[usergroupid]) OR ($bbuserinfo[usergroupid] != 6)) {
    eval(
"standarderror(\"".gettemplate("error_pmrestricted")."\");");
    exit;
  } 

that should do the trick :) it allows Administrators to pm anyone and allows only certain usergroups to pm another user in that same usergroup ;) thats all... don't forget to make a new template call it ::

error_pmrestricted

and put whatever info you want in the template (error-wise) regards :)

oh and one more thing... make sure to disable pming to buddies ;p or you could make a similiar code when adding buddies... else they can foward messages and such... to disable simply in the usergroup set max pm to forward and max users to pm at 0...

g-force2k2

Rose 08-27-2002 07:43 PM

Thanks, G-Force! I'll try it right now. Um, don't mean to be a dunce, though - and I assume private.php is the file I need - but.....what is the file to make teh above changes to? Just so I don't assume. ;)

Rose 08-27-2002 07:54 PM

Okay, I've made the change. :) But now as administrator, I can't pm outside my own group. :( I just need it set for one usergroup, not all of them. Is this possible, or a pain? :s


edited to add This fix seems to only work within the usergroup, I don't seem to be able to define which usergruops I want to restrict.

g-force2k2 08-27-2002 09:58 PM

eh? Administrators can't send pms? or am i wrong? maybe i made a mistake in my coding... :p i will test it and look into it... do you want all usergroups restricted though? regards...

g-force2k2

Rose 08-27-2002 10:16 PM

Quote:

Originally posted by g-force2k2
eh? Administrators can't send pms? or am i wrong? maybe i made a mistake in my coding... :p i will test it and look into it... do you want all usergroups restricted though? regards...

g-force2k2


Nope, not all usergruops. There's just one I want restricted. And nope, if a user sets pm's to NO or the usergroup properties are set to "no" for pm's, an admin cannot pm them.

I thought there was a pm feature in the admin cp that would work, but tehre's not one there. *heh*

g-force2k2 08-27-2002 10:49 PM

okay can you give me that usergroup that you want restricted? thanks in advance... regards...

g-force2k2


All times are GMT. The time now is 12:42 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01371 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete