Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Profile options pages unstyled?
Avatar
0161-Jon
Manchester, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 5, 2012 - 12:11 pm

Hi,

I have just found that in my functions file I do include a minified script, I tried removing this and it resolved my problem.

This script is used on an image slider. What is the way around this conflict as I do need the script below?

 

//Use jQuery from Google Code
    wp_register_script('jquery-tools', 'http://www.pcmi.org/jquery.tools.min.js');
    wp_enqueue_script('jquery-tools');

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 5, 2012 - 12:25 pm

I have seen multiple wp support forum issues with jquery tools...  depending on where its loaded... can you make it be the first thing loaded?

also doesnt the tools need to ensure that jquery is loaded fist?  I dont see a dependency...

wp_register_script('jquery-tools', 'http://www.pcmi.org/jquery.tools.min.js', array('query'));

Avatar
0161-Jon
Manchester, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 8, 2012 - 10:30 am

Hi Mr Pappa

 

I have these scripts loading via my functions.php file.

 

function load_my_scripts() {
    //don't use (deregister) WP's jQuery version
    //wp_deregister_script( 'jquery' );
    
    //Use jQuery from Google Code
    wp_register_script('jquery-tools', 'http://www.pcmi.org/jquery.tools.min.js');
    wp_enqueue_script('jquery-tools');
    
    //Include one of my custom javascript files
    wp_register_script('scrollable', 'http://www.pcmi.org/js/scrollable.js');
    wp_enqueue_script('scrollable');
    
    //Include one of my custom javascript files
    wp_register_script('swfobject', 'http://www.pcmi.org/js/swfobject.js');
    wp_enqueue_script('swfobject');
    
}
add_action('wp_enqueue_scripts', 'load_my_scripts');

 

Can you offer any advice for how to change to get this working along with the forum? If I remove the bold (jquery.tools.min.js) call, these profile options load into the template properly, but my slideshow stops working.

 

Any ideas?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 8, 2012 - 8:43 pm

two questions... 

are you using the slideshow on the forum page itself??  I dont see it... but hate it when themes/plugins load their stuff when not needed...  we can always help you work around this theme/plugin limitation...

but first, try what I said to do in post #12...    try replacing their register script of jquery tools with my code...  it will make sure that jquery is loaded first...  cant tell for sure if it will help since I cannot see enough code...

If it does not work AND you dont need the slider on the forum pages, try changing the script enqueing to

if (sp_is_forumpage()) wp_enqueue_script('jquery-tools');

Avatar
0161-Jon
Manchester, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 9, 2012 - 5:05 am

thanks for all the help Mr Papa,

 

I had tried your version in post 12 but it just stopped the slider working. I only have the slider on my site hom epage so no it is not required on the forum.

 

I will try your other suggestion...

Avatar
0161-Jon
Manchester, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 9, 2012 - 5:08 am

Ok I just tried that, still not working, I must be doing something wrong.

The theme I am using is a child theme of twentyeleven I have done.

 

To do your second suggestion I did this below is this correct? I suspect I've done it wrong!!

 

//Use jQuery from Google Code
    wp_register_script('jquery-tools', 'http://www.pcmi.org/jquery.tools.min.js');
    if (sp_is_forumpage()) wp_enqueue_script('jquery-tools');

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 9, 2012 - 8:13 am

ah, what was wrong?  the slider still not working?  looks like I had inverse logic... should be:

if (!sp_is_forumpage()) wp_enqueue_script('jquery-tools');

Avatar
0161-Jon
Manchester, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 9, 2012 - 8:43 am

that's done it!!

 

I thought it might be something to do with:  if (sp_is_forumpage

 

I take it the exclamation mark makes it if 'NOT' ?

if (!sp_is_forumpage

 

thanks for the help :)

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 9, 2012 - 9:58 am

Correct, the ! means 'not'. Glad it's working now.

Avatar
Andrew Turnbaugh
Rookie
Free Members
sp_UserOfflineSmall Offline
Nov 15, 2012 - 1:17 pm

Hi Mr. Papa,

 

I am in same disgusting problem. I didn't find any jQuery code in my Function.php. Can you find out a solution for me please!

My site link is http://perfectpublishingsystem.....bers/forum

 

Waiting for your reply. Thank you.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625