Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: including global.php  (Read 11951 times)

0 Members and 1 Guest are viewing this topic.

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
including global.php
« 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
Logged

Nibbler

  • Guest
Re: including global.php
« Reply #1 on: November 03, 2005, 03:10:22 pm »

Try asking at the vb forums.
Logged

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #2 on: November 03, 2005, 04:20:28 pm »

thnx for the reply

will do
Logged

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #3 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
Logged

Nibbler

  • Guest
Re: including global.php
« Reply #4 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.
Logged

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #5 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
Logged

Nibbler

  • Guest
Re: including global.php
« Reply #6 on: November 04, 2005, 12:39:06 am »

Which template file ? template.html ?
Logged

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #7 on: November 06, 2005, 04:31:19 pm »

yes
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: including global.php
« Reply #8 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).
Logged

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #9 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
Logged

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #10 on: November 07, 2005, 02:36:05 pm »

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

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #11 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?


Logged

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #12 on: November 07, 2005, 06:24:43 pm »

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

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #13 on: November 07, 2005, 10:29:07 pm »

guys? anyone?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: including global.php
« Reply #14 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
Logged

Mambocube

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: including global.php
« Reply #15 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?
Logged
Pages: [1]   Go Up
 

Page created in 0.078 seconds with 15 queries.