Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 02-26-2003, 02:57 AM
inthezone inthezone is offline
 
Join Date: Feb 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I put the code on a page called test.php. If I open the browser and go to test.php in the browser session before I go to my forum index, I get the following error:

PHP Code:
WarningCannot modify header information headers already sent by (output started at '/home/virtual/www/public_html/test.php:23)
in '
/home/virtual/www/public_html/forums/admin/functions.php on line 1628 
the member verification notes ("You are not logged in", "Welcome back, $username") still display, but the above error appears.

If I visit the forum index, however, then reload test.php after that, the error message will be gone. Why is this?
Reply With Quote
  #12  
Old 02-26-2003, 03:37 AM
Sebastian's Avatar
Sebastian Sebastian is offline
 
Join Date: Oct 2002
Location: America
Posts: 488
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you have to put:

PHP Code:
chdir('/forums/');
require(
'global.php'); 
all the way at the top of the file, below <?php


if you are sending another header on the php file then you need to put that code above below it.
Reply With Quote
  #13  
Old 02-26-2003, 03:49 AM
inthezone inthezone is offline
 
Join Date: Feb 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked. I had a header include for the page which I had above the chdir and require code, but I moved it to the top and it seems to be working. Thanks

Two more questions...

1) How do I get the sessionhash to appear on non-vB pages?

2) Is there any way to access the cookied non-vB pages if I turn off the board through the Admin CP?
Reply With Quote
  #14  
Old 02-26-2003, 03:55 AM
Sebastian's Avatar
Sebastian Sebastian is offline
 
Join Date: Oct 2002
Location: America
Posts: 488
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1) once you include the code above any of your pages you can add this to your links:

PHP Code:
file.php?s=$session[sessionhash

2) if you include global.php into any script when you turn off the board it'll cause any of those pages to shut down as well.
Reply With Quote
  #15  
Old 02-26-2003, 04:01 AM
inthezone inthezone is offline
 
Join Date: Feb 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have test.php in a different directory than my forums, so when I close the board and go to test.php as a non-admin user, it gives me the "Please call back later" page but all of the URL and image paths are incorrect for obvious reasons (e.g. http://www.mydomain.com/forums/images/ will resolve to http://www.mydomain.com/images/ on this error page). Is there any way to get around the incorrect paths without moving test.php into the /forums/ directory?
Reply With Quote
  #16  
Old 02-26-2003, 04:36 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Set the images folder to the direct path. Set all smilies to the direct path.
Reply With Quote
  #17  
Old 02-26-2003, 04:54 AM
inthezone inthezone is offline
 
Join Date: Feb 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But what about all of the URLs left on the page? For instance, http://www.mydomain.com/forums/usercp.php shows up as http://www.mydomain.com/usercp.php

Can this be circumvented without having to do a massive editing of the templates?
Attached Images
File Type: jpg closed.jpg (21.8 KB, 0 views)
Reply With Quote
  #18  
Old 02-26-2003, 06:24 AM
Sebastian's Avatar
Sebastian Sebastian is offline
 
Join Date: Oct 2002
Location: America
Posts: 488
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

go in the admin cp, and change the image path for the template.. for instance, if its forums/images change it to /forums/images


or /full/path/to/forums/images

the above should work since that is how i have it setup on my site.. just add a forward slash / to the path.

as for the links, its not really that much to edit.. all you have to edit is the template header for the links, just add a / to the links. It only takes 2 minutes

if you are integrating your forums with the rest of the site it takes a few minutes, you can't expect to hit one button and have it integrated, its well worth the couple seconds it takes.
Reply With Quote
  #19  
Old 04-29-2003, 12:58 PM
glo's Avatar
glo glo is offline
 
Join Date: Aug 2002
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
02-23-03 at 07:06 AM Mist said this in Post #4
Saw something about cookies in this thread:

https://vborg.vbsupport.ru/showthrea...threadid=43014
Hi Mist,

Couldnt find the reference about cookies in that thread!

Could you help me out!

Which is better? Cookies or sessions?

What does vbulletin use as standard?
Reply With Quote
  #20  
Old 07-12-2003, 07:54 PM
SVTBlackLight01's Avatar
SVTBlackLight01 SVTBlackLight01 is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
02-25-03 at 06:16 PM Logician said this in Post #8
If you are ready to manually edit/update permissions per .php file without any user interface for administration, yes you can just insert:

PHP Code:
require('./global.php'); 
at the begining of your .php file (assumed its in the forum dir), then check the permissions with "if" commands like:

PHP Code:
if ($bbuserinfo['userid']>0
{
//do something
}
else
{
//do another thing

etc.

How do you include more than one usergroup?
Reply With Quote
Reply


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 09:49 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.04078 seconds
  • Memory Usage 2,286KB
  • Queries Executed 14 (?)
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
  • (5)bbcode_php
  • (2)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
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete