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
Any suggestions with integrating cloudflare
Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 4, 2014 - 12:16 pm

I enabled cloudflare to help with my sites speed, when I activate rocket loader which automatically asynchronously load all JavaScript resources, my page speed goes up to 98 and yslow to 95, best scores I've ever had, but the forum acts a little funky, the header kind of loads, then the rest of the forum renders, I've tried messing with the JS settings on the forum

rocket loader also messes with adsense, causing the script not to load properly etc, I did some research last night and it seems you can edit java script to bypass rocket loader

Yes. It is allowed.

 

Edit. Adcode is supposed to like something like this

 

<script data-cfasync="false" async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-xxxxxxxxxx" data-ad-slot="xxxxxxxxxxx"></ins><script data-cfasync="false">(adsbygoogle = window.adsbygoogle || []).push({});</script>

 

from this thread

https://productforums.google.com/forum/#!topic/adsense/4ii-vJsouto

I modified my adsense codes and it works flawlessly with it

can this be added to SP's JS so they play well together?

thank-you

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 4, 2014 - 12:19 pm

Not quite following... could what be added?

andy-signature.png
YELLOW
SWORDFISH
Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 4, 2014 - 12:22 pm

the yellow highlighted area is the snippets added to JS to bypass the rocket loader

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 4, 2014 - 12:47 pm

Not sure how we could add that in any sensible context...
How about the custom JS side of your theme?

andy-signature.png
YELLOW
SWORDFISH
Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 4, 2014 - 12:57 pm

the theme I'm using now only has a custom css area not js

Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 4, 2014 - 1:45 pm

since I'm a glutton for punishment, what is the easiest way to find all the scripts needed to run SP in case I wanted to modify them on my staging server to see if the forum still runs good with those functions added to them

theoretically of course

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 4, 2014 - 3:04 pm

Scripts are always under the /resources/jscript/ folders. There is one under the '/forum' folder and one in the root of the plugin which contains scripts used by both admin and the front end.

These are then minimised and by default the minimised/compressed versions are used by our users although we supply both the raw and compressed files.

But I am still a little unsure what it is you might add to the script libraries...

andy-signature.png
YELLOW
SWORDFISH
Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 4, 2014 - 3:06 pm

me neither lol, will report back with the joy success or tears of failure :)

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 4, 2014 - 3:09 pm

Actually - I should add that it is easy to include a complete script file to be loaded using forum action hooks.

Just see how our SP plugins add script files. Its a breeze.

andy-signature.png
YELLOW
SWORDFISH
Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 4, 2014 - 3:13 pm

yeah, but that's out of my knowledge base

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