Advanced search  

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

Pages: [1]   Go Down

Author Topic: How to center fetched images?  (Read 5621 times)

0 Members and 1 Guest are viewing this topic.

derangedtaco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
How to center fetched images?
« 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.
Logged

derangedtaco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How to center fetched images?
« Reply #1 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:
Code: [Select]
$options = array('windowtarget' => '_blank',"imagewidth"=>"90");
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to center fetched images?
« Reply #2 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.
Logged

derangedtaco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How to center fetched images?
« Reply #3 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:
Code: [Select]
<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).
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to center fetched images?
« Reply #4 on: November 23, 2008, 07:05:10 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.
Logged

derangedtaco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How to center fetched images?
« Reply #5 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.