vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   calling functions (https://vborg.vbsupport.ru/showthread.php?t=50171)

f-a_org 03-15-2003 01:45 AM

calling functions
 
What php code do I use to call specific vBulletin Functions.
onto a main page ?
Im a little new to php, and want to include some simple things into my main page.

Im making a news script.
but

Here is what I need:

Stats
Newest post
Users online
Search function
Users online.

thanks

p.s- my vB Subdomain is phorum

filburt1 03-15-2003 01:59 AM

Just require global.php and then the page is 100% vB powered.

Link14716 03-15-2003 02:13 AM

It's not that simple, filburt.

You can only do that if the page you're including it in is in the same directory as the board. If not, you'd have to either copy the essential vB files, or use chdir (or whatever function that was) a few times.

Velocd 03-15-2003 02:32 AM

Doing what you just mentioned is pretty damn simple compared to what Filburt originally said though, Link ;)

Just use dot notation in front of the first forward slash to direct chdir() into the directory of global.php.

ie:

PHP Code:

chdir("./forum");
require(
"global.php"); 


f-a_org 03-15-2003 03:37 AM

*blinks* *sweatdrops*
what do I put that in Velocd ?

Erwin 03-15-2003 03:43 AM

The main page needs to be in php.

Then you put those lines as high as possible in the file after <?php

I usually also include this line as well:

error_reporting(7);

:)

f-a_org 03-15-2003 04:03 AM

oh thanks, will try it


All times are GMT. The time now is 02:41 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.00981 seconds
  • Memory Usage 1,717KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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