vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   V.IMP: PHP Include (https://vborg.vbsupport.ru/showthread.php?t=71600)

Lord Brar 11-11-2004 06:20 AM

V.IMP: PHP Include
 
I tried to use this



PHP Code:

 ob_start(); 

require_once(
"/home/pulsetod/public_html/featured-thread.php"); 

$featuredthread ob_get_contents(); 

ob_end_clean(); 



in phpinclude_start



and when I use



$featuredthread in forum home template and try to access the site... i get this error -



PHP Code:

 Database error in vBulletin 3.0.3:

Invalid SQL

SELECT

user
.username, (user.options 512) AS invisibleuser.usergroupid,

session.useridsession.inforumsession.lastactivity,

IF(
displaygroupid=0user.usergroupiddisplaygroupid) AS displaygroupid

FROM session 
AS session

LEFT JOIN user 
AS user ON(user.userid session.userid)

WHERE session.lastactivity 1100157315

ORDER BY username ASC

 

mysql error
Table 'pulsetod_featured.session' doesn't exist

mysql error number: 1146

Date: Wednesday 10th of November 2004 11:30:15 PM

Script: http://www.pulsetoday.com/index.php?

Referer: http://www.pulsetoday.com/admincp/index.php?do=head

Username: pulsetoday

IP Address: 61.246.188.34 



Can anyone help me please. it's very imp. for me to include this file in the site..



Here's the code for featured-thread.php



PHP Code:

 <?php

require('./featured/wp-blog-header.php');

?>

<?php $posts get_posts('numberposts=1'); foreach ($posts as $post) : start_wp(); ?>

<?php the_content(); ?>

<?php endforeach; ?>


Andreas 11-11-2004 07:27 AM

I guess your script changes the database, and thus vB can't find its tables anymore.

Either put all tables in one database, or make sure vB and your script use different connections so they wont interfere with each other.

Lord Brar 11-11-2004 08:51 AM

hmm.. Yeah. they are using diggerent databases [wordpress and vb :P ]...

Gotta find some alternative ;) But thanks a lot for your reply!

Reeve of shinra 11-11-2004 11:36 AM

Plug that into a php file with the appropriate links to the WP DB. Then change your php_start script to access the new file you created.


All times are GMT. The time now is 09:08 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.01191 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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