forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: cip6791 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.
<?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
-
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.
-
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.
-
can anybody help me out with this?
-
nvm ... i used this link:
http://forum.coppermine-gallery.net/index.php/topic,42841.0.html
thank you for your help. one last question:
// 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
-
Sure. After all, that section just populates the variable $template_media_display, so you can come up with code like this:
// 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;
-
$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 ?
-
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.