Using CPG as an included file Using CPG as an included file
 

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

Using CPG as an included file

Started by Informator, February 27, 2005, 06:39:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Informator

Hi everybody, I run CPGNuke very happily on another part of my site - but this is not about that. I want to have CPG run as an included file on my site. Unfortunately, if I just include index.php it gives an error because the master script is not in the CPG folder, so the paths get messed up. I don't want to risk hacking the script because I have a feeling there'll be too much for me to do. Can someone give me a way in which I could use CPG as an include?
"Accept everything about yourself - and I mean everything. You are you and that is the beginning and the end - no apologies, no regrets." -Clark Moustakas

Joachim Müller

you can't include coppermine using PHP's include/require command - it simply doesn't work that way. Instead, you have to create a theme that matches you're site's layout to make it blend into your site. You can however include some content from your site (stuff inside <body> tags) into coppermine, search the board for "custom header" for details on how to accomplish that. Please keep in mind that we don't support any nuke ports here, this board is dedicated to the standalone version of coppermine only. Posting a link to your site and some more details might help for a start (if you need a more detailed answer).

Joachim

snappy

So does that mean, that I have to use Frames if I want coppermine to be shown in the content-part of my website? :o
I think i should be possible to add this feature. I've found a guestbook (http://www.vipergb.de.vu/) that does exactly what I want coppermine to do: you simply put an include("/guestbook/index.php") in your code and it works better than in a frame :)

Nibbler

Coppermine is slightly more complicated than a guestbook :)

snappy

I'm sure about that  :)

But I think it's not depending on the funktionality how you can handle a gallery or a guestbook. I think including the code or putting it in a frame makes no big difference.

Nibbler

Great, then please post how to accomplish this so easily. :)

Tranz


snappy

Quote from: Nibbler on June 09, 2005, 12:48:02 PM
Coppermine is slightly more complicated than a guestbook :)

If I'd know how to do this, I wouldn't have postet here to find out, how to do it :)

kegobeer

Coppermine wasn't written to be included into another web page; rewriting the code would be a huge task and it's something the dev team won't do.  Your options are:  either an iframe or a theme to match your site.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

snappy

short and clear answer :)

But nevertheless it seams to me, that this problem could be solved, if one would put a variable in front of each filecall in all the scripts...much work to do, I will have a look at it...

Joachim Müller

not that easy, as coppermine needs to modify the header, which can only be done when there hasn't been any output yet. As stated above: not that easy, and there are several good reasons why coppermine has been written the way it is. The ability to be included via PHP's include command would be nice for easy integration into an existing site, I agree. But then, coppermine would have to be less powerfull, as the script needs more control than a simple include file could have.