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: Geting jquery PNGFIX to work in Coppermine  (Read 13675 times)

0 Members and 1 Guest are viewing this topic.

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Geting jquery PNGFIX to work in Coppermine
« on: December 22, 2010, 12:08:44 am »

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:

Code: [Select]
<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.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #1 on: December 22, 2010, 02:31:25 am »

  1 - Remove
Code: [Select]
    <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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #2 on: December 22, 2010, 09:15:58 am »

The files [..] are all located in my "themes/brummies" directory
Then you have to adjust the paths accordingly:
Code: [Select]
<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>
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #3 on: December 22, 2010, 10:17:03 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
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #4 on: December 22, 2010, 01:45:18 pm »

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

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #5 on: December 22, 2010, 04:36:45 pm »

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

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #6 on: December 23, 2010, 01:28:28 pm »

OK, now I'm confused.

I've edited the template file:

Code: [Select]
<!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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #7 on: December 23, 2010, 01:36:33 pm »

I've changed "href" for "src" and back again - no effect
Why?


I've made the js file "executable" in CHMOD - no effect, so back to "644" again.
Why?


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.


Any other suggestions where the fault may be?
Code: [Select]
<script type="text/javascript" src="themes/brummies/jquery-1.4.4.min.js"></script>
  1 - Remove
Code: [Select]
    <script type="text/javascript" src="jquery-1.4.4.min.js"></script>
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #8 on: December 23, 2010, 01:53:28 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #9 on: December 23, 2010, 01:56:28 pm »

Please have a look at the content of your jquery.pngFix.pack.js file:
Code: [Select]
main/error.php?e=404
I think that's wrong.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #10 on: December 23, 2010, 02:44:31 pm »

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

Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #11 on: December 28, 2010, 03:45:21 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?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #12 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #13 on: December 28, 2010, 04:04:56 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.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #14 on: December 28, 2010, 06:38:27 pm »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Geting jquery PNGFIX to work in Coppermine
« Reply #15 on: December 28, 2010, 08:53:38 pm »

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.  ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 20 queries.