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: Not a new topic ... but here we go. <? php include ... ?>  (Read 3518 times)

0 Members and 1 Guest are viewing this topic.

cip6791

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Not a new topic ... but here we go. <? php include ... ?>
« on: September 23, 2008, 07:10:53 pm »

I would like to use the include function between the displayed image and the filmstrip. I searched the forum for "adsense" figuring that it would help me. But maybe i m too new at this to understand. The posts said to edit my theme.php file.

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2008 Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.
  
  ********************************************
  Coppermine version: 1.4.19
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/themes/water_drop/theme.php $
  $Revision: 4392 $
  $Author: gaugau $
  $Date: 2008-04-16 09:25:35 +0200 (Mi, 16 Apr 2008) $
**********************************************/

define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until
                                           // you have validated it. See docs/theme.htm.

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';

?>


That is my theme.php file. Edit what? I don't get it. Does it matter what theme I use?

Please help !

Thank you
Logged

Nibbler

  • Guest
Re: Not a new topic ... but here we go. <? php include ... ?>
« Reply #1 on: September 23, 2008, 07:28:59 pm »

If the code you want to edit is not in your theme.php then you copy the code you want to change from the sample theme and then modify your copy.
Logged

cip6791

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Not a new topic ... but here we go. <? php include ... ?>
« Reply #2 on: September 23, 2008, 07:31:48 pm »

Ok ... cool. So which code do I copy? I am very new at this. I am totally lost. I just want to add a random image script below the image description. That's all.
Logged

cip6791

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Not a new topic ... but here we go. <? php include ... ?>
« Reply #3 on: September 24, 2008, 06:03:48 am »

can anybody help me out with this?
Logged

cip6791

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Not a new topic ... but here we go. <? php include ... ?>
« Reply #4 on: September 24, 2008, 06:15:23 am »

nvm ... i used this link:

http://forum.coppermine-gallery.net/index.php/topic,42841.0.html

thank you for your help. one last question:
Code: [Select]
// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
<tr>
                <td>
                  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Test. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,------------------------------------------
                </td>
        </tr>
                <tr><td>
                                                <table width="100%" cellspacing="2" cellpadding="0" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>





<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;
Can I use php include instead of Test?

Thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Not a new topic ... but here we go. <? php include ... ?>
« Reply #5 on: September 24, 2008, 08:44:48 am »

Sure. After all, that section just populates the variable $template_media_display, so you can come up with code like this:
Code: [Select]
// HTML template for intermediate image display
$custom_variable = 'your custom, PHP-driven (i.e. dynamic) content';
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
<tr>
                <td>
                  {$custom_variable}
                </td>
        </tr>
                <tr><td>
                                                <table width="100%" cellspacing="2" cellpadding="0" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>





<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;
Logged

cip6791

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Not a new topic ... but here we go. <? php include ... ?>
« Reply #6 on: September 24, 2008, 09:40:00 pm »

Code: [Select]
$user_ad = include "ads/rotate/rotate.php";
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
<tr>
                <td>
                  {$user_ad}
                </td>
        </tr>
                <tr><td>
                                                <table width="100%" cellspacing="2" cellpadding="0" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>





<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;

I did that, and I get the image that I want displayed under the image, above the whole page. am i doing anything wrong ?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Not a new topic ... but here we go. <? php include ... ?>
« Reply #7 on: September 24, 2008, 10:15:56 pm »

Does the include populate the variable? I strongly doubt that - it probably just outputs stuff. Post a link to your gallery and post the contents of the include file and I can come up with a solution for you.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.