Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 07-23-2002, 07:11 PM
Darth Cow's Avatar
Darth Cow Darth Cow is offline
 
Join Date: Nov 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm... the file I have it outside of the forums directory - could that be an issue? Because nothing is being displayed, unlike when I put it in the forums directory.

EDIT: Ok, so will this take care of connecting to the database, database function and other vB functions? I have no need for sessions or any of that, just the *basic* things that will allow me to insert new threads.

PHP Code:
require('./admin/config.php');

$dbservertype strtolower($dbservertype);
$dbclassname="./admin/db_$dbservertype.php";
require(
$dbclassname);

$DB_site=new DB_Sql_vb;

$DB_site->appname='vBulletin';
$DB_site->appshortname='vBulletin (forum)';
$DB_site->database=$dbname;
$DB_site->server=$servername;
$DB_site->user=$dbusername;
$DB_site->password=$dbpassword;

$DB_site->connect();

$dbpassword="";
$DB_site->password="";

require(
'./admin/functions.php'); 
Reply With Quote
  #12  
Old 07-23-2002, 07:14 PM
nabeel nabeel is offline
 
Join Date: Jun 2002
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah it could be outside of the forum directory

do you have the paths etc correct?
Reply With Quote
  #13  
Old 07-23-2002, 07:18 PM
Darth Cow's Avatar
Darth Cow Darth Cow is offline
 
Join Date: Nov 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by nabeel
yeah it could be outside of the forum directory

do you have the paths etc correct?
Yes, I'm certain that I was - I was getting no error messages.

See my edit above for how I hope to solve this for the sake of simplicity.

EDIT: $foruminfo[parentlist] - how can I load this up (needed in DB query for updating a forum)?
Reply With Quote
  #14  
Old 07-23-2002, 08:15 PM
nabeel nabeel is offline
 
Join Date: Jun 2002
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

whats the

$dbpassword="";
$DB_site->password="";

for after the connect?

what are the queries you use?

I think they use $DB_site->query() etc, i just use the normal mysql_query


this is how i have mine setup

PHP Code:
    include_once("/home/vhosts/fragblast.com/httpdocs/forums/admin/db_mysql.php");
    
$DB_site=new DB_Sql_vb;
    
$DB_site->appname='vBulletin';
    
$DB_site->appshortname='vBulletin (forum)';
    
$DB_site->database="fragblast";
    
$DB_site->server="localhost";
    
$DB_site->user="myusername";
    
$DB_site->password="mypass";
    
$DB_site->connect();

    include(
"/home/vhosts/fragblast.com/httpdocs/forums/admin/functions.php");
    include(
"/home/vhosts/fragblast.com/httpdocs/forums/admin/sessions.php"); 
i didnt bother with the config.php


and the query isnt showing anything?

try doing
echo mysql_error(); to see if something did go wrong
Reply With Quote
  #15  
Old 07-23-2002, 09:21 PM
Darth Cow's Avatar
Darth Cow Darth Cow is offline
 
Join Date: Nov 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$dbpassword="";
$DB_site->password=""
I think it's so you don't give out your db password accidently through a template or something .

Well, just FYI everyone, I finally got my thing working . I first created a file vbbasics.php that I put in the folder with the submissions forum, which had what I posted above. I then figured out the basic queries to do to get it working in the submit form. The final code was kinda complex and included some site specific stuff, so I doubt it would work as a hack I could submit to the hack database, though I will attach most of it .
Attached Files
File Type: txt example.txt (1.7 KB, 10 views)
Reply With Quote
  #16  
Old 07-23-2002, 09:41 PM
nabeel nabeel is offline
 
Join Date: Jun 2002
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heh cool
Reply With Quote
Reply


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 05:25 PM.


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.03932 seconds
  • Memory Usage 2,245KB
  • Queries Executed 14 (?)
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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete