putting CpmFetch array elements into an html table putting CpmFetch array elements into an html table
 

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]

Main Menu

putting CpmFetch array elements into an html table

Started by therightpic, August 24, 2007, 06:19:22 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

therightpic

Hi,

I have this page:

www.therightpic.com

If you look at the bottom of the page I have a list of my albums.  I am using the following code to display this:

<?php
  $albumsCpm = new cpm("./cpg1.4.11/cpmfetch/cpmfetch_config.php");
$options = array("imageattributes" => array("height" => "90", "width"=>"120"));
    $albumsCpm->cpm_showAlbumsUpdatedOverLastDays("365", $options);

?>

I want to put each album listing and thumbnail from the array that this uses into a table cell.  In other words, I want to make this pretty, formatted into a nice table with a single (or maybe double) column and each album listing in its own cell on its own row.  Is this possible?  I have been fiddling with PHP arrays and reading the documentation but I can't figure it out.

I know I can use html tables or CSS to format this but how do I get each element in its own cell?

vuud

Quote from: therightpic on August 24, 2007, 06:19:22 PM
Hi,

I have this page:

www.therightpic.com

If you look at the bottom of the page I have a list of my albums.  I am using the following code to display this:

<?php
  $albumsCpm = new cpm("./cpg1.4.11/cpmfetch/cpmfetch_config.php");
$options = array("imageattributes" => array("height" => "90", "width"=>"120"));
    $albumsCpm->cpm_showAlbumsUpdatedOverLastDays("365", $options);

?>

I want to put each album listing and thumbnail from the array that this uses into a table cell.  In other words, I want to make this pretty, formatted into a nice table with a single (or maybe double) column and each album listing in its own cell on its own row.  Is this possible?  I have been fiddling with PHP arrays and reading the documentation but I can't figure it out.

I know I can use html tables or CSS to format this but how do I get each element in its own cell?


I am thinking at this point you may be best getting back the data from cpmfetch and creating the table yourself - that gives you the most control.  Will require some basic PHP experience
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

therightpic

Vuud,

Thanks for replying.  I have enjoyed playing around with CPMFetch and incorporating parts of it into my site.  It is very useful.  Thank you for taking the time to create it.

So, what you are saying is that instead of using your built in function "cpm_showAlbumsUpdatedOverLastDays" that I should just use the CPMFetch database connection and query for my albums and then feed the results into a dynamic html table?

Am I understanding you correctly?