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 2 [3]   Go Down

Author Topic: How can i put on my site front page the Recent Added Albums?  (Read 58867 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How can i put on my site front page the Recent Added Albums?
« Reply #40 on: April 24, 2004, 11:55:07 am »

HTML is static, you can't have dynamic content on static pages (surprise, surprise). That's the reason why PHP and other server-sided scripting languages were invented in the first place.
Take a look at http://forum.coppermine-gallery.net/index.php?topic=4150.0 instead - you can insert an image...

GauGau
« Last Edit: May 30, 2004, 04:37:43 pm by GauGau »
Logged

paradox

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: How can i put on my site front page the Recent Added Albums?
« Reply #41 on: May 28, 2004, 10:41:03 pm »

Hi,

I use the GauGau hack to and it works very good but  I have a smal problem, I can´t center the "cpg_single" picture in my table.

I use this code:

Code: [Select]
<TABLE>
   <TR>
        <TD height="10" valign=top  bgcolor="#0A300A" >
        <font face="Verdana, Arial, Helvetica, sans-serif" size="1">
   
    <CENTER> <? print cpg_single();?> </CENTER>
   
        </TD>
   </TR>
</TABLE>

what is wrong ???

« Last Edit: May 30, 2004, 04:38:27 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How can i put on my site front page the Recent Added Albums?
« Reply #42 on: May 30, 2004, 04:42:49 pm »

your question is not related to coppermine, but a general html question. I recommend you use standards-compliant code and try something like
Code: [Select]
<table width="100%">
   <tr>
        <td align="center" valign="top"  bgcolor="#0A300A">
                  <? print cpg_single();?>
        </td>
   </tr>
</table>
Better still, try to avoid additional tables and use a <div> tag and some css formatting.

GauGau
Logged

ludedude

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
    • ATVANS
Re: How can i put on my site front page the Recent Added Albums?
« Reply #43 on: June 01, 2004, 09:10:03 pm »

I'm trying to use Zarsky's hack..in my Smartor EZ portal...but no luck yet.

I installed the Extreme Mod and have files i the cache folder, so that is working...yes?

Here is the line inseted in my portal tpl file

Code: [Select]
<? include("/home/plolps4/public_html/coppermine_dir/copper.php"); ?>
Ad this is my copper.php file

Code: [Select]
<?php 

// 
//***Enter Path information here*** 
//***absolute path to main coppermine directory*** 
// 

$copperminepath '/home/plolps4/public_html/coppermine_dir/';  //***YOU MUST CHANGE THIS*** 

// 
//This connects to the mysql DB 
//***change username and password below*** 
// 

$MZrandompic = @mysql_connect('localhost''mydbusername''mydbpassword'); //***YOU MUST CHANGE THIS*** 

if (!$MZrandompic) { 
echo( 
'<p>Unable to connect to the ' 
'database server at this time.</p>' ); 
exit(); 


// 
//select photo DB 
// 

if (! @mysql_select_db('coppermine_1_1') ) { 
die( 
'<p>Unable to locate the picture ' 
'database at this time.</p>' ); 


// 
//This gets a random picture record from the database and 
//the picture's location and displays it 
// 

$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures ORDER BY RAND() LIMIT 0,1"); 
if (!
$MZresult) { 
die(
'<p>Error performing query: ' mysql_error() . 
'</p>'); 


while ( 
$MZrow mysql_fetch_array($MZresult) ) { 

$albumid $MZrow['aid'];  //This gets the picture's associated album name 
$pos $MZrow['pid'];      //This finds the picture's coppermine location 

echo('<P ALIGN=center>'); 

echo(
'<a target = "_new" href="' $copperminepath '/displayimage.php?album=' $albumid 
'&pos=-' $pos '">'); //make thumbnail clickable 

echo('<IMG SRC="' $copperminepath '/albums/');           //append base dir structure 
echo($MZrow['filepath'].thumb_.$MZrow['filename'] . '">' '</a>'); //outputs path from /userspics 



// 
//This displays the picture's album name and 
//links it to the coppermine album 
// 

$MZalbumresult = @mysql_query("SELECT * FROM cpg11d_albums WHERE aid = '$albumid'"); 
if (!
$MZalbumresult) { 
die(
'<p>Error performing query: ' mysql_error() . 
'</p>'); 


while ( 
$MZalbumname mysql_fetch_array($MZalbumresult) ) { 
echo(
'<FONT SIZE=2>'); 
echo(
'<P ALIGN=center>'); 

echo(
'<a target = "_new" href="' $copperminepath 
'/thumbnails.php?album=' $albumid '">' 
$MZalbumname['title'] . '</a>' '</p>'); 



?>

Nothing happens

loudone

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
  • ALL things web!
    • Web Solutions
Re: How can i put on my site front page the Recent Added Albums?
« Reply #44 on: June 02, 2004, 04:18:15 pm »

'!@[%&$$! MS Frontpage...! I trashing all my doings in FP and moving everything over to Dreamweaver.

Dreamweaver is the choice of champs! Been using it for 3 years now, never "tried" anything else, just heard horror stories.... ;D
Logged
Pages: 1 2 [3]   Go Up
 

Page created in 0.021 seconds with 19 queries.