including global.php including global.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

including global.php

Started by Mambocube, November 03, 2005, 02:58:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mambocube

hi, i am intergrating coppermine with my vbulletin forum, and they both read from the same header file.
in my header file i have vb phrases which can only be viewed if global.php is included from the forum,

so i included global.php but i get these errors:

Fatal error: Call to a member function on a non-object in /home/****/public_html/forum/includes/functions.php on line 991

Fatal error: Call to a member function on a non-object in /home/****/public_html/forum/includes/functions.php on line 4308

does anybody know wat these mean?

my forum and gallery are bridged by the way

thnx

Nibbler


Mambocube


Mambocube

though they seem to take a while to reply to my posts so if anyhone one these forums have any idea wat these mean then please help me out

Nibbler

We don't have access to the vb source code, so little that can be said. I would guess that you are doing the include() from within a function and so your variable scope is messed up.

Mambocube

at the moment i have got this code

<? include('global.php'); ?>

at the top of the template file

Nibbler

Which template file ? template.html ?

Mambocube


Joachim Müller

template.html can not contain php code, it can only contain html. Try including your stuff in theme.php (search the forum for the term "custom header") or in anycontent.php (look this up in the documentation).

Mambocube

ob_start();                     
include ($template_file);     
$template = ob_get_contents(); 
ob_end_clean();

i am using that in functions.inc.php which allows me to use php code in template.html, which works because i have tested it with echo commands, and i have included my header file using include('header.php');

and i think its reading global.php but something possibly in global conflicting with something in coppermine?

any ideas wat could b conflicting?

thnx for the replys aswell guys

apreciate it

Mambocube

i will also look into cutom header and anycontent.php, may be an easier way

Mambocube

k lol looked into anycontent.php

i dont get it

what sort of things can i do in this file?



Mambocube

can it be used to include files like global.php?
or headers?

Mambocube


Joachim Müller

it can be used to include files. But you can't include all files - you mustn't do header manipulation or similar, as this is only possible once per page. So the answer is: in theory yes. As we don't know what global.php actually does, we can't tell for sure that this is going to work on your setup. Why don't you just try (let us know your findings) and undo your changes if they tun out not to work? After all, we're coppermine experts, we don't specialize in mambo or other apps that can be bridged with coppermine. Another interresting little link you might want to look into as well: http://coppermine.sourceforge.net/faq.php#lamesupport

Mambocube

do i use the php code <?php include('file,php'); ?>  ?
and how do i then call to it in seperate files?