vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBExternal v1.6 (https://vborg.vbsupport.ru/showthread.php?t=83005)

[email protected] vbmenu_register("postmenu_1002448", true); 06-08-2006 08:34 PM

Ok, i where able to make it work, however, the problem is pretty strange.

Whenever I try to use the script from withing a PHP function it fails....

example.

Code:

test();

function test() {
  chdir('../forum');
  require_once('./vBExternal.php');
  output_News(3,51);
  output_NewestThreads(5,'');
  chdir('../pages');
}

That does not work and it returns

Fatal error: Call to a member function query() on a non-object in F:\Webz Inicom\Web iniCom\forum\vBExternal.php on line 392

if i run it from a non function, ie on a root of a file it just work fine

anyone can explain why or if there is any workaround?

C.Birch 06-09-2006 12:12 PM

I dont think its designed to work within other php code

C.Birch 06-09-2006 05:42 PM

Temp Fix for using with vb 3.6 beta1

In vBExternal.php

Find:
require_once('./includes/class_bbcode.php');

Replace with:
require_once('./includes/class_bbcode2.php');



Next you need to get the file class_bbcode.php from the vb3.5.4 and rename it class_bbcode2.php and then upload to includes folder.

Basicy it just makes this hack read the old bbcode file so that it works.

e2s 06-20-2006 12:13 PM

If on 3.5.4 you get a database error that gives you no idea what the problem is check this

Search for:
PHP Code:

// make database connection
$db->connect(
        
$config['Database']['dbname'],
        
$config['MasterServer']['servername'],
        
$config['MasterServer']['username'],
        
$config['MasterServer']['password'],
        
$config['MasterServer']['usepconnect'],
        
$config['SlaveServer']['servername'],
        
$config['SlaveServer']['username'],
        
$config['SlaveServer']['password'],
        
$config['SlaveServer']['usepconnect'],
        
$config['Mysqli']['ini_file']
); 

Replace with:
PHP Code:

// make database connection
$db->connect(
        
$config['Database']['dbname'],
        
$config['MasterServer']['servername'],
        
$config['MasterServer']['port'],
        
$config['MasterServer']['username'],
        
$config['MasterServer']['password'],
        
$config['MasterServer']['usepconnect'],
        
$config['SlaveServer']['servername'],
        
$config['SlaveServer']['port'],
        
$config['SlaveServer']['username'],
        
$config['SlaveServer']['password'],
        
$config['SlaveServer']['usepconnect'],
        
$config['Mysqli']['ini_file']
); 

You just need the port added and it should work or I should say it worked for me.

e2s 06-20-2006 04:18 PM

I recently made a modification so you can run multiple forums off of one user table. I have now modified the code for vBExternal so that I can have a site that shows recent posts from each site. You can check it out here. The site is still kind of rough and I am still working on getting everything the way I want it but you get the idea.

ElliottB 06-21-2006 06:08 AM

Is there any chance for news grabbing attachments and having them at the end?

aceofspades 06-30-2006 06:12 PM

can you tell me how to show how many members AND guests there are only. So far i have got the members online working but it would also be nice to show the number of guests.

something like :

Users online: 5
Members: James, Bob
Guests: 3

Dunc 07-02-2006 05:27 PM

I made a file called portal.php in my public_html folder which I'm gonna use to set it up and then put it as my main page. I did everything it said on installation instructions and I copied all of the usage instructions codes onto the page with lots of gaps between them

I must have done something wrong, because I get this message when I go on www.lolage.co.uk/portal.php:

Database error
The database has encountered a problem.

--------------------------------------------------------------------------------

Please try the following:
Load the page again by clicking the Refresh button in your web browser.
Open the www.lolage.co.uk home page, then try to open another page.
Click the Back button to try another link.

The www.lolage.co.uk forum technical staff have been notified of the error, though you may contact them if the problem persists.

We apologise for any inconvenience.


I have no clue about php, so could someone help me?

Thanks :)

Tannerman 07-03-2006 04:47 PM

I was wondering if anyone has been successful in pulling information from MORE THAN ONE forum when using the News include. The instructions state:
Code:

###################################################
# Displaying News

<?php
output_News(5,4);
?>

# Change '5' to the amount you want to show
# Change '4' to the forum id you want to pull
# news from (must be set - only 1 forum id allowed)
###################################################

Just curious if anyone has been able to modify vBExternal so that more than 1 forum ID can be included here.

kidron 07-08-2006 03:09 PM

Quote:

Originally Posted by e2s
If on 3.5.4 you get a database error that gives you no idea what the problem is check this

Search for:
PHP Code:

// make database connection
$db->connect(
        
$config['Database']['dbname'],
        
$config['MasterServer']['servername'],
        
$config['MasterServer']['username'],
        
$config['MasterServer']['password'],
        
$config['MasterServer']['usepconnect'],
        
$config['SlaveServer']['servername'],
        
$config['SlaveServer']['username'],
        
$config['SlaveServer']['password'],
        
$config['SlaveServer']['usepconnect'],
        
$config['Mysqli']['ini_file']
); 

Replace with:
PHP Code:

// make database connection
$db->connect(
        
$config['Database']['dbname'],
        
$config['MasterServer']['servername'],
        
$config['MasterServer']['port'],
        
$config['MasterServer']['username'],
        
$config['MasterServer']['password'],
        
$config['MasterServer']['usepconnect'],
        
$config['SlaveServer']['servername'],
        
$config['SlaveServer']['port'],
        
$config['SlaveServer']['username'],
        
$config['SlaveServer']['password'],
        
$config['SlaveServer']['usepconnect'],
        
$config['Mysqli']['ini_file']
); 

You just need the port added and it should work or I should say it worked for me.


Thanks a lot! that solved my database error :banana:


All times are GMT. The time now is 04:48 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.01505 seconds
  • Memory Usage 1,788KB
  • 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_code_printable
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete