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-03-2002 08:15 PM

How can I create a member panel on my homepage
 
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).

Admin 04-04-2002 04:57 AM

Install the Welcome Panel hack

Darren Lewis 04-04-2002 05:28 AM

This looks like it's for use on the main forum page. I want to create something similar to this on my website's homepage ie a non-vB page.

Thanks.

Darren.
The Book Forum

E 04-04-2002 06:27 AM

damn i got this done...... www.fiendworld.com <--the page is a bit ****ed but the side thing works..... tell me if thats what u want it says UserCP then Welcome back Darren Lewis.. but seen as ur not registered it'll have the login code.... if this is what u want tell me it takes like 3 custom templates and a bit of php code.. or u can use too templates already on ur board..

Darren Lewis 04-04-2002 08:06 AM

Yes, that's what I want :)

Is there any way that it can not diplay the "welcome back, unregistered" unless you are registered and it would then say "Welcome back username".

It would also be great if it could then say, "there have been x number of posts and x threads since your last visit. Click here to enter the forums"

Thanks for taking the trouble to try this, I appreciate your help.

Darren.

E 04-04-2002 08:21 AM

yes there is.. ima edit it so it says that now

E 04-04-2002 08:36 AM

1 Attachment(s)
i dont have the code for the "there have been X posts" so i cant add it... lol i deleted it from my forum :)

Darren Lewis 04-04-2002 08:45 AM

Thank you very much. I don't have time at the moment to set this up, but I'll get some time over the weekend (hopefully!)

Darren.

TECK 04-05-2002 01:09 AM

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=36756" target="_blank">https://vborg.vbsupport.ru/showt...threadid=36756</a>

E 04-05-2002 01:27 AM

^^that doesnt have the user panel... u have too add it urself :)

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 02: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.01174 seconds
  • Memory Usage 1,744KB
  • 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)post_thanks_navbar_search
  • (1)printthread
  • (16)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