vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   VB's user system on the front page (https://vborg.vbsupport.ru/showthread.php?t=70282)

N1Co 10-06-2004 08:51 PM

VB's user system on the front page
 
If I want to integrate vB's user system and my front page, what files do I need to include? If I want the user's infos, and generally use vB's db class to fetch data from the vb db (I want the vb forum in a forum directory, and the front page in the public html dir)

public_html/
public_html/forum/

Logikos 10-06-2004 09:52 PM

Your file would look like this

PHP Code:

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);
define('GET_EDIT_TEMPLATES'true);
define('THIS_SCRIPT''rules');

// ################### 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 ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

// if user is guest show no permission error
//if (!$bbuserinfo['userid'])
//{
//        print_no_permission();
//}

::YOUR CODE HERE::

eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('YOUR_TEMPLATE_NAME') . '");');


?>


N1Co 10-07-2004 01:19 PM

PHP Code:

require_once('./global.php'); 

What if I don't want the front page and the forum in the same directory? Use chdir()? (sounds like a good alternative to me)
And don't I need some values for $phrasegroups, $specialtemplates, $globaltemplates and $actiontemplates?


Thanks


All times are GMT. The time now is 12:22 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.01007 seconds
  • Memory Usage 1,719KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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