Geting jquery PNGFIX to work in Coppermine Geting jquery PNGFIX to work in Coppermine
 

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

Main Menu

Geting jquery PNGFIX to work in Coppermine

Started by uk_martin, December 22, 2010, 12:08:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

uk_martin

As some will have seen, I have a style that has PNG files with a semi-transparent fade-in effect on my site. (www.brummiesfans.com/coppermine) Obviously this will pose IE5.5 and IE6 users some problems, so to get around them I have tried to use the JQuery PNGFIX method to overcome the problem. To do it I modified the header with:


<html (etc)>
   <head>
      <meta (etc)...>

<script type="text/javascript" src="jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="pluginpage.js"></script>
<script type="text/javascript" src="jquery.pngFix.pack.js"></script>

<script type="text/javascript">
    $(document).ready(function(){
        $(document).pngFix();
    });
</script>...


The files: "jquery-1.4.4.min.js" "pluginpage.js" and "jquery.pngFix.pack.js" were freshly downloaded yesterday and are all located in my "themes/brummies" directory, with CHMOD = 755

I had high hopes for this, but for some reason, it's not working. At work I have to use a PC that has IE6 on it, so can test the effectiveness of this script.

As much as I wish that IE6 would go away, there are still about 20%-25% of site visitors who use this browser, so it is quite important that this problem be overcome if at all possible.

Can anyone tell, have I implimented the script incorrectly into Coppermine, or is there any other reason why it is not working? I am assuming that the JS files go into the theme directory as they are proximate to the template that has the header info and therefore the paths match. I've noticed other jquery files in the Coppermine system, so hopefully there will be someone with the knowledge of how to make this one work too.

Thanks

Martin

p.s. - MODS - I have put this into the themes (visuals) category as I see it as ultimately a problem of what the theme looks like at the end of the day, in this case in a particular browser. If it is considered more suitable for another category/forum, then please feel free to move this thread.

Joe Carver

  1 - Remove
    <script type="text/javascript" src="jquery-1.4.4.min.js"></script>
   cpg uses a different version - 1.3.2.

   2 - Place your code below the {JAVASCRIPT} token.

   3 - Beyond that you should use the tools available in your browser to see what errors are thrown

   

Αndré

Quote from: uk_martin on December 22, 2010, 12:08:44 AM
The files [..] are all located in my "themes/brummies" directory
Then you have to adjust the paths accordingly:
Quote from: uk_martin on December 22, 2010, 12:08:44 AM

<script type="text/javascript" src="jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="pluginpage.js"></script>
<script type="text/javascript" src="jquery.pngFix.pack.js"></script>


uk_martin

Quote from: Αndré on December 22, 2010, 09:15:58 AM
Then you have to adjust the paths accordingly:
Those are the paths in template.html

This is why I am wondering if the path should not be relative to the "underlying" php files instead? I'm at work at the moment so don't have file editing facilities, but when I get home I'm going to try to emulate the location / implimentation of the other jquery files and see what happens.

Thanks

Maritn

Jeff Bailey

Just take a look at your themes style.css path for a hint ;)
<link rel="stylesheet" href="themes/brummies/style.css" type="text/css" />
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

uk_martin

Yeah, relative to the PHP file rather than the template HTML file...can't wait to get home to try it out now...lol

uk_martin

OK, now I'm confused.

I've edited the template file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="themes/brummies/style.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />



<!-- Begin IE6 support -->
<!--[if lt IE 7]>
<style>
body {behavior: url(themes/brummies/csshover3.htc );}
.dropmenu li {width: 1px;} .dropmenu li a.firstlevel span.firstlevel {white-space: nowrap;} .main_menu {overflow: auto;}
</style>
<![endif]-->
<!-- End IE6 support -->
{JAVASCRIPT}
<!--
  SVN version info:
  Coppermine version: 1.5.8
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/themes/brummies/template.html $
  $Revision: 7805 $
-->
<script type="text/javascript" src="themes/brummies/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="themes/brummies/pluginpage.js"></script>
<script type="text/javascript" src="themes/brummies/jquery.pngFix.pack.js"></script>

<script type="text/javascript">
    $(document).ready(function(){
        $(document).pngFix();
    });
</script>
</head>


I've changed "href" for "src" and back again - no effect
I've made the js file "executable" in CHMOD - no effect, so back to "644" again.

