coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: lurkalot on July 30, 2008, 04:23:02 PM

Title: CoppermineFetch layout problem in Firefox
Post by: lurkalot on July 30, 2008, 04:23:02 PM
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
Title: Re: CoppermineFetch layout problem in Firefox
Post by: Nibbler on July 30, 2008, 05:02:57 PM
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.
Title: Re: CoppermineFetch layout problem in Firefox
Post by: lurkalot on July 30, 2008, 05:28:40 PM
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. :-[
Title: Re: CoppermineFetch layout problem in Firefox
Post by: Nibbler on July 30, 2008, 05:32:57 PM
Your css file is here: http://cameracraniums.com/forum/Themes/cranium%202/style.css?fin11
Title: Re: CoppermineFetch layout problem in Firefox
Post by: lurkalot on July 30, 2008, 05:57:08 PM
Thanks again,

does it matter where I add the code in the css file?  as I've done it and it made no difference.  :-*
Title: Re: CoppermineFetch layout problem in Firefox
Post by: Nibbler on July 30, 2008, 05:59:21 PM
You need to refresh the page for the updated css to take effect.
Title: Re: CoppermineFetch layout problem in Firefox
Post by: lurkalot on July 30, 2008, 06:00:44 PM
Thank you very much, that fixed it.  ;)
Title: Re: CoppermineFetch layout problem in Firefox
Post by: lurkalot on July 30, 2008, 06:18:33 PM
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>';
Title: Re: CoppermineFetch layout problem in Firefox
Post by: Nibbler on July 30, 2008, 06:55:29 PM
Change the css to this:


#cpmfetch table {
    width: 100%;
}

#cpmfetch td {
    width: 25%;
}

#cpmfetch {
    text-align: center;
}
Title: Re: CoppermineFetch layout problem in Firefox
Post by: lurkalot on July 30, 2008, 07:12:39 PM
Thanks Nibbler, that done the trick.   

Promise to stop pestering you now. ;)

Thanks again.