forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: MrBiggZ on June 05, 2011, 06:15:13 pm

Title: CPMFetch: Question regarding styling
Post by: MrBiggZ on June 05, 2011, 06:15:13 pm
Greetings!

I was reading the doc that came with CPMFetch.  I have a question regarding cellstyle, rowstyle and so forth.  When using that is this the proper syntax?

$options = array("cellstyle" => "<something here>");

Question 'b' is about "Set with: A string naming the css style to be added."  Does that mean the I would actually type "style:<css attributes>" or would I just give it a name of a class identifier where I have 'something here'?

Extra question: I'd like to round this thumbs out.  I know that is you make the image the background of a div element you can apply css3 to round the div and the image will be rounded as well.  I was just wondering how does coppermine round the thumbnail images out.  Of course I could dig through the code but I thought I'd ask and save myself an hour of code digging! =)

Thanks for your help!  ;D

Title: Re: CPMFetch: Question regarding styling
Post by: MrBiggZ on June 05, 2011, 06:19:00 pm
Also .. Is there an format parameter that displays the date uploaded?  I see filename and a bunch of others and the only thing that has date in it is uUser_regdate and something tells me that isn't it.

Thanks again!
Title: Re: CPMFetch: Question regarding styling
Post by: MrBiggZ on June 06, 2011, 12:29:13 am
Never mind!  I figured it out myself!  :o 

Although if somebody could still kindly point me to what variable is used to put up the uploaded date I'd appreciate it!  ;D

Just in case anybody else wants to do it here's my example:

Here's the code I used on my webpage
Code: [Select]
<?php
  
include "./photos/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./photos/cpmfetch/cpmfetch_config.php");
  
$options = array('subtitle' => 'File name : {{pFilename}}','cellstyle' => 'a-style');
  
$objCpm->cpm_viewLastAddedMedia(14$options);
  
$objCpm->cpm_close();
?>

That cellstyle' => 'a-style' created HTML of <td class="a-style">

The CSS!

Code: [Select]
.a-style {
     padding:10px;   /* This gave each cell some room to breath */
}

td.a-style img {
     border-radius: 10px;   /* This gave the image(s) round corners */
     border: 2px solid;  /* Gave each image a border 'frame' */
     -webkit-box-shadow: 4px 4px 3px #000000;  /* Gave each image a nice drop shadow */
     -moz-box-shadow: 4px 4px 3px #000000;
     box-shadow: 4px 4px 3px #000000;
}

Mind you this was a quick and dirty example!!  There's still tons of thing you can do it!