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-30-2002 12:24 AM

PPN - G-force is correct. I want to restrict Usergroup 10 to only received pm's from other members in usergroup 10. No one else (admin would be nice, but not necessary).

G-Force - still the same problem - usergroup10 can see their new pm's in the user cp, but not access anything.

g-force2k2 08-30-2002 12:31 AM

okay thats it >_O im breaking it out on my forum now :p please excuse me... be back shortly :p regards...

oh btw that politely bumps was funny :)

okay one last time... open private.php

find:

PHP Code:

    if (!$touserinfo['receivepm'] or !$touserinfo['canusepm']) { 

above it add:

PHP Code:

$info $DB_site->query_first("SELECT usergroupid FROM user WHERE userid='$touserinfo[userid]'");
if(
$bbuserinfo[usergroupid] == 10) {
  if(
$info[usergroupid] != 10) {
    eval(
"standarderror(\"".gettemplate('error_pmrestricted')."\");");
    exit;
  }
}
if(
$bbuserinfo[usergroupid] != 10) {
  if(
$info[usergroupid] == 10 AND $bbuserinfo[usergroupid] != 6) {
    eval(
"standarderror(\"".gettemplate('error_pmrestricted')."\");");
    exit;
  }


Hopefull that'll do the trick ;) regards.... sorry for the long time it took x_X

g-force2k2

Scott MacVicar 08-30-2002 01:29 AM

Could always try

PHP Code:

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

:)

Rose 08-30-2002 01:33 AM

I'm still getting the "usergroup 10" members "do not have permission to acces this page" error. :(

edited to say: abovemessage for g-force


will try ppn's now.

Rose 08-30-2002 01:39 AM

And samething with ppn's too. Maybe something else needs to be done, or I'm getting the wrong editing?

I've got no access in usergrup 10, but I can see new messages in the user cp.

g-force2k2 08-30-2002 01:56 AM

Rose did you place it under the code i gave you? because the first place was incorrect on the first page... regards...

btw PPN i was trying to make it as simple as possible... how could i have just used the $touserinfo query to select the usergroup? because it doesn't select the usergroup... wouldn't it have to be a LEFT JOIN? regards...

g-force2k2

Rose 08-30-2002 02:02 AM

Quote:

Originally posted by g-force2k2
Rose did you place it under the code i gave you? because the first place was incorrect on the first page... regards...

btw PPN i was trying to make it as simple as possible... how could i have just used the $touserinfo query to select the usergroup? because it doesn't select the usergroup... wouldn't it have to be a LEFT JOIN? regards...

g-force2k2


G-Force, I took all modifications out fromt his thread and simply did what you said in your most recent modification post - placing the code above the "if (!$touserinfo['receivepm'] or !$touserinfo['canusepm']) {" Did Imisunderstand somewhere?

I will be back tomorrow. :) And thanks again for helping!!!

g-force2k2 08-30-2002 02:10 AM

k... i dunno though... cause i tested it and it seemed to work fine for me :p but we'll just do more testing tomarrow i guess :) regards...

g-force2k2

Rose 08-30-2002 02:45 AM

Sounds great, G-Force. ANd I just added you to my aim, soyou know. :D

g-force2k2 08-30-2002 02:48 AM

okay Rose i'll see if i can catch you tomarrow then... btw... did you remove the first codes that i had given you? maybe thats causing the issues? regards...

g-force2k2


All times are GMT. The time now is 01:35 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.01165 seconds
  • Memory Usage 1,748KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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