coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: joeyhavlock on July 21, 2007, 12:28:48 AM

Title: Passing a <hr> as an array variable?
Post by: joeyhavlock on July 21, 2007, 12:28:48 AM
Hi Folks,
Can someone tell me how to include a Horizontal Line <hr> html code in as part of my array, I have a vertical image listing and I want to have line after the last field in the display to separate the pics.

I thought it might be something like this, but it does not seem to work.

"hline" => "<hr>"

Thanks much!!
Joey
Title: Re: Passing a <hr> as an array variable?
Post by: Joachim Müller on July 23, 2007, 09:02:35 AM
Post the code you are using.
Title: Re: Passing a <hr> as an array variable?
Post by: joeyhavlock on July 23, 2007, 07:51:15 PM
Hey, I got this one to work finally with no problem, here's my code;

  <?php
  
include_once "../../coppermine/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("../../coppermine/cpmfetch/cpmfetch_config.php"); 
  
$options = array("windowtarget" => "_top""Subtitle" => "Views: {{pHits}} Votes: {{pVotes}} <br><hr>""imagewidth" => "140""imagesize" => "large" );
  
$objCpm->cpm_viewRandomMediaFrom("cat=31,35,39,40,36,33,34,30,32",51$options);
  
$objCpm->cpm_close(); 
?>



This puts a space as well as a horizontal line between my vertical images and makes it much easier to tell what text (hits, votes) goes with each image.  Otherwise when you scroll down the list it becomes hard to tell whether the text above or below the images goes with it.

Title: Re: Passing a <hr> as an array variable?
Post by: Joachim Müller on July 25, 2007, 08:11:37 AM
Thank you for returning and posting your solution. Marking thread accordingly. I edited your above posting (using the [ c o d e ]-tag) to make it more readable.
Side-note: you should use <hr /> and <br /> instead of <hr> and <br> for reasons of validity.

Joachim