User talk:Svemir Brkic

SphinxSearch
Svemir, I have been attempting to implement SphinxSearch into my wiki. The instructions are not great for us poor windows users. How do I perform steps 5 & 6 on windows? Please let me know if this is not the correct location to ask this type question.

Steve Goble 16:17, 13 May 2008 (UTC)


 * Correct place is Extension talk:SphinxSearch‎. Windows version of Sphinx has certain limitations, but I never installed it on Windows myself. Some other people on that talk page apparently did. Svemir Brkic 16:44, 13 May 2008 (UTC)
 * THANKS, I'll try it. Steve Goble18:26, 14 May 2008 (UTC)

Using thttpd
Dear Svemir, I saw you comment that you are using thttpd to serve your static content which is exactly what I am trying to achieve. Please would you consider posting a guide as to how you did it. JohnShep 22:36, 21 March 2008 (UTC) Svemir Brkic 02:00, 22 March 2008 (UTC)
 * Install thttpd
 * Edit the configuration file, setting dir to your current $wgUploadDirectory (where images are) and port to something different than what your web server runs on:
 * thttpd needs all the files to be in the same folder, at least by default, and symlinks are not allowed. Move the skins folder into the folder specified by "dir" above
 * Just in case, create a symlink from the original skins location to the new one. You could also copy the folder instead of moving it, but then you have to maintain two copies. Whatever you do, keep it in mind next time you upgrade your wiki.
 * Set relevant paths in your LocalSettings.php (these settings may not work for you, as we have a very customized install.)

Many thanks for getting back to me :-) I shall add what I have done and maybe after tidying up this will make a good HowTo for other people.

I already use thttpd for static images and have it configured on a different IP on the same box bound to http://static.myserver.com In the root directory of thttpd I put a symlinks to the images and skins directories of mediawiki (don't want to mirror the whole structure as thttpd will serve php files as text) and therefore need the -nos option for thttpd. Also I found that thttpd runs a lot better with no log so -l /dev/null if logging is enabled sometimes it crashes during logrotate.

I edited skins/monobook/main.css and changed the url includes :- This looks to have been unnecessary and I shall try your method of the $wgStylePath instead.

Again many thanks, I really appreciate you helping me with this JohnShep 09:25, 22 March 2008 (UTC)

running Yslow
I made the style path change and ran Yslow, the number of requests to apache fell from 15 to 5 there are still three css files and one js file :-

http://www.boxrec.com/media/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000

http://www.boxrec.com/media/index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000

http://www.boxrec.com/media/index.php?title=-&action=raw&gen=css&maxage=18000&smaxage=0

http://www.boxrec.com/media/index.php?title=-&action=raw&smaxage=0&gen=js&useskin=monobook

So there are still 5 times as many apache requests to generate the page as optimal, two of which are for empty files :-(

JohnShep 11:34, 22 March 2008 (UTC)


 * These exists to allow adding custom CSS via the wiki itself. If you do not need to support such a feature, you can add all custom CSS to one or more of the static files and comment out these lines in Monobook.php and other skins (if you use any.) If you do need to support such a feature and still want to serve that custom CSS via thttpd, you could use a hook to write out that CSS into static files each time those pages are edited. Svemir Brkic 13:29, 22 March 2008 (UTC)

OK great, I edited /includes/Skin.php and commented out two lines :- I edited /includes/SkinTemplate.php and commented out two lines :- which removed the two empty css files :-)

JohnShep 16:04, 23 March 2008 (UTC)