vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   using vB's code on another database (https://vborg.vbsupport.ru/showthread.php?t=64845)

flat6 05-07-2004 03:39 PM

using vB's code on another database
 
I have another database, call it links, which contains some data that's totally unrelated to vB... just a bunch of data I need to use on another part of my website. My vB3 database is forum.

Now, I want to modify the admin panel so that everything can be run from one panel. While I'm at it, I want to code the editing of the links DB from the vB table. So, how do I use the vB style code to create my own section in the vB admin panel?

I've done a little work in the index.php and now I have the menu I want in the left hand frame, linking to links_admin.php. Inside I have some
PHP Code:

if ($_REQUEST['do'] == 'edit'

type of statements. However, I got lost beyond that.

Help?

flat6 05-07-2004 03:41 PM

For starters, in:

PHP Code:

    $translations $DB_site->query("
        SELECT languageid, text
        FROM " 
TABLE_PREFIX "phrase
        WHERE varname = '" 
addslashes($phrase['varname']) . "' AND
        languageid <> 
$phrase[languageid] AND
        phrasetypeid = 
$phrase[phrasetypeid]
    "
); 

From what I've gathered, vB has it own MySQL usage class. I guess I'll need to change some things so that it accessed the links database, instead of the forum database. How would I do this?

Oh, and what is the variable $usepconnect in the connect function in the db_mysql.php code?

flat6 05-07-2004 04:05 PM

By the way, why did the vB developers decide to use their own MySQL class? Is it faster, or should I not bother and just use regular MySQL functions with my code?


All times are GMT. The time now is 07:34 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.01018 seconds
  • Memory Usage 1,715KB
  • 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