CoppermineFetch layout problem in Firefox CoppermineFetch layout problem in Firefox
 

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

CoppermineFetch layout problem in Firefox

Started by lurkalot, July 30, 2008, 04:23:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lurkalot

Hi all,

I'm running SMF 1.1.5 / Tinyportal 0.9.8, bridged with Coppermine 1.4.18, and currently using coppermineFetch to pull images on to my front page (Latest gallery images). 

Thanks to Nibbler I now have my owners name, how many hits, and how many comments shown underneath the thumbnails.  :)   However, I noticed when viewing my home page in Internet Explorer 6 everything looks fine, but when viewed in Firefox, the images go out of line with the text info.   Any ideas how to fix this would be greatly appreciated.

Here's a IE screen grab,

http://i25.photobucket.com/albums/c89/lurkalot/internetexplorer.jpg [Edit GauGau] Replaced hotlinked image with attachment [/Edit]

And here's a Firefox screen grab

http://i25.photobucket.com/albums/c89/lurkalot/firefox.jpg [Edit GauGau] Replaced hotlinked image with attachment [/Edit]


Code I'm using as follows, Added to a center phpbox in Tinyportal.


echo "<center>";
chdir("../gallery/cpmfetch/");
include "cpmfetch.php";                   
$objCpm = new cpm();
$options = array("imageheight"=>"80","subtitle" => "<center>{{pTitle}} <br> <center> <FONT color=#ff0000 size=2>Image By</FONT></STRONG> {{pOwner_name}} <br>{{pHits}} Views <center> <FONT color=#2A00B3 size=2>Comments</FONT></STRONG> {{pComCount}} </center>");
$objCpm->cpm_viewLastAddedMedia(2,4,$options,$filter);
$objCpm->cpm_close();
chdir("../../");
echo '<a href="http://cameracraniums.com/gallery?action=gallery">View more latest images</a>';
echo "</center>";


And a link to my site, www.cameracraniums.com
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Nibbler

First of all, don't post screenshots in JPG format, use PNG and attach them to your post instead of hotlinking them.

Change the center tags you are wrapping cpmfetch with to a div and then apply styles using that, so:

Change


echo "<center>";
...
echo "</center>";


to


echo '<div id="cpmfetch">';
...
echo '</div>';


Then add the styles to your css file.


#cpmfetch table {
    width: 100%;
}

#cpmfetch td {
    text-align: center;
    width: 25%;
}


That will align and space out the table.

lurkalot

Nibbler, apologies for the screen grabs.   I'll remember that in future posts.

Thanks for the help. 

Now I understand the center tag stuff, but when you say "Then add the styles to your css file."  What css file are you referring to, and where would I find it please? 

Sorry if that's a dumb question, but I'm still trying to learn. :-[
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0


lurkalot

Thanks again,

does it matter where I add the code in the css file?  as I've done it and it made no difference.  :-*
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Nibbler

You need to refresh the page for the updated css to take effect.

lurkalot

Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

lurkalot

Well it did fix it apart from the link at the bottom (View more latest images), this is now shown to the left hand side of my block, this used to be centered.  Any way to fix this?  I've marked it in bold below.
 
Quote
echo '<div id="cpmfetch">';
chdir("../gallery/cpmfetch/");
include "cpmfetch.php";                   
$objCpm = new cpm();
$options = array("imageheight"=>"80","subtitle" => "<center>{{pTitle}} <br> <center> <FONT color=#ff0000 size=2>Image By</FONT></STRONG> {{pOwner_name}} <br>{{pHits}} Views <center> <FONT color=#2A00B3 size=2>Comments</FONT></STRONG> {{pComCount}} </center>");
$objCpm->cpm_viewLastAddedMedia(2,4,$options,$filter);
$objCpm->cpm_close();
chdir("../../");
echo '<a href="http://cameracraniums.com/gallery?action=gallery">View more latest images</a>';
echo '</div>';
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Nibbler

Change the css to this:


#cpmfetch table {
    width: 100%;
}

#cpmfetch td {
    width: 25%;
}

#cpmfetch {
    text-align: center;
}

lurkalot

Thanks Nibbler, that done the trick.   

Promise to stop pestering you now. ;)

Thanks again.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0