Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

Reply
 
Thread Tools
How can I create a member panel on my homepage Details »»
How can I create a member panel on my homepage
Version: , by Darren Lewis Darren Lewis is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 04-03-2002 Last Update: Never Installs: 0
 
No support by the author.

I've seen a few people asking about this, but I can't work out how to do it.

On my homepage I want to create a panel in the right column, which says one of the following.

If member logged in:

Welcome, back..... excalty like on the main forums page.

If member not logged in:

Box with login options etc like on the main forums page.

I've been trying to create something using some custom templates in vBulletin and modifying a copy of the index.php file.

I can get it to work when my modified php file is in the forums diectory (see here ) but when I insert this PHP file into my homepage (which is a php file too) it doesn't work

I think it's to do with the paths to the templates, but I can't find where vBulletin stores its templates.

I've seen lots of websites using this feature (eg this one), but I think they are using somehing like vbPortal which I don't want to use (rather wait for vb3).

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-05-2002, 05:43 PM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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')."\";");

?>
Reply With Quote
  #13  
Old 04-06-2002, 05:11 PM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

E,

Am I supposed to be using your code together with the vBHome (Lite) hack?
Reply With Quote
  #14  
Old 04-06-2002, 09:03 PM
E's Avatar
E E is offline
 
Join Date: Mar 2002
Location: Fieldale Virginia
Posts: 421
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

where did u put it.. what is line 8?
Reply With Quote
  #15  
Old 04-06-2002, 09:29 PM
Andy Z Andy Z is offline
 
Join Date: Nov 2001
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to require vB's admin/functions.php in that file (I think) as that is where gettemplate() is defined.
Reply With Quote
  #16  
Old 04-07-2002, 08:19 AM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #17  
Old 04-07-2002, 02:43 PM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thread Tools

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 06:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04238 seconds
  • Memory Usage 2,276KB
  • Queries Executed 24 (?)
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)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete