Integrating CPG With A PHP Header Integrating CPG With A PHP Header
 

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

Integrating CPG With A PHP Header

Started by eob, July 30, 2006, 04:49:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eob

My question is a simple one.

I have a header file (we'll call it header.php) which is included at the start of all the pages on my site. Unfortunately, this header file needs values passed to it... ie. it needs to know the section of the file calling it and a few other bits & pieces to make it all work. I've tried including it thus:

header.php?section=4&catid=9

..but to no avail.

Anyone?

Sami

since you use custom header option of CPG , your header file will merge with page so you can pass your valuse by URL
something like http://www.yourdomain.tld/cpg/index.php?section=4&catid=9 will pass section and catid to the merged header.php
‍I don't answer to PM with support question
Please post your issue to related board

eob

Doesn't work, sadly, according to the Coppermine docs it has to be a relative file path, not an absolute one. On top of this, whether relative or absolute, appending the 'root=4&catid=6' bit on the end just doesn't work. I'm also slightly confused as to how Coppermine handles headers. The 'PHP Header' function seems to be just something where you can import a chunk of PHP code which spits out HTML to the Coppermine table but not a genuine header & footer.

Nibbler

That's not an absolute path - it's an URL, but that's not really relevant anyway. Custom header likely won't work with an URL without code changes. What are you expecting a header function to do? What does 'root=4&catid=6' refer to? The way it works is to include the script you specify and put the content it produces into the {CUSTOM_HEADER} tag in your template.html.

eob

Starting to get really disheartened with Coppermine :( :( :(

Here's my header file:
http://www.octane.ie/cult/gallery/topframe.php

Here's my gallery:
http://www.octane.ie/cult/gallery/

'topframe.php' is specified as a custom header in the settings. But will it work? Nope :(

Nibbler

That's too much for a simple header. Coppermine needs to be be able to specify content for the <head> section. I would suggest modifying your header script to display only the content after the <body> tag if the constant IN_COPPERMINE is defined.

eob

Sorry, but I refuse to modify my entire website just so I can compensate for issues with Coppermine. Ideally, it should just plug into VBulletin and take it's styling cues from there. It's a shame, because I think Coppermine rocks but I've been through two days of pain to get it to look even halfway decent and it still doesn't work properly (anyone any ideas why comments, etc, don't work??) when $59 would've bought me PhotoPost and I'd be at the beach right now with my friends instead of here f**king around with stuff which should work but doesn't.

That said, keep up the good work, etc.

Nibbler

You do that, that way you won't waste people's time trying to support you.