coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: Mambocube on November 03, 2005, 02:58:47 PM

Title: including global.php
Post by: Mambocube on November 03, 2005, 02:58:47 PM
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
Title: Re: including global.php
Post by: Nibbler on November 03, 2005, 03:10:22 PM
Try asking at the vb forums.
Title: Re: including global.php
Post by: Mambocube on November 03, 2005, 04:20:28 PM
thnx for the reply

will do
Title: Re: including global.php
Post by: Mambocube on November 04, 2005, 12:11:16 AM
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
Title: Re: including global.php
Post by: Nibbler on November 04, 2005, 12:16:01 AM
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.
Title: Re: including global.php
Post by: Mambocube on November 04, 2005, 12:32:52 AM
at the moment i have got this code

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

at the top of the template file
Title: Re: including global.php
Post by: Nibbler on November 04, 2005, 12:39:06 AM
Which template file ? template.html ?
Title: Re: including global.php
Post by: Mambocube on November 06, 2005, 04:31:19 PM
yes
Title: Re: including global.php
Post by: Joachim Müller on November 07, 2005, 07:32:52 AM
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).
Title: Re: including global.php
Post by: Mambocube on November 07, 2005, 01:04:39 PM
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
Title: Re: including global.php
Post by: Mambocube on November 07, 2005, 02:36:05 PM
i will also look into cutom header and anycontent.php, may be an easier way
Title: Re: including global.php
Post by: Mambocube on November 07, 2005, 02:42:00 PM
k lol looked into anycontent.php

i dont get it

what sort of things can i do in this file?


Title: Re: including global.php
Post by: Mambocube on November 07, 2005, 06:24:43 PM
can it be used to include files like global.php?
or headers?
Title: Re: including global.php
Post by: Mambocube on November 07, 2005, 10:29:07 PM
guys? anyone?
Title: Re: including global.php
Post by: Joachim Müller on November 08, 2005, 08:21:34 AM
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
Title: Re: including global.php
Post by: Mambocube on November 08, 2005, 04:04:11 PM
do i use the php code <?php include('file,php'); ?>  ?
and how do i then call to it in seperate files?