vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   any idea what i might have done wrongly? (https://vborg.vbsupport.ru/showthread.php?t=62581)

Zachery 03-17-2004 03:29 AM

any idea what i might have done wrongly?
 
PHP Code:

if (in_array($bbuserinfo['usergroupid'], array(5,6,7)))
{
eval(
print_standard_redirect('redirect_reportthanks'));
}
else 
{
vbmail_start();
foreach (
$mods AS $index => $moderator)
{
if (!empty(
$moderator['email']))
{
eval(
fetch_email_phrases('reportbadpost'$moderator['languageid']));
vbmail($moderator['email'], $subject$message);
}
}
vbmail_end();
eval(
print_standard_redirect('redirect_reportthanks'));
}


Im trying to set it up so that if they are a mod/smod/admin they dont get the email if they report it. only if they are a regular user... any ideas?

vB3 RC4 if that matter :)

Velocd 03-17-2004 04:00 AM

You have an extra closing bracket in there (the last one), unless you accidentally left it in from a larger piece of code where it is required.

The code looks correct otherwise. Maybe check the usergroups to ensure they are 5, 6, and 7?

Zachery 03-17-2004 04:02 AM

Quote:

Originally Posted by Velocd
You have an extra closing bracket in there (the last one), unless you accidentally left it in from a larger piece of code where it is required.

The code looks correct otherwise. Maybe check the usergroups to ensure they are 5, 6, and 7?

They are, i grabed it from the end of the function, i dont get any errors, just no email :/



its from the end of report.php from RC4 if your wondering

Velocd 03-17-2004 06:00 AM

Quote:

just no email :/
Isn't that what you're trying to do? Make usergroups 5, 6, and 7 not receive an email?

Anyway, as said it looks like correct code, I would focus on areas above that portion in the file--maybe there are some other places interferring.

Zachery 03-17-2004 06:08 AM

Quote:

Originally Posted by Velocd
Isn't that what you're trying to do? Make usergroups 5, 6, and 7 not receive an email?

Anyway, as said it looks like correct code, I would focus on areas above that portion in the file--maybe there are some other places interferring.

Yes, what i meant was, if a regular user reports a post. no email either.

assassingod 03-17-2004 01:47 PM

Might need to require a functions_x file to get vbmail_start/end to work (Can't remember if it's might be global or not)


All times are GMT. The time now is 11:40 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.01768 seconds
  • Memory Usage 1,723KB
  • 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
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete