|
Oct 04
|
|
Sep 14
|
|
Aug 29
|
After getting most of the WordPress theme ports updated it was time to start on another cool theme port. Well, lo and behold Fabri came along just in time to suggest such a theme. So i3theme 1.7 Classic (Center Edition) by N.Design Studio was tackled and if I say so myself, I believe it turned out quite nice (after a couple of hiccups of course).
There are a lot of changes and additions to the theme.php file so be sure to read the “readme.txt” that is in the directory. I know… who reads the readme.txt but don’t complain if you spend hours trying to figure something out and it’s been right in your face the whole time.
The Coppermine admin config has a couple of wide tables which can wreck havoc on a fixed width theme mainly the groups and users managers. There are times when using tables are necessary and this is one of them but still…. I HATE IE! I got tired of hacking css to deal with IE and scroll bars that I figured out a simple script to determine when to use a scroll bar when these pages are accessed. The below code will switch the css styling to use a scroll bar but only on these pages. Now IE won’t go off and show scroll bars because it’s cranky. The function looks like this:
function scrollbar() { if ($_SERVER['PHP_SELF'] == 'usermgr.php' || $_SERVER['PHP_SELF'] == 'groupmgr.php') { $content = '<div id="content_scrollbar">'; } else { $content = '<div id="content">'; } return $content; }
Assign this function to a {TOKEN} in the pageheader:
function pageheader($section, $meta = '') { ... $template_vars = array('{LANG_DIR}' => $lang_text_dir, '{TITLE}' => $CONFIG['gallery_name'] . ' - ' . strip_tags(bb_decode($section)), '{CHARSET}' => $charset, '{META}' => $meta, '{GAL_NAME}' => $CONFIG['gallery_name'], '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'], '{SYS_MENU}' => theme_main_menu('sys_menu'), '{SUB_MENU}' => theme_main_menu('sub_menu'), '{ADMIN_MENU}' => theme_admin_mode_menu(), '{CUSTOM_HEADER}' => $custom_header, '{SCROLLBAR}' => scrollbar(), ); ... }
then place this {SCROLLBAR} token in the template.html page where the content <div> is located.
... <!-- custom token for setting conditional CSS style for scrollbar in content area. This instead of <div id="content"> --> {SCROLLBAR} {GALLERY} <div class="cpg_footer"> {THEME_SELECT_LIST}{LANGUAGE_SELECT_LIST} {LANGUAGE_SELECT_FLAGS} {VANITY} </div> <!-- End custom token for content --> ...
What’s nice about this is now I don’t have to deal with IE hacks and it’s sure to work with all browsers.
Other features that were added are:
*truncated album descriptions*
*truncated image captions*
*simple search bar*
*opacity driven image links*
*cool admin menu icons by Francois Keller*
Check it out on the Coppermine demo site.
Later!



Recent Comments