Results 1 to 5 of 5

Thread: Lightbox v2.0 - Script conflict!

  1. #1
    Join Date
    Apr 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Lightbox v2.0 - Script conflict!

    1) Script Title: Lightbox Image Viewer 2.0

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem:

    a) this is the HTML, the one that works: www.opreadiana.ro/jspr-foto.html
    b) this is the HTML, the one that DOESN'T work: www.opreadiana.ro/not-working.html

    The only difference between the 2, is this:
    Code:
    <!--/Start Trafic.ro/-->
    <script type="text/javascript">t_rid="opreadiana";</script>
    <script type="text/javascript" 
    src="http://storage.trafic.ro/js/trafic.js">
                        </script><noscript>
                        <a href="http://www.trafic.ro/top/?rid=opreadiana"
     target="_blank"><img border="0" alt="trafic ranking"
     src="http://log.trafic.ro/cgi-bin/pl.dll?rid=opreadiana"/></a></noscript>
    
    <!--/End Trafic.ro/-->
    When this tracker script is inserted, the script DOESN'T work anymore!
    Can I get around this somehow!?

    Thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The tracking script (trafic.js) uses variable names that are the same as some of those used in Lightbox's companion script (prototype.js). However, it defines them differently. This is a source (perhaps the only source) of the conflict. It doesn't appear that you can change the tracking script. These are the variable names involved that I could easily find:

    $A
    $F
    $H
    $R

    If you were to do a global, case sensitive search and replace on prototype.js, changing each of these names in it to something a bit more unique, it would take care of these variables. There could be others. There could also be other problems between these two scripts.

    There are other tracking scripts. If using one of those takes care of the problem, that would be a better solution.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thx :)

    Thank you for your answer
    I'll try that (when I have the time) or, I'll get around it... somehow!

    Thx!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I tried this out and it appears that there were other variables or the same variables in other of lightbox's support scripts. I changed prototype.js, scriptaculous.js and effects.js and it then worked, I am attaching a .zip of these changed files:

    Attachment 659
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Apr 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thx!

    You are like... a GOD to me!

    Many Thx!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •