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
Google Analytics and AG Custom Admin causing errors?
Avatar
Marcos Figueroa
Member
Free Members
sp_UserOfflineSmall Offline
Jul 26, 2012 - 3:15 pm

Holy Cow...You have no idea how proud of myself I am!!  🙂  haha

Okay...I found and changed this:

In sp-common-view-functions.php:

} else {
 //$out.= "href='javascript:void(0);' onclick='jQuery(document).ready(function() { spjToggleLayer(\"spLoginForm\"); });'>";
 $out.= "href='javascript:void(0);' onclick='spjToggleLayer(\"spLoginForm\");'>";
 }

 

I commented out the original code and changed it below it.  Is this ok.  Is this a good change?  IT DID WORK!  I need to know if this is something that is beneficial or will break something else.  If it's good, would it warrant a change permanently?

I just want to correct it right, so that when an update is made...either it's in there or ????  I don't want to lose the fix?

 

exclaimInput please! exclaim

 

OH, I just thought of something (going to check.....)...  It did correct it, for now... but the errors are still there.  I'm thinking that this might not be a permanent fix.  🙁

Maybe I'll try and figure out how to exclude the jQuery script that comes with AGCA....  eek  I don't have the foggiest idea how to do that!  question  ...but I will...eventually!  laugh

Thanks so much!!

Marcos 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 26, 2012 - 3:58 pm

Just landed at airport halfway home so be this evening before I can look into further. I but I see no problem trying his suggestion. On Jul 26, 2012 11:27 AM, "Simple:Press Support" wrote:

> > >

Avatar
Marcos Figueroa
Member
Free Members
sp_UserOfflineSmall Offline
Jul 26, 2012 - 5:15 pm

You are totally amazing!  Now that's what I call support!!  Checking in at the airport!  🙂

Thanks so much!

It did work, however...there are still errors on the page that disappear when AGCA is deactivated.  I'm thinking that his suggestion to exclude jQuery script includes in AGCA might be worth a try.

I think somewhere in his code...I saw something about google jQuery...."something"... so that might be causing a conflict.  I just am not sure how to Exclude his jQuery script and whether or not that will cause problems with that plugin.

Have a safe trip and again THANK YOU!!

Marcos

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 26, 2012 - 8:18 pm

thanks for the code change, have noted it and will research if further to see if something we want to incorporated...  not sure why it was tied to document.ready there...

as to jquery, I got the impression he meant he had an option in his plugin settings somewhere...

if not, you will need to locate within the pluign where he loads jquery - search the files for jquery... once found, we can help with how...

Avatar
Marcos Figueroa
Member
Free Members
sp_UserOfflineSmall Offline
Jul 27, 2012 - 1:54 pm

Hey Mr. Papa,

If that code is beneficial, I can't take credit for it...that was totally Argonius from the AG Custom Admin plugin.

There isn't a setting to turn off his jQuery, but there is an advanced tab that allows me to insert custom CSS and custom Javascript.  I don't know if that's a place to make any corrections.....

I have found however...  in the actual plugin.php (AGCA):

<script type="text/javascript"> 
 var wpversion = "<?php echo $wpversion; ?>";
 var agca_version = "<?php echo $this->agca_version; ?>";
 var jQueryScriptOutputted = false;
 var agca_context = "page";
 function initJQuery() {
 //if the jQuery object isn't available
 if (typeof(jQuery) == 'undefined') {
 if (! jQueryScriptOutputted) {
 //only output the script once..
 jQueryScriptOutputted = true;
 //output the script (load it from google api)
 document.write("<scr" + "ipt type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></scr" + "ipt>"); 
 }
 setTimeout("initJQuery()", 50);
 } else {
 jQuery(function() { 
 try
 { 
 <?php if(get_option('agca_header')!=true){ ?>
 jQuery('#wpadminbar').show();
 <?php } ?>
 
 <?php $this->print_admin_bar_scripts(); ?>
 }catch(ex){}
 }); 
 }
 }
 initJQuery(); 
 </script>

It looks like to me that there is a call to google jQuery...  but, I don't have the foggiest idea how to "exclude" it.  I've tried commenting out various parts, but that doesn't seem to do it...I'm sure its a little more detailed than that.

 

Thanks,

Marcos

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 27, 2012 - 3:46 pm

well, easiest thing then is to just replace

http://ajax.googleapis.com/aja.....ery.min.js

with

http://yoursite.com/wp-include...../jquery.js

and load the wp version...  really it should be enqueued, but he is doing the checking and loading in js vs php and dont know enough about what is around the code...

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: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626