vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   login area on non-vb page (https://vborg.vbsupport.ru/showthread.php?t=77849)

hitmanuk2k 03-10-2005 09:47 AM

login area on non-vb page
 
i want a login area on a non-vb page. but i dont just want the login box, once logged in i want it to display the:

"Welcome X Users.
You last visited...."

How can you use if conditions like you'd need to on a non-vb page?

hitmanuk2k 03-19-2005 09:36 AM

bump.

Deaths 03-19-2005 09:45 AM

You can just use vB's conditionals by requiring global.php.

Add:
PHP Code:

require_once('./global.php'); 

At the top of your file.

If you're using an HTML file, ofcourse use

PHP Code:

<?php require_once('./global.php'); ?>

Hope that helps.

hitmanuk2k 03-19-2005 07:34 PM

Warning: main(./includes/init.php): failed to open stream: No such file or directory in /home2/******/forum/global.php on line 18

Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/******/forum/global.php on line 18

Marco van Herwaarden 03-19-2005 07:40 PM

you will have to chdir to your forum directory before calling global.php

hitmanuk2k 03-19-2005 07:42 PM

I'd appriciate showing how to do this as my knowledge is limited. The forum directory is /forum

Marco van Herwaarden 03-19-2005 07:48 PM

PHP Code:

chdir("/path2yourserver"); 


hitmanuk2k 03-19-2005 07:55 PM

<a href="http://www.pesinsight.com/indexdev.php" target="_blank">http://www.pesinsight.com/indexdev.php</a> - more progress... but still, not working? if you look at code you can see global is called for...

well, actually you cant see it when you view source, but i definitley have it at the top before the html

Marco van Herwaarden 03-19-2005 08:00 PM

Mae sure no http header is send before the global.php is being called.

hitmanuk2k 03-19-2005 08:05 PM

OK well I give up its causing all sorts of errors, maybe ill try and get it working further down the line.

for now can someone just give me a simple way of sending those who log in on the main non-vb page to the forum home. at the moment they are returned the non-vb page.


All times are GMT. The time now is 07:03 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.01166 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete