Advanced search  

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

Pages: [1]   Go Down

Author Topic: Including php files into the theme  (Read 4213 times)

0 Members and 1 Guest are viewing this topic.

spring

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Including php files into the theme
« on: April 07, 2004, 10:55:58 am »

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 ^^:
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Including php files into the theme
« Reply #1 on: April 07, 2004, 11:00:14 am »

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
Logged

gabIT

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
    • http://www.gc-d.com
Including php files into the theme
« Reply #2 on: April 15, 2004, 04:15:07 am »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

gabIT

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
    • http://www.gc-d.com
Including php files into the theme
« Reply #4 on: April 15, 2004, 12:36:14 pm »

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

Code: [Select]
<?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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Including php files into the theme
« Reply #5 on: April 16, 2004, 07:37:10 am »

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
Logged

gabIT

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
    • http://www.gc-d.com
Including php files into the theme
« Reply #6 on: April 16, 2004, 07:18:58 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Including php files into the theme
« Reply #7 on: April 16, 2004, 10:17:57 pm »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.035 seconds with 19 queries.