vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Need assistance with jQuery+Prototype.js conflict. (https://vborg.vbsupport.ru/showthread.php?t=276766)

thecore762 01-11-2012 01:31 AM

Need assistance with jQuery+Prototype.js conflict.
 
Hey guys, I need some help.
The mod developer is somewhat busy in life and too busy to fix his paid products...(I know sad no?)

Currently the donation system uses prototype.js and I currently run jQuery on my forums page.
The donation bar will not load showing the progression.
See here: http://www.47r-squad.com/forum.php
See front page: http://www.47r-squad.com that's how it supposed to work.

These are the mods I currently use that are conflicting:
- https://vborg.vbsupport.ru/showthread.php?t=276419
- https://vborg.vbsupport.ru/showthrea...light=awcoding

Your assistance will be greatly appreciated.

LifesGreatestGift 01-11-2012 01:50 AM

1 Attachment(s)
What is causing your issue is that you are running the tooltip mod. You just need to change the code for the jQuery to use noconflict

In your tooltip mod code change it to
HTML Code:

<script>   
$.noConflict();
jQuery("#scanudesc a[title]").tooltip({   
position: "bottom right",   
effect: "slide"   
});   
</script>

and see if that fixes the issue.

EDIT

whats weird is the jQuery tooltip code is embedded and called for every forum you have. Bad coding. It should have been called in the head due to it not having dynamic content.

LifesGreatestGift 01-11-2012 01:57 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=276419&highlight=description" target="_blank">https://vborg.vbsupport.ru/showt...ht=description</a>

It actually looks like he has his JS wrapped around a couple conditionals in the plugins.

thecore762 01-11-2012 02:01 AM

Quote:

Originally Posted by LifesGreatestGift (Post 2286316)
What is causing your issue is that you are running the tooltip mod. You just need to change the code for the jQuery to use noconflict

In your tooltip mod code change it to
HTML Code:

<script>   
$.noConflict();
jQuery("#scanudesc a[title]").tooltip({   
position: "bottom right",   
effect: "slide"   
});   
</script>

and see if that fixes the issue.

EDIT

whats weird is the jQuery tooltip code is embedded and called for every forum you have. Bad coding. It should have been called in the head due to it not having dynamic content.

Hmmm, should I try the following or it would be no help?

LifesGreatestGift 01-11-2012 02:03 AM

if you edit the actual plugin in the admincp and make the changes to both instances (because he is using a if else conditional) it should work.

It appears it's in the
HTML Code:

                        <title>Code replace</title>
                        <hookname>parse_templates</hookname>

plugin for the product.

--------------- Added [DATE]1326251138[/DATE] at [TIME]1326251138[/TIME] ---------------

Code:

<vb:if condition="$forum[islastshown]">
<script> 
$("#scanudesc a[title]").tooltip({ 
position: "bottom right", 
effect: "slide" 
}); 
</script></vb:if><vb:else />
<script> 
$("#scanudesc a[title]").tooltip({ 
position: "bottom right", 
effect: "slide" 
}); 
</script>
</vb:if>

The code could use some work.

--------------- Added [DATE]1326251193[/DATE] at [TIME]1326251193[/TIME] ---------------

Although its possible it won't work because the prototype code is called before the jQuery....

HMBeaty 01-11-2012 02:21 AM

Quote:

Originally Posted by LifesGreatestGift (Post 2286321)
Code:

<vb:if condition="$forum[islastshown]">
<script> 
$("#scanudesc a[title]").tooltip({ 
position: "bottom right", 
effect: "slide" 
}); 
</script></vb:if><vb:else />
<script> 
$("#scanudesc a[title]").tooltip({ 
position: "bottom right", 
effect: "slide" 
}); 
</script>
</vb:if>

The code could use some work.

lol no kidding! I'm curious if that part of it even works like it should since the way the conditional is written is wrong

LifesGreatestGift 01-11-2012 02:26 AM

Hope all goes well ;) Glad I could help, btw for future onlookers

the code needed to be changed from
HTML Code:

<script>   
$("#scanudesc a[title]").tooltip({   
position: "bottom right",   
effect: "slide"   
});   
</script>

TO
HTML Code:

<script>   
$.noConflict();
jQuery("#scanudesc a[title]").tooltip({   
position: "bottom right",   
effect: "slide"   
});   
</script>

--------------- Added [DATE]1326252531[/DATE] at [TIME]1326252531[/TIME] ---------------

Quote:

Originally Posted by HMBeaty (Post 2286328)
lol no kidding! I'm curious if that part of it even works like it should since the way the conditional is written is wrong

Apparently (at least on the forum in question) the script code was hard-coded into the
forumhome_forumbit_level2_post
template. but it is also inside the plugin but it was disabled.

thecore762 01-11-2012 02:30 AM

Thank you for fixing it for me :)


All times are GMT. The time now is 11:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01035 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete