vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   How can I create a member panel on my homepage (https://vborg.vbsupport.ru/showthread.php?t=36949)

Darren Lewis 04-05-2002 05:43 PM

I followed your instructions. I created the templates, and put the PHP code into a file. I then inserted this into another PHP webpage using the include function.

It generated this error:-

Fatal error: Call to undefined function: gettemplate() in path to PHP file/homelogin.php on line 8

What am I doing wrong?

This is the full PHP file I created (called homelogin.php)

PHP Code:

<?

//User Center ****************
if ($bbuserinfo['userid']!=0) {
    eval("\$login = \"".gettemplate('home_logout')."\";");

} else {
  eval("\$login = \"".gettemplate('home_login')."\";");
}eval("\$userbits .= \"".gettemplate('home_user')."\";");

?>


Darren Lewis 04-06-2002 05:11 PM

E,

Am I supposed to be using your code together with the vBHome (Lite) hack?

E 04-06-2002 09:03 PM

where did u put it.. what is line 8?

Andy Z 04-06-2002 09:29 PM

You have to require vB's admin/functions.php in that file (I think) as that is where gettemplate() is defined.

Darren Lewis 04-07-2002 08:19 AM

I've nearly managed to solve the problem.

Have a look here for the result.

Thanks for all the help. I'm slowly starting to understand how powerful PHP (and vB) can be.

If I delete my cookie, I get this message
Quote:

Warning: Cannot add header information - headers already sent by (output started at server path/test.php:11) in server path/forums/admin/functions.php on line 1545
Line 11 of test.php is the link to my website's style sheet (CSS). The problem still exists if I edit out the link to the style sheet.

It must be something to do with the cookie as when I log in the probelm disappears.

Darren Lewis 04-07-2002 02:43 PM

Managed to solve it and get the script working OK now.


All times are GMT. The time now is 01:46 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.00944 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)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
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete