coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: derangedtaco on November 22, 2008, 07:44:14 AM

Title: How to center fetched images?
Post by: derangedtaco on November 22, 2008, 07:44:14 AM
My screenshot pretty much explains it: http://www.derangedtaco.com/images/gallery-center.jpg

I want each cell's contents to be centered instead of on the left. It's a minor annoyance, but if anyone could help me out I'd be grateful.
Title: Re: How to center fetched images?
Post by: derangedtaco on November 22, 2008, 07:55:04 AM
Another problem: When an image is clicked, a new window *does not* open, even though I specified the target as _blank in the code:
$options = array('windowtarget' => '_blank',"imagewidth"=>"90");
Title: Re: How to center fetched images?
Post by: Joachim Müller on November 22, 2008, 10:35:31 AM
Post a link to the page where you use cpmFetch. Post the code used there. Don't hotlink screenshots, but attach them in the future.
Title: Re: How to center fetched images?
Post by: derangedtaco on November 22, 2008, 11:48:18 PM
The url is http://www.derangedtaco.com/forum/portal.php, but the forums are currently offline because they're not ready for the public yet.

Anyways, I'm using the cpmFetch code in one of my portal blocks (phpbb3portal). Each block has its own .html template. Here's the contents of the block I created:
<br /><!-- $Id: gallery.html,v 1.1 2008/02/09 08:18:16 angelside Exp $ //-->
<!-- only phpbb3portal.com version -->
<style type="text/css">
<!--
.content {
font-size: 1.1em;
}
//-->
</style>


<div class="panel">
<div class="inner">
<span class="corners-top"><span></span></span>
<h3>Random Images from the DT Gallery</h3>
<div align="center">
<!-- PHP -->
include "../gallery/cpmfetch/cpmfetch.php";
$options = array('windowtarget' => '_blank',"imagewidth"=>"90");
  $objCpm = new cpm("../gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewRandomMediaFrom("",2,5,6,16,10,13,9,$options);
  $objCpm->cpm_close();
<!-- ENDPHP -->



</div>

<span class="corners-bottom"><span></span></span>
</div>
</div>
<br style="clear:both" />

For PHP to be rendered in the portal, <!-- PHP --> and <!-- ENDPHP --> tags need to be used (and I did).
Title: Re: How to center fetched images?
Post by: Joachim Müller on November 23, 2008, 07:05:10 PM
Quote from: derangedtaco on November 22, 2008, 11:48:18 PM
The url is http://www.derangedtaco.com/forum/portal.php, but the forums are currently offline because they're not ready for the public yet.
Then put it back online if you want us to look into that.
Title: Re: How to center fetched images?
Post by: derangedtaco on November 28, 2008, 04:49:55 AM
Nevermind, it was a syntax error on my part, I got it.
This was the line giving me trouble: $objCpm->cpm_viewRandomMediaFrom("",2,5,6,16,10,13,9,$options);
Thanks though.