Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2014, 06:40 PM
Alvar Alvar is offline
 
Join Date: Nov 2014
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom page login issue

Ive created custom page that has login...
when I login it loads and when the loading is done, it still shows logged out, exept if I go to vBulletin page that is not custom made, then I'm logged in... when ever I go to my custom page then I'm back to logged out, but actually I'm logged in but showing logged out...

My custom page is outaide vBulletin installation folder called "forum"
Reply With Quote
  #2  
Old 12-03-2014, 06:59 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If it's outside the /forum directory, then you probably need to move a bunch of required files to outside the /forum directory also. You should use a browser webmaster tool to see which files aren't being called by your script (assuming you used the tutorial in the vB4 Articles section to create the custom page).
Reply With Quote
Благодарность от:
ForceHSS
  #3  
Old 12-03-2014, 07:34 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can never get it straight how error messages are controlled so in every project I build I put this at the top
Code:
ini_set('display_errors', 1);
If some file isn't available you'll get a "failed to open stream" error message. I assume you have somehow required global.php. It in turn requires several other files. Maybe global can't get the right path or something.

Then after your required files I would put in

Code:
echo 'userid = ' . $vbulletin->userinfo['userid'];
That way you can see if it knows who you are.
Reply With Quote
Благодарность от:
Lynne
  #4  
Old 12-04-2014, 02:23 PM
Alvar Alvar is offline
 
Join Date: Nov 2014
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, now I'm stuck there...
Code:
userid = Unable to add cookies, header already sent.
File: /home/domain/public_html/index.php
Line: 3
Reply With Quote
  #5  
Old 12-04-2014, 02:48 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, my echo line isn't working. I think it doesn't know your userid.

Try a plugin in "load_show_variables", and put that echo line in there and comment it out in your custom file.

Try it just once and then turn off the plugin or it will echo that on every page. It should take just a few seconds
Reply With Quote
  #6  
Old 12-04-2014, 03:29 PM
Alvar Alvar is offline
 
Join Date: Nov 2014
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see header, navbar... everything, but still shows me as "not logged in" but actually I'm logged it.
Reply With Quote
  #7  
Old 12-04-2014, 03:39 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you don't see "userid = " above the regular page styling I suspect includes/class_bootstrap.php did not open a stream.

Does it show on other pages? If so turn off that plugin so it doesn't interfer with other pages
Reply With Quote
  #8  
Old 12-04-2014, 03:44 PM
Alvar Alvar is offline
 
Join Date: Nov 2014
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

on my custom page it says:
userid = 0

in normal vB4 pages userid = 1
Reply With Quote
  #9  
Old 12-04-2014, 03:47 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, that means it thinks you are a guest. So apparently it isn't reading your cookies. I'm not sure where it's supposed to do that but I'll have a look
Reply With Quote
Благодарность от:
Alvar
  #10  
Old 12-04-2014, 03:52 PM
Alvar Alvar is offline
 
Join Date: Nov 2014
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oky, thx, will wait
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 11:38 AM.


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.04549 seconds
  • Memory Usage 2,257KB
  • 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
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete