How to center fetched images? How to center fetched images?
 

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

How to center fetched images?

Started by derangedtaco, November 22, 2008, 07:44:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

derangedtaco

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.

derangedtaco

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");

Joachim Müller

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.

derangedtaco

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

Joachim Müller

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.

derangedtaco

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.