Tools

Custom horizontal and vertical scrollbars at a time with jQuery

2010

A client of mine wanted to use custom scrollbars for a website. I quickly found Kelvin Luck’s jQuery plugin for modifying the browser’s scrollbar. So, jScrollPane works great for vertical scrollbars and integrates neatly with Wordpress, when calling it like this from the <head> section:

var $j = jQuery.noConflict();
$j(function(){
    jQuery('.scroll-pane').jScrollPane({scrollbarWidth:10});
});

However, the client also wanted the horizontal scrollbars customized…
It strangely took me several hours to stumble upon the modification of Luck’s plugin by Threeformed, a canadian media company.
But I ran into problems integrating it with Wordpress’ noConflict function and had to modify all the calls to “$”, into “jQuery”. It then worked out, but I needed to be able to design it via CSS independently of the vertical scrollbars. In order to do that I added a second CSS selector, through which I was then able to design the horizontal scrollbars using other background images than for the vertical ones. +

Wordpress Galleria plugin autoplay

2010

For a client I was looking for a slideshow which could be easily integrated with Wordpress and galleria-wp has been my choice.
It just does not start the slideshow automatically…

In order to do this I added the following lines of code to the showNavigation if-loop :

if ( $showNavigation == 1 ) {
  // code..
} else {
  // autoplay
  jQuery(window).load( function() {
  timerID_$galleryID = setInterval( \"jQuery.galleria.next( 'stage_$galleryID', '$galleryID' );\", $intervalMilliSec );
 });
}

So, if one unselects “show navigation” in wp-galleria’s admin panel in Wordpress, the slideshow will autoplay.

php-indexes – a file tree generator

2009

php-inphp-indexes generates an index of files in a defined folder, similar to the Apache file listing. It also generates an RSS feed. It does not require a database and is configurable via it’s config file:

  • title and description may be modified
  • search engine friendly permalink support (thank you Manu)
  • define the number of entries in RSS feed
  • modify style to your needs

php-indexes is distributed under the GNU Public License (GPL), version 3. Use at your own risk.

I’m happy with feedback & criticism.

download php-indexes_v0.0.9.zip / php-indexes_v0.0.9.tar.gz

Back to the future with genethumb.sh

2009

genethumbI have to admit that I converted Sam Hocevar’s 11 year old gallery generator bash script to something more up to date html-wise just for fun. I added an HTML5  header, replaced the ugly table layout by a list and edited the inline stylesheet to a liquid layout.
(Actually, I took the version of Chris Ness because I liked to have a video section too.)

However here is genethumb.sh v0.1.2_u.

Bash video/audio stream recorder script

2008

I made this script with the help of a colleague. You can program stream recordings with it, and it works pretty well. It uses the GUIless interface of VLC, cVLC. Probably you could do the same with mplayer/mencoder. The scripts are published under the WTF Public Licence.