Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Adding HTML content in POTD (anycontent)  (Read 3421 times)

0 Members and 1 Guest are viewing this topic.

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Adding HTML content in POTD (anycontent)
« on: November 08, 2005, 03:45:17 am »

I would like to add some html content on the left and right of my POTD (Picture Of The Day). It is an anycontent. I know how to add it before or after it but not on the left or right (see the picture). Do you know how to do it? Thanks.

(http://i2.photobucket.com/albums/y40/briere2/Eyeball.jpg)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Adding HTML content in POTD (anycontent)
« Reply #1 on: November 08, 2005, 08:08:03 am »

The potd mod is not part of coppermine's core code but comes as a hack. Support for hacks is only given on the thread that deals with the particular hack, so you should have posted your question as a reply. Anyway, this sound like an easy one, so stick to this thread for now. However, we can't know what you did code-wise. Just by looking at a screenshot we will not be able to come up with code fixes. Post a link to your site (to the particular page your screenshot shows) and post the content of your anycontent.php file to let us see what you did.
Logged

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: Adding HTML content in POTD (anycontent)
« Reply #2 on: November 09, 2005, 01:04:14 am »

The link to the page is:
http://claudebriere.net/coppermine/

and the anycontent (POTD) is:

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly 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 as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.1
 
**********************************************/

/**
* Coppermine Photo Gallery 1.4.1 potd.php
*
* This file file gets included in the index.php if you set the option in admin
* can be used to display any content from any program, it is always to be edited
* according to tastes and then used
*
* @copyright 2002,2005 Gregory DEMAR, Coppermine Dev Team
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License V2
* @package Coppermine
*/

define('POTD_PHP'true);
define('IN_COPPERMINE'true);

global 
$prefix$dbi$lang_meta_album_names




    
 
   $result 
db_query("SELECT pid, aid, filepath, filename, owner_name, owner_id  from {$CONFIG['TABLE_PICTURES']} WHERE potd='1'"$dbi);
  $picture mysql_fetch_array($result); 
  
  
  
   $img 
"<img src=\"albums/{$picture['filepath']}thumb_{$picture['filename']}\"  border=\"0\">";
   $content .= "<center><tr><td><center><a href=\"displayimage.php?pos=-{$picture['pid']}\">$img</a><br /><br /><big>{$lang_meta_album_names['potd']}</big><br><small>par</small><b> <a href=\"thumbnails.php?album=lastupby&uid={$picture['owner_id']}\">{$picture['owner_name']}</a></b><br />
<a href=\"thumbnails.php?album=potdarch\">
{$lang_meta_album_names['potdarch']}</a>
</center></td></tr>"



$stop++; 

print 
$content;

endtable();
?>
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Adding HTML content in POTD (anycontent)
« Reply #3 on: November 09, 2005, 06:10:33 am »

find
Code: [Select]
   $content .= "<center><tr><td><center><a href=\"displayimage.php?pos=-{$picture['pid']}\">$img</a><br /><br /><big>{$lang_meta_album_names['potd']}</big><br><small>par</small><b> <a href=\"thumbnails.php?album=lastupby&uid={$picture['owner_id']}\">{$picture['owner_name']}</a></b><br />
<a href=\"thumbnails.php?album=potdarch\">{$lang_meta_album_names['potdarch']}</a>
</center></td></tr>";
and replace with
Code: [Select]
   $content .= "<tr><td align=\"center\">
<div style=\"float:left\">
Your content to the left.
</div>
<div style=\"float:left\">
<a href=\"displayimage.php?pos=-{$picture['pid']}\">$img</a><br /><br /><big>{$lang_meta_album_names['potd']}</big><br><small>par</small><b> <a href=\"thumbnails.php?album=lastupby&uid={$picture['owner_id']}\">{$picture['owner_name']}</a></b><br />
<a href=\"thumbnails.php?album=potdarch\">{$lang_meta_album_names['potdarch']}</a>
</div>
<div style=\"float:left\">
Your content to the right.
</div>
</td></tr>";
Instead of having <div> tags you can of course add another table as well like this
Code: [Select]
   $content .= "<tr><td align=\"center\">
<table border=\"0\" width=\"100%\">
<tr>
<td>
Your content to the left.
</td>
<td>
<a href=\"displayimage.php?pos=-{$picture['pid']}\">$img</a><br /><br /><big>{$lang_meta_album_names['potd']}</big><br><small>par</small><b> <a href=\"thumbnails.php?album=lastupby&uid={$picture['owner_id']}\">{$picture['owner_name']}</a></b><br />
<a href=\"thumbnails.php?album=potdarch\">{$lang_meta_album_names['potdarch']}</a>
</td>
<td>
Your content to the right.
</td>
</tr>
</table>
</td></tr>";
This is all plain html, no special PHP stuff involved.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.