Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 08-27-2002, 05:25 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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).
Reply With Quote
  #2  
Old 08-27-2002, 05:47 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 08-27-2002, 06:22 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, G-Force. I'll pm you my IM info if you want to chat. Otherwise, I will anxiously await here.
Reply With Quote
  #4  
Old 08-27-2002, 06:47 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 08-27-2002, 07:36 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 08-27-2002, 07:43 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 08-27-2002, 07:54 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 08-27-2002, 09:58 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

g-force2k2
Reply With Quote
  #9  
Old 08-27-2002, 10:16 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by g-force2k2
eh? Administrators can't send pms? or am i wrong? maybe i made a mistake in my coding... 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*
Reply With Quote
  #10  
Old 08-27-2002, 10:49 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

g-force2k2
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05059 seconds
  • Memory Usage 2,260KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete