'; } } function modmatHeaderImage() { $header = get_option('modmat_header'); $random = get_option('modmat_random'); if ( $random == "on" ) { echo " style=\"background-image:url('"; bloginfo('template_directory'); echo "/headers/"; modmatRandomHeaderImage(); echo"');background-repeat: no-repeat;\""; } else if ( $header != "" ) { echo " style=\"background-image:url('"; bloginfo('template_directory'); echo "/headers/" . $header . "');background-repeat: no-repeat;\""; } } function modmatRandomHeaderImage() { global $styleFolder; if ($handle = opendir($styleFolder . '/headers')) { $i = 1; while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $arr[$i]['header'] = $file; $i++; } } $randomCount = rand(1, count($arr)); echo $arr[$randomCount]['header']; } } function listAvailableHeaders() { global $styleFolder; if ($handle = opendir($styleFolder . '/headers')) { $header = get_option('modmat_header'); $random = get_option('modmat_random'); echo ''; } } function listAvailableWidths() { $width = get_option('modmat_width'); echo ''; } function modmat_options() { ?>

Header Options'; echo '

Header: '; listAvailableHeaders(); echo '

'; echo '

Random Header?:

'; echo '

'; echo '

Width Options

'; echo '

Width: '; listAvailableWidths(); echo '

'; ?>


Help

Headers

To use you own header, upload the image to the "headers" folder within the theme folder, then activate it via this page.

Header images should be around 400px by 105px, are aligned so that the top right of the image is positioned in the top right of the header box. Anything over this size won't affect the size of the box, it'll just be hidden.

To use random headers, simply put a tick in the box and save your options. The theme will scan the "headers" folder for any files and display one at random. So don't keep any images in there that you don't want to be included in the rotation!

 

 

Anything else?

I'm relatively new to the world of theme development, so I'd appreciate any feedback or big reports - if I dont know theres a problem, I can't fix it! Leave a comment on the project page, or drop me an email.

 

Otherwise, thanks for downloading them theme, and enjoy! :)