I've copied the JS files into the JS folder as well, just in case, but no effect

I've put the code after the {JAVASCRIPT}

The problem in IE6 is still there. As for "browser tools" for identifying further problems - what is there in IE6 that is of any use? Using my employers computer, I'm restricted in what I can install, so if it's not standard IE6, I can't add to it.

Any other suggestions where the fault may be?

Thanks

Martin

Αndré

Quote from: uk_martin on December 23, 2010, 01:28:28 PM
I've changed "href" for "src" and back again - no effect
Why?


Quote from: uk_martin on December 23, 2010, 01:28:28 PM
I've made the js file "executable" in CHMOD - no effect, so back to "644" again.
Why?


Quote from: uk_martin on December 23, 2010, 01:28:28 PM
I've copied the JS files into the JS folder as well, just in case, but no effect
If you copy it to the js folder, you need to adjust the path accordingly.


Quote from: uk_martin on December 23, 2010, 01:28:28 PM
Any other suggestions where the fault may be?
Quote from: uk_martin on December 23, 2010, 01:28:28 PM

<script type="text/javascript" src="themes/brummies/jquery-1.4.4.min.js"></script>

Quote from: Joe Carver on December 22, 2010, 02:31:25 AM
  1 - Remove
    <script type="text/javascript" src="jquery-1.4.4.min.js"></script>

uk_martin

Thanks - the answers to the "why" questions - probably to try anything and everything.

I've now removed the reference to "jquery-1.4.4.min.js" in the template.html file - no effect

The JS files are now back in the theme/brummies directory.  I've run both relative and absolute paths to the files when they were in the JS directory, and again when they were returned to the theme directory, and none of this has had an effect.

Αndré

Please have a look at the content of your jquery.pngFix.pack.js file:
main/error.php?e=404

I think that's wrong.

uk_martin

You are right...the file didn't contain the word "pack" in it. Not sure where that mistake crept in...

Anyway, I've corrected that in template.html ...and the result is...all the PNG files, all the borders and the header image, not to mention some other PNG icons and other files are now not visible at all. Strange. I wonder why that is happening? All is still well in Firefox though, so the files are still there, just not in IE6


uk_martin

Quote from: uk_martin on December 23, 2010, 01:53:28 PM
I've now removed the reference to "jquery-1.4.4.min.js" in the template.html file - no effect

Just seen the reason for why it needs to be removed...pages like the Album Manager freeze up when there is reference to another jquery file in the header...

I just hope that this version of pngfix works with the version of jquery that comes built-in.

Any chance that pngfix could become an included feature of the gallery in future versions?

phill104

I really do not thinks we should include pngfix. Pandering to IE6 users is just prolonging the life of a browser that should have been killed off many years ago. Many CMS packages and template clubs used to package a pngfix into their products but most have droped that and some now just throw up a message saying "get rid of that crappy browser you berk" or similar.
It is a mistake to think you can solve any major problems just with potatoes.

uk_martin

Quote from: Phill Luckhurst on December 28, 2010, 03:50:42 PM
I really do not thinks we should include pngfix. Pandering to IE6 users is just prolonging the life of a browser that should have been killed off many years ago. Many CMS packages and template clubs used to package a pngfix into their products but most have droped that and some now just throw up a message saying "get rid of that crappy browser you berk" or similar.

I have a polite message to IE6 users too, and if I could wave a magic wand to get rid of it I would be doing an impression of Herbert von Karajan with it right now. However, not everone is in control of their own destiny. As I mentioned above, in my city, as one example, the biggest employer has every City Council office computer, every school computer and every public library computer running IE6 only (and there are reasons for it - believe it or not). A lot of people such as myself when I am at work would want to browse the web in our lunchtimes so we are stuck with using IE6.

And as most of my target audience is in my city, getting over IE6's shortcomings is important to me. At the moment there is a problem with why pngfix isn't working for me. I don't know what it is and I'm hoping that someone can tell me. Until then I'm stuck.

phill104

As for IE6 in your city, I am fully aware of that and I know the team involved. It will not be long before that changes.
It is a mistake to think you can solve any major problems just with potatoes.

uk_martin

Lets hope so, but back on theme now, and lets hope that it won't be long before a fix to pngfix can be found too.  ;)