Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
welcome/login panel on non-vB page Details »»
welcome/login panel on non-vB page
Version: 1.00, by Darren Lewis Darren Lewis is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-06-2002 Last Update: Never Installs: 124
 
No support by the author.

I've seen a lot of requests for this around here, but no solutions.

Latest version is 1.30
Works with V2.2.9 Should work with earlier version of 2.2.x too.


OVERVIEW
========
This hack/modification is designed to create a welcome panel on your non-vB homepage, so that users are either welcomed back if they are registered, or invited to login/register if they are not.

There are config options to show avatar and/or PM information and/or who's online (with or without usernames) in your welcome panel.

If you want to see a working example, then go to http://www.thebookforum.com The hack installed there does not show all of its features, but gives a general idea. The templates allow complete control over the look of the login/welcome panel.

There is one PHP file (webwelcome.php) to upload, and ten custom VB templates to create.

The templates can be modified to suit the design of your site. The ones that I have included in the zip file are those that I created for my site.

There are options to include the following additional info
- Avatar for guests or user's own avatar if logged in. If no avatar selected, a default one will be shown. Example guest and default avatars included in this release package.
- PM info to logged in users (will not show if user cannot use PMs or has chosen not to)
- Who's online (number of members of guests). Additional option to choose whether to show usernames.


CREDITS
======
This hack also uses some code originally written by several members of vbulletin.org in particular Firefly and MrLister.

Full credit is given in the php file for the relevent bits of code used. I have modified their code slightly to work with this hack.

I have not formally asked their permission due to the open source nature of the hacks at vbulletin.org
If they object I will remove their code from this hack release.


HISTORY
======
V1.30 13 September 2002
Hack creation now very simple. No more copy & paste. I've changed a lot of the original vb code so copy & paste would be nearly impossible.
Added option to include PM info and who's online (with or without usernames) in the welcome panel.
Default templates included in the hack release altered to include these new options.
New templates for the additional info to be shown.

V1.20 11 September 2002
Added option to include user's avatar in the welcome panel.
Default templates included in the hack release altered to include these new options.
Default templates altered to be more generic.

V1.10 13 May 2002
Fixes the bug where the "most users online...." on the forum page keeps reseting to zero.
Removes a lot of the unecessary bloat from the script.
Creation of script simplified. Now just cut and paste.
NB template name change in this version - webwelcome_home is now called webwelcome.

V1.00 07 April 2002
Original release.

Show Your Support

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

Comments
  #72  
Old 09-12-2002, 09:32 PM
Tony DiMera's Avatar
Tony DiMera Tony DiMera is offline
 
Join Date: Aug 2002
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello I really want this hack but this is what I get?

PHP Code:
Fatal errorCannot redeclare stripslashesarray() in forums/global.php on line 31 
Reply With Quote
  #73  
Old 09-14-2002, 10:17 AM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've had vBhome installed on my site for the last few months. I then modified the script a little (mostly just took out the news part) and used that to make a column on the left side of every page that shows a users info (or login box), online users, buddy list, latest topics, and etc. The majority of my pages are coded in HTML, so I just used ssi to include the PHP file and it worked great. Now I'm starting to code more and more of my site in PHP, but I'm starting to run into problems. I can't seem to use SSI anywhere in a PHP file, so I tried using the PHP include function to include that file. That worked for the most part, but the only problem is a user can not log in from that page, and if someone is already logged in it won't show their info.
I decided to try and use this hack to see if I could get it to work with my PHP scripts, but I'm still not having any luck. I put this code

Quote:
<?php
chdir("/home/virtual/site72/fst/var/www/html/forum/");
require('./global.php');
?>
at the top of the PHP page and then this code where I wanted the box to appear.

Quote:
<?php include ("/webwelcome.php"); ?>
Then when I try to go to the page it says
Quote:
Fatal error: Failed opening required 'errors/configure_instructions.php' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site72/fst/var/www/html/gallery/errors/unconfigured.php on line 10
I thought maybe it was a problem since this script changed directories to the forum, so I used chdir right under the place I included the webwelcome that to switch the directory back to the folder the script was in, but I got the exact same error again.


I've got this hack to work fine on a test page done in PHP, but I can't get it to work on a PHP script page. Does anyone have any idea how I can make this work or perhaps another way I can display a users login information on another PHP script?
Reply With Quote
  #74  
Old 09-14-2002, 11:58 AM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, I've updated the zip file to V1.30.

This new release contains options to show PM info and who's online (with or without usernames). There is no more copy&paste creation so things should be a bit simpler.

There are a couple of more templates to create if you want to use the pm and who's online bits.

I also fixed a very minor bug. If you chose not to show avatars the welcome text would not be centred in the box as there would still be a blank avatar column. A simple change to the webwelcome template and the php file has sorted that.


OK, this include global.php does cause a few problems. This is mainly when you have other scripts running on the same page. If these scripts require other directories they may not work. I've got Tubedog's latest threads hack on my homepage, but it's creating problems when I try to pull info from my reviews engine (Censura).

This is what I have at the very top of my index.php homepage.

<?php
chdir("forums/");
require('./global.php');
?>
<html>

I then have this where I want to show my welcome panel
<?php include("webwelcome.php"); ?>

and it works OK. Different servers behave differently. I'm running Apache on Linux.

Tony, I have no idea why you're getting that message Any other hacks/scripts on your page that may be creating trouble?

