CPMFetch: Question regarding styling CPMFetch: Question regarding styling
 

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

Main Menu

CPMFetch: Question regarding styling

Started by MrBiggZ, June 05, 2011, 06:15:13 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

MrBiggZ

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


MrBiggZ

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!

MrBiggZ

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
<?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!

.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!