Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 04-05-2005, 04:32 PM
zeropaid's Avatar
zeropaid zeropaid is offline
 
Join Date: Nov 2004
Location: San Diego, CA
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Integrate vbulletin login / session info sitewide

Hi, I know there are robust hacks out there that will do this and more, but I am looking for something extremely simple. What I want is a snippet of code I can include on all the pages on my site that are outisde the forum that will :

a) recognize a user as logged in, start their session, add them to the who's onling list, and show some stats, like:
Welcome back:
zeropaid
You last visited:
29. Mar 2005 11:10

View New Posts
Your Buddies
Mark Forums Read
Log Out
There are 297 users online, 45 members and 252 guests

b) not recognize a user as logged in, start their session, and present them with a login box and some who's online stats

I also need to be able to grab this user's userid for use in other applications, so that either needs to be a session variable I have access to or a cookie or something once they are logged in.

Please let me know if there is an exisiting hack for this, if not I will pay for one.

Thanks,

Chris
Reply With Quote
  #2  
Old 04-05-2005, 04:50 PM
why-not why-not is offline
 
Join Date: Feb 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the site across different domain names or just sub-domains! You could do it both ways just the first way would be more work to get by the browser not letting you read or manage a cookie that is not a member of the current domain.

I have a script that I use for chat logins that I think I could convert to do this, it creates a small login box that you can place on any PHP page! You call it like so!

Code:
$box = not_user_login();
What it does, is checks to see if the user is logged in, if not it returns an array with a login box template, if they are logged in it just updates the session.

If this is what your wanting tell me and I will post you some code to do it! It might not be until tomorrow as I am busy at the moment!


Sonia
Reply With Quote
  #3  
Old 04-05-2005, 05:37 PM
zeropaid's Avatar
zeropaid zeropaid is offline
 
Join Date: Nov 2004
Location: San Diego, CA
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah, thats kind of what we are looking for, if you can please post the code and I will try it out. All our pages are ont he same domain.
Reply With Quote
  #4  
Old 04-06-2005, 01:38 AM
greenhybrid greenhybrid is offline
 
Join Date: Jan 2005
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm looking for a similar script that basically lets a visitor show up "online" even if they aren't in a forum page. There should also be a way to validate if they're logged in so that they can be denied access to certain pages accordingly.
Reply With Quote
  #5  
Old 04-06-2005, 01:52 AM
TyleR's Avatar
TyleR TyleR is offline
 
Join Date: Nov 2004
Location: North Carolina
Posts: 349
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just rename your files into php files, like so:

PHP Code:
<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''file_name_here');
define('NO_REGISTER_GLOBALS'1);

// ################### PRE-CACHE TEMPLATES AND DATA ###################### 
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore 
$specialtemplates = array();

// pre-cache templates used by all actions 
$globaltemplates = array();

// pre-cache templates used by specific actions 
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
// assuming your forums folder is in a seperate direcotry than the area you have made.
chdir('./forum/');
require_once(
'./global.php');
chdir('./');

echo<<<EOF
your HTML can now go here ~_^

EOF;

?>
i don't trust my "EOF" thing in the echo, but maybe someone can fix it if it's wrong
Reply With Quote
  #6  
Old 01-07-2006, 01:23 AM
xBhp xBhp is offline
 
Join Date: Jan 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey, so did tyler's method worked? anyone?
Reply With Quote
  #7  
Old 05-13-2006, 09:57 PM
Mistah Roth's Avatar
Mistah Roth Mistah Roth is offline
 
Join Date: Jul 2003
Location: Ottawa, Ontario
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm also looking for something like this, I have a number of inefficient methods of getting the username or guest welcome displayed, but I can't seem to get people browsing non-vb pages to end up in online.php.

In vb 3.0.0 including global made it work fine
Reply With Quote
  #8  
Old 05-16-2006, 09:04 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mistah Roth
I'm also looking for something like this, I have a number of inefficient methods of getting the username or guest welcome displayed, but I can't seem to get people browsing non-vb pages to end up in online.php.

In vb 3.0.0 including global made it work fine
Are you asking this for vB3.0? If not please ask in the 3.5 forums.

There are a few integration hacks/frameworks available, but often it would require customisation for your specific situation.
Reply With Quote
  #9  
Old 05-16-2006, 11:42 PM
Mistah Roth's Avatar
Mistah Roth Mistah Roth is offline
 
Join Date: Jul 2003
Location: Ottawa, Ontario
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, I'm asking for vb 3.5.4

I'm saying that this was easy in vb 3.0.0 lol
Reply With Quote
Reply

Thread Tools
Display Modes

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 10:06 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.06858 seconds
  • Memory Usage 2,247KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete