• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

XF Optimise

Status
Not open for further replies.
My main question now is...how were the "TWTR" and "twimg" terms decided upon? and how come that block requires two entries?

The reason I ask is I have a couple other javascripts on my site. I cannot use the Defer JS Loading option until they are all adjusted for. For example my ventilo script is
Code:
<div class="section">
  <div class="secondaryContent statsList" id="vent">
      <h3>Ventrilo</h3>
      <span id="instantventrilo"><a href="http://www.instantventrilo.com/">ventrilo</a> Hosting by InstantVentrilo.com</span><script type="text/javascript" src="http://view.light-speed.com/ventrilo.php?IP=v44.darkstarllc.com&amp;PORT=27504&amp;STYLE=2&amp;CHANNEL_WNOUSER=NO&amp;SHOW_IP_PORT=YES&amp;HELP=YES&amp;CONLINK=YES&amp;WIDTH=225&amp;FONTSIZE=10&amp;BGCOLOR=393939&amp;SN_BGCOLOR=393939&amp;SN_COLOR=969696&amp;INFO_BGCOLOR=393939&amp;INFO_COLOR=ffffff&amp;HELP_BGCOLOR=393939&amp;HELP_COLOR=000000&amp;CHANNEL_BGCOLOR=c8c8c8&amp;CHANNEL_COLOR=969696&amp;UN_BG=393939&amp;UN=1061b3&amp;METHOD=js"></script>
</div>
</div>


Simply take a unique word out of the JS or the JS file locations

http://view.light-speed.com/ventrilo.php?IP=v44.darkstarllc.com&amp;PORT=27504&amp;STYLE= < this is part of your js file name for vent, so use:
darkstarllc
 

Ha silly me :C I host the widget.js local (more speedy for me no more lag loading problems) forgot about that now it works fine

PHP:
protected function _jsLeave($match){
return stripos($match, "google_ad") !== false || stripos($match, "show_ad") !== false || stripos($match, "_google") !== false || stripos($match, "TWTR") !== false || stripos($match, "widget.js") !== false;
}
 
Hey I when I try to run it again it says The requested page could not be found. Any idea why? It ran fine the first time.

 
Yes it is, I did everything as told.. When it ran for the first time everything went perfectly.. now when I went to run it i ran into the error.
And there is nothing in xenforo logs hmm very odd
Best wait for Dark to reply
 
And there is nothing in xenforo logs hmm very odd
Best wait for Dark to reply

I have solved the problem, it was my fault since when I deleted the other Add-on created by dark called "DarkAzuCloud" then I deleted its directory which is "library/dark" but I had forgot that it is also used by dark's other add-on XF Optimise.

Dark this is a great add-on thanks so much.. you do an awesome job.
 
Updated :)



0.1.0: (24/04/2011)
  • Added configurable Javascript Blacklist, with existing defaults along with Twitter widgets and AdBrite.
  • Improvements to permissions etc. when running minify Javascript (thanks xfrocks).
 
ive set all the js directories (including the js-old) to 777 and clicking the 'minimise js' link results in a blank page. its not thinking or anything just a blank page that doesnt even have source code.
is there an offline tool i can use to recursively minimise a directory full of js files to manually upload?

edit: just saw there is an update. i will try that then report back. maybe it works now.
 
ive set all the js directories (including the js-old) to 777 and clicking the 'minimise js' link results in a blank page. its not thinking or anything just a blank page that doesnt even have source code.
is there an offline tool i can use to recursively minimise a directory full of js files to manually upload?

edit: just saw there is an update. i will try that then report back. maybe it works now.

Have you got debug mode turned on?
 
Quick question... because I'm having a totally blonde moment and can't remember...

  1. Ensure the directories /js and /js-old are writeable by PHP (chmod or otherwise).

Does that mean that the folders/directories should be set to have a numeric value of 755?
 
Hmm, when I do step 4. I get the following error:

Server Error

file_put_contents(js/jquery/jquery-1.4.2.min.js) [function.file-put-contents]: failed to open stream: Permission denied
  1. XenForo_Application::handlePhpError()
  2. file_put_contents()inDark/XFOptimise/ControllerAdmin/Kondou.phpat line56
  3. Dark_XFOptimise_ControllerAdmin_Kondou->actionMinifyjs()inXenForo/FrontController.phpat line310
  4. XenForo_FrontController->dispatch()inXenForo/FrontController.phpat line132
  5. XenForo_FrontController->run()in/usr/www/users/csforum/xen/admin.phpat line13

It did that with the permissions set to 755 so I changed it to 777 but it's still producing this error.
 
You might have to do it recursively

Okay, I tried that but it's still not working... Came up with a very slightly different error message this time:

Server Error

chmod() [function.chmod]: Operation not permitted
  1. XenForo_Application::handlePhpError()
  2. chmod() in XenForo/Helper/File.php at line 122
  3. XenForo_Helper_File::makeWritableByFtpUser() in Dark/XFOptimise/ControllerAdmin/Kondou.php at line 58
  4. Dark_XFOptimise_ControllerAdmin_Kondou->actionMinifyjs() in XenForo/FrontController.php at line 310
  5. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  6. XenForo_FrontController->run() in /usr/www/users/csforum/xen/admin.php at line 13
 
Looks like the folder isn't owned by PHP or your server is just being really restrictive :/

Try commenting out the two XenForo_Helper_File::makeWritableByFtpUser lines in /library/Dark/XFOptimise/ControllerAdmin/Kondou.php (58 and 59), and if necessary line 37 too.
 
Status
Not open for further replies.
Top Bottom