forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Tilbo on September 24, 2006, 03:29:15 pm

Title: Using CSS
Post by: Tilbo on September 24, 2006, 03:29:15 pm
Hi,
Cpmfetch is working on my testsite with Coppermine briged in Joomla.
Now I'am a little confused how to get some CSS-style for the imageborder.
I saw on a trick & tipspage some tricks for adding CSS-styles:
<style type="text/css">
img.test1 { 
          border-style:solid;
          border-width:5px;
          border-color: #7e7575;
          margin: 2px; }
   
img.test1:hover {
          border-style:solid;
          border-width:5px;
          border-color: #000000;
          margin: 2px; }
</style>
But where to put this? In witch file?

Thanks in advance ;)
Title: Re: Using CSS
Post by: vuud on September 24, 2006, 06:04:30 pm
Hi,
Cpmfetch is working on my testsite with Coppermine briged in Joomla.
Now I'am a little confused how to get some CSS-style for the imageborder.
I saw on a trick & tipspage some tricks for adding CSS-styles:
<style type="text/css">
img.test1 { 
          border-style:solid;
          border-width:5px;
          border-color: #7e7575;
          margin: 2px; }
   
img.test1:hover {
          border-style:solid;
          border-width:5px;
          border-color: #000000;
          margin: 2px; }
</style>
But where to put this? In witch file?

Thanks in advance ;)


This would go into whatever CSS file that page is using.  One way to to view the page, look at the source and the top part should have some links to css files.  Any of those would do I guess.

Note: I know nothing about Joomla, so while my advice may work - it may not be the best way.

Don't forget you still need to modify your cpmfetch calls like in the tips & tricks page



Title: Re: Using CSS
Post by: Tilbo on September 24, 2006, 06:30:16 pm
Thanks Vuud for your fast response.
It looks like a IE-bug, it's working in FF with:
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
include "./cpg132/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg132');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,array("tablestyle" => "test1","imagestyle" => "test1"));
$objCpm->cpm_close(); ?>

Why don't IE an FF like each other :-(
Title: Re: Using CSS
Post by: vuud on September 24, 2006, 08:38:26 pm
Thanks Vuud for your fast response.
It looks like a IE-bug, it's working in FF with:
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
include "./cpg132/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg132');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,array("tablestyle" => "test1","imagestyle" => "test1"));
$objCpm->cpm_close(); ?>

Why don't IE an FF like each other :-(

It's not that FF and IE don't like each other - its that they follow different standards for how to handle web pages.  See, FF tries to follow the W3C standards.  Who is the W3c?
Quote
The World Wide Web Consortium (W3C) is an international consortium where Member organizations, a full-time staff, and the public work together to develop Web standards. W3C's mission is: To lead the World Wide Web to its full potential by developing protocols and guidelines that ensure long-term growth for the Web.

IE, follows the standards set forth by Microsoft, which according to the web site:

Quote
Microsoft Reports Fourth Quarter Results and Announces Share Repurchase Program
Microsoft delivers strong finish to fiscal year with 16% fourth quarter revenue growth; Announces $20 billion tender offer

I hope this helps clear up things.  Other than that, you probably just have to figure out the correct css stuff to use for ie.







Title: Re: Using CSS
Post by: Tilbo on September 25, 2006, 07:34:22 pm
For now I just hardcoded it in a nasty way to get it working in IE, changed line 1381 (cpmfetch.php) to:
Code: [Select]
$htmlOut .= '<img  src="' . $imagefile . '", class="test1"';
Thanks for your help ;)
Title: Re: Using CSS
Post by: vuud on October 01, 2006, 02:06:17 am
For now I just hardcoded it in a nasty way to get it working in IE, changed line 1381 (cpmfetch.php) to:
Code: [Select]
$htmlOut .= '<img  src="' . $imagefile . '", class="test1"';
Thanks for your help ;)

Well that is not good.  Upgrades will be harder for you.

You should have been able to do that easily without code modifications...  kudos to you for actually looking into the code and all though :)