Including php files into the theme Including php files into the theme
 

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 php files into the theme

Started by spring, April 07, 2004, 10:55:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

spring

Hi
I have no problem running the gallery but I'm running the gallery as a "standalone" site and would like to add some scripts to it (php scripts). I tried including the php files into the theme but I think I'd have to edit "template.php" instead of "template.html" only I don't know where and how to include it in the "theme.php" file. Please help?

Also, I tried looking for it but I could not find any topic on letting admin approve of registers before they can become members. I wonder if this is possible? It's sort of a private gallery, for family and friends in diffirent places ^^:

Joachim Müller

one thread, one question!

http://coppermine.sourceforge.net/faq.php?q=customHeader#customHeader

Next time, please search before posting, this has been answered very often already.
Also make sure you have read the documentation.

GauGau

gabIT

Hello!

How can I include this in the theme.php so I can call it from the template.html with something like {TOP_BANNER} ?

I've read the doc file included in coppermine and it says only that I have to edit the theme.php but I don't know PHP enough.

THanks a lot guys!
Gabriele

Joachim Müller


gabIT

GauGau I am not stupid. I've seen that but it doesn't work.

<?php
    
if &#40;@include&#40;getenv&#40;'DOCUMENT_ROOT'&#41;.'/AdsNew/phpadsnew.inc.php'&#41;&#41; &#123;
        
if &#40;!isset&#40;$phpAds_context&#41;&#41; $phpAds_context = array&#40;&#41;;
        
$phpAds_raw view_raw &#40;'zone&#58;223', 0, '', '', '0', $phpAds_context&#41;;
        
echo $phpAds_raw['html'&#93;;
    
&#125;
?>


this is the invocation code for an ad from phpAdsNew.

How do I assign a variable to this so I can include it in the template.html  :?:

Thank you GauGau!  :wink:

Gabriele

Joachim Müller

the stuff in curly braces are just placeholders that will get replaced when the theme get's parsed - assigning a var or a placeholder won't do you no good if you don't get it running the way described in the faq, as it's more complicated than what I've linked you to.
Why don't you add you code to anycontent.php? You'll then have to go to coppermine config and edit "The content of the main page" as described in http://coppermine.sourceforge.net/manual.php#changing

GauGau

gabIT

I've seen the anycontent.php place in the index page.
I can not use this feature because the banners must be displayed in a different area of my pages.

I have 4 areas:

1 - The header of my page with the layout and logo, etc, etc
In this area I have to place an horizontal banner.
 
2 - the main table that contains the galleries, and all the random pics/admin nemu/last uploads....

3 - a table on the left where I've placed the user menu. Here I'd also like to display phpBB elements like random users avatars, etc (like a little portal - Already working in the other pages of the site (not open to the public, yet)

4 - the right table - where I place text links and 120-60 size banners.

So, is there a way to make this happen by myself or I better hire a programmer?

Again, Thanks a lot!
Gabriele

Joachim Müller

depends on your skills - if you are not familiar with php at all, you should hire someone. Since "regular" programmers don't know Coppermine, it'll be easiest if you post your coding request details (including your budget) on this board. If the banner rotation scripts are ready to implement and you just need someone to add it to your theme, this should be an easy task for intermediate-skilled coder.

GauGau