Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 04-26-2003, 05:45 AM
Sinzar Sinzar is offline
 
Join Date: Aug 2002
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How the heck would I do this?

I would like to do some integration with the main page on my web site, but I've had a hard time using other people's scripts. It seems to be an error with global.php all the time, anyway allow me to explain.

I would like to turn the right-hand menu of my site into a forums implementation. If the user is a guest, it would simply display the following:

+Users Online (Numbers + Who's Online)
+Login Form
+Please register message

If they are logged in, it would display something like this:

+Users Online (Numbers + Who's Online)
+Welcome, $username
+You have XX new private messages
+XX new posts since your last visit

You probably get the general idea by now. Basically, I would like to take the welcome panel at the top of vbulletin and add it to my site, well here's the problem.

I do know how to program PHP/MYSQL, but I'm unfamilar with vBulletin. Secdonly, global.php restricts access from outside the /forums folder, I would need global to be accessed from the root directory and by one level up.

I've seen one script to allow this, I've also seen vb home editions doing stuff similar. If someone could simply redirect me in the right path to get on the course of doing this, that would be terrific. I'm looking for the features of Vbhomelite, except without using the entire scripts to alter my database. I just simply want to allow sessions on my main page along with the things I mentioned above.
Reply With Quote
  #2  
Old 04-26-2003, 03:48 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there is the chdir() function of php which allows you to use the global.php in other directories, too
Reply With Quote
  #3  
Old 04-26-2003, 10:11 PM
Sinzar Sinzar is offline
 
Join Date: Aug 2002
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That might work, but that will be a lot of work on my part. Right now I'm trying to manipulate myvbindex 3.0.

http://www.nintendofire.com/myvbindex.php

I want to take out core functions such as users online, login panel and stats and simply put them on my main page. My main page is all hand coded PHP, basically I need to implement this into existing code.

I can either do my own queries or try to add some of the stuff from vbindex into it. No luck so far. Any suggestions?
Reply With Quote
  #4  
Old 04-26-2003, 10:31 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should be fairly easy to take out the parts you want and add them to your main page. Most everything in the file has comments, so it shouldn't be too hard to figure out which chunk of code does what. Most also have some coding at the beginning that allows the option to be turned off/on via the Admin CP, so you'll probably need to take that out unless you ran the install file to add the options to your Admin CP.
Oh, and you will have to leave the chdir function in there and require your global.php file for everything to work.
Reply With Quote
  #5  
Old 04-27-2003, 01:08 AM
Sinzar Sinzar is offline
 
Join Date: Aug 2002
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I'm getting there. I took out a bunch of coding, but it still processes through with the headers. Does global automatically do that, or is it something I missed?

BTW- I also found some other hacks I could simply include on my PHP site to enable some options. I found who's online and login on a non-vb page. Let's hope it works with version 2.3.0.
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 01:53 AM.


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.03627 seconds
  • Memory Usage 2,192KB
  • 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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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