Darren.

PS I'll probably not be adding any new features to this hack from now. It does everything I personally need it to do on my site, and I don't have the time to do any custom work. Hopefully it will work with VB3, but if not I'll sort something out as I'll be going to VB3.
Reply With Quote
  #75  
Old 09-14-2002, 02:07 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No matter what I try I can't seem to get this to work with another PHP script. I tried what you suggested above and put this right above <HTML> in the PHP file...
<?php
chdir("forums/");
require('./global.php');
?>

And it came back with this error...

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site72/fst/var/www/html/gallery/albums.php:32) in /home/virtual/site72/fst/var/www/html/forum/admin/functions.php on line 1603

Anyone have any suggestions on how to make this work or know if it's even possible to make it work with another PHP script?
Reply With Quote
  #76  
Old 09-14-2002, 02:43 PM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks like your "gallery" script is conflicting and sending header info. Is there any other PHP code above the call to vbulletin's global.php file as this may be interfering.
Reply With Quote
  #77  
Old 09-14-2002, 03:54 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, there is quite a bit of code above where I was calling the global.php file from. Here's what's above it...

Quote:
<?
// Hack prevention.
if (!empty($HTTP_GET_VARS["GALLERY_BASEDIR"]) ||
!empty($HTTP_POST_VARS["GALLERY_BASEDIR"]) ||
!empty($HTTP_COOKIE_VARS["GALLERY_BASEDIR"])) {
print "Security violation\n";
exit;
}
?>
<? require($GALLERY_BASEDIR . "init.php"); ?>

<?
/* Read the album list */
$albumDB = new AlbumDB();
$gallery->session->albumName = "";
$page = 1;


/* If there are albums in our list, display them in the table */
$numAlbums = $albumDB->numAlbums($gallery->user);
$numPhotos = $albumDB->numPhotos($gallery->user);

if (!$gallery->session->albumListPage) {
$gallery->session->albumListPage = 1;
}
$perPage = $gallery->app->default["albumsPerPage"];
$maxPages = max(ceil($numAlbums / $perPage), 1);

if ($gallery->session->albumListPage > $maxPages) {
$gallery->session->albumListPage = $maxPages;
}

$pixelImage = "<img src=\"$imageDir/pixel_trans.gif\" width=\"1\" height=\"1\">";
$borderColor = $gallery->app->default["bordercolor"];

$navigator["page"] = $gallery->session->albumListPage;
$navigator["pageVar"] = "set_albumListPage";
$navigator["url"] = makeGalleryUrl("albums.php");
$navigator["maxPages"] = $maxPages;
$navigator["spread"] = 6;
$navigator["fullWidth"] = 100;
$navigator["widthUnits"] = "%";
$navigator["bordercolor"] = $borderColor;

?>

<? if (!$GALLERY_EMBEDDED_INSIDE) { ?>
<html>
<head>
<title><?= $gallery->app->galleryTitle ?></title>
<?= getStyleSheetLink() ?>
</head>
<body TEXT="#D1D1D1" BGPROPERTIES="fixed">
<? } ?>
<?php include ("http://plurplanet.com/webwelcome.php"); ?>
I've tried adding the chdir and global.php calls at the very top of the file, right above <html>, and right above where it calls the webwelcome file, but none of those have worked...
Reply With Quote
  #78  
Old 09-14-2002, 04:24 PM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try putting it above your PHP code, so it's the very first bit of code on that page. Then chdir back to your current directory

ie.
<?php
chdir("forums/");
require('global.php');
chdir("../");

// Hack Prevention
then your gallery php stuff

Darren.
Reply With Quote
  #79  
Old 09-14-2002, 06:20 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I tried your suggestion and put -

<?php
chdir("/home/virtual/site72/fst/var/www/html/forum");
require('./global.php');
chdir("/home/virtual/site72/fst/var/www/html/gallery");
?>

At the very top of the file and got this error...

Warning: Cannot send session cache limiter - headers already sent (output started at /home/virtual/site72/fst/var/www/html/gallery/albums.php:7) in /home/virtual/site72/fst/var/www/html/gallery/session.php on line 51

Fatal error: Call to a member function on a non-object in /home/virtual/site72/fst/var/www/html/webwelcome.php on line 22


I've been playing around with it for quite a while, but still no luck. If you happen to think of anything else that might work please let me know and thank you very much for your help thus far.
Reply With Quote
  #80  
Old 09-18-2002, 09:57 AM
Higgins Higgins is offline
 
Join Date: Nov 2001
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't get it to work. Only getting this error
Quote:
Fatal error: Call to a member function on a non-object in /home/virtual/site2/fst/var/www/html/webwelcome.php on line 21
On the very Top of the webwelcome.php i have added

Quote:
<?php
chdir("/home/virtual/site2/fst/var/www/html/board/");
require('./global.php');
?>
but it didn't work for me.



*EDIT*

Ok got it running now but it Displays the whole index.php Page with broken Buttons.
Reply With Quote
  #81  
Old 09-19-2002, 06:28 AM
Colon33
Guest
 
Posts: n/a
Default

Hey Higgins, you need to allow GUESTS to view your board without registering. I had the same problem.
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 03:40 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.05332 seconds
  • Memory Usage 2,326KB
  • Queries Executed 25 (?)
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
  • (6)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (11)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_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