vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   php support needed (https://vborg.vbsupport.ru/showthread.php?t=289743)

TheSupportForum 10-27-2012 11:19 PM

Quote:

Originally Posted by kh99 (Post 2376433)
Is that a message from somewhere else in your code?

Edit: Maybe try this:

Code:

  print_standard_redirect('phrase_to_show', true, false -1, true);

Code:

Warning:  Cannot modify header information - headers already sent  by (output started at  /includes/class_bootstrap.php(996)  : eval()'d code:108) in /includes/class_bootstrap.php(996) : eval()'d code on line 96

Warning:  Cannot modify header information - headers already sent  by (output started at  /includes/class_bootstrap.php(996)  : eval()'d code:108) in /includes/class_bootstrap.php(996) : eval()'d code on line 97

i am just wondering if this is due to me running this in a plugin, or if i need to register the vbulletin cookie ?

kh99 10-27-2012 11:24 PM

Well, I made another typo and left out a comma - it should have been:
Code:

  print_standard_redirect('phrase_to_show', true, false, -1, true);

But that error message you posted happens if your code produces any output before you call print_standard_redirect(). I probably shoudlhave started out by asking, where are you calling your function from? Is it a custom script or a plugin?

TheSupportForum 10-27-2012 11:29 PM

Quote:

Originally Posted by kh99 (Post 2376437)
Well, I made another typo and left out a comma - it should have been:
Code:

  print_standard_redirect('phrase_to_show', true, false, -1, true);
But that error message you posted happens if your code produces any output before you call print_standard_redirect(). I probably shoudlhave started out by asking, where are you calling your function from? Is it a custom script or a plugin?

Code:

The page isn't redirecting properly
             
detected that the server is redirecting the request for this address in a way that will never complete.

it redirects as should but shows that error in the browser

kh99 10-27-2012 11:35 PM

Do you know what $myredir is set to? Maybe try this: temporarily add this code before the call to print_standard_redirect:

Code:

die("redirect to '$myredir'");

TheSupportForum 10-28-2012 12:02 AM

Quote:

Originally Posted by kh99 (Post 2376440)
Do you know what $myredir is set to? Maybe try this: temporarily add this code before the call to print_standard_redirect:

Code:

die("redirect to '$myredir'");

i am still getting

Warning: Cannot modify header information - headers already sent by (output started at [path]/global.php(29) : eval()'d code:424) in [path]/includes/class_bootstrap.php(996) : eval()'d code on line 96

Warning: Cannot modify header information - headers already sent by (output started at [path]/global.php(29) : eval()'d code:424) in [path]/includes/class_bootstrap.php(996) : eval()'d code on line 97

kh99 10-28-2012 12:15 AM

Is your plugin using hook global_start? Try looking at what's on line 424 (that might not be the right line because it includes all plugins using hook global_start).

TheSupportForum 10-28-2012 12:42 AM

Quote:

Originally Posted by kh99 (Post 2376444)
Is your plugin using hook global_start? Try looking at what's on line 424 (that might not be the right line because it includes all plugins using hook global_start).

looks like its not gonna work they way i need it so i thought about this

if (!$vbulletin->options['agturnoff'])

eval(standard_error($vbulletin->options['agblacklistmessage']



how would i change it, instead of

PHP Code:

function blockAccess($message) {
    global 
$forbidbad$badcookie$myredir;
    if (
$forbidbad == true) {
        
writeCookie($badcookie$message$myredir);
    }
    
    global 
$vbulletin
    $vbulletin
->url $myredir;
    
print_standard_redirect('phrase_to_show');


--------------- Added [DATE]1351389136[/DATE] at [TIME]1351389136[/TIME] ---------------

right i must get some other work done, i've learn a lot tonight and i'm feeling tired


All times are GMT. The time now is 02:07 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.01059 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
  • (7)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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