New Theme: PowerBookG4 New Theme: PowerBookG4
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

New Theme: PowerBookG4

Started by donnoman, November 26, 2004, 12:23:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

donnoman

PowerBookG4 Theme for Coppermine 1.3x  v1.0 Donnoman@yahoo.com

I wanted to come up with a simple theme that would represent what Coppermine might look like as a native application on my Apple G4 Powerbook Notebook. Hence the name.

One peculiar aspect of this project is that despite my work's Apple G4 PowerBook being the inspiration; there were no actual Apple products involved with the production of this theme.

Adobe Photoshop 6.0: for Graphics Manipulation
TsWebEditor: Awesome Open Source text editor for PHP and HTML (http://www.tswebeditor.tk)
Frontpage 2002:  WYSIAWYG (What you see is ALMOST what you get) HTML editing and layout.
All done on a PC running Windows XP.

Design Requirements:

Should attempt to replicate the look and feel of a PowerBookG4 running Coppermine as a native application.
Content shouldn't have to fight the theme for screen space.
Theme needs to be scalable for users of large and small monitors.
If it can't fit on the screen the user should be able to use the scrollbars to see 100% of the content.

Features:

I incorporated the tabbed browsing type of buttons for {MENU2} like Safari.
I like the lamps in the top left, (OSX Minimize/Maximize/Close buttons). (They do absolutely nothing... but look cool)
New gel like rating buttons.
All graphics in the powerbookg4 images directory with the exception of the tile.gif are original works by Donnoman@yahoo.com.

Credits:
The original theme.php, style.css, and tile.gif came from Rainy_Day from the distribution of Coppermine 1.32.

Sources:
In the interest of keeping the file size smaller, I'm not releasing the source .PSD's that were involved in the production of this theme. Email me if you feel you need them.

Permissions:

This program is free software; you can redistribute it and/or modify     
it under the terms of the GNU General Public License as published by     
the Free Software Foundation; either version 2 of the License, or         
(at your option) any later version.   


EDIT (casper), I have removed the original and replaced it with the improved version.


[attachment deleted by admin]

Hein Traag

oh my oh my :) excellent work!

Was looking for a skin where the buttons were intergrated into the layout and this it :) Thanks!

kiig

Great looking theme.... and very nice buttons :-)

I do get an error though, - when I try to go into one of my albums from the front page :
Fatal error: Call to undefined function: ctype_digit() in /home/e-smith/files/ibays/gallery/html/themes/powerbookg4/theme.php on line 1574

ctype_digit should work from php version 4.04 onwards, - and I'm running 4.1.2.

If it's only my setup, - then no problem, -  I can look into it later, - but if it's a more general thing, - you might like to know it.

Kim Igel.

(I changed my theme back again, - so I have no link to refer to)
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

Casper

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

kiig

yeah, - but have you clicked on one of the images ?
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)


kiig

Thanx Nibbler.... then it's just me ... :-) or everyone else running 4.1... but thanx again.

Kim Igel.
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

kiig

I changed ctype_digit(... to is_int( in theme.php and now it works. Both is_int and ctype_digit returns TRUE is the variable is 'all-digits' / an integer, - and False if it contains non-digits / is not a number... so it shouldn't break anything.


Kim Igel.
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

rphMedia


donnoman

#9
Changing the Ctype to is_int or is_numeric gets you past the difficulty of the ctype, however they don't DO what the ctype did.

Checking if the album is numeric will allow the "album list" button to be rendered as the active button as it's the best match if the album is a number.

I originally used is_numeric and found that it always returned as if it was a string.  I assumed is_int would do the same and a friend told me about ctype, it worked so I didn't look any further.

This might also be why your "album list" isn't set active by default, Kiig I'd like you to apply this fix and then I'll check and start troubleshooting why your "album list" isn't active.

Thanks Nibbler for that article, I rewote that line with a preg_match.


        if (!strcmp($HTTP_GET_VARS['album'],$button[3]) or ((preg_match('[0-9]',$HTTP_GET_VARS['album']) or !strcmp($HTTP_GET_VARS['album'],'random')) and !strcmp('album_list',$button[3]))) {
          $am_active = 1;
         }




donnoman

Joachim, if you read this thread don't post powerbookg4 on the demo site, until I can figure out why Kiig's installation isn't working correctly.

I'll re-upload the theme with the preg_match fix and any additional that might be necessary.

donnoman

I found another machine that I was able to duplicate the problem with the Album List, nor was the "search" button activated correctly.

I had used the $_ENV['script_name'] variable that apparently isn't always available. I changed to the $_SERVER['script_name'] variable.

I don't know what the real difference is, according to the docs I read they are both supposed to be available in PHP 4.10 up.

The machine I duplicated this on was a PHP 4.3.4.

In any case, this version of the theme should be golden. It includes the preg_match fix that was discussed earlier, as well as changing to the $_Server Vars.

Joachim, I think your safe to put it on the demo site when you get an opportunity.




Casper

Hi donnoman,

I have edited your first post to replace the original zip with this latest.  Nice work.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

kiig

@Donnoman. I have changed the code as you suggested (using preg_match) and I no longer get errors,- and apparently all is working.

I'll leave the theme on, - if you want to eksperiment. http://igel.it/gallery

Thanx for the suggestion.

Do I have a Album List not active problem... ?? :-)

In theory, - is_int should should return true if the entire 'content' is a number.... as ctype_digit should...

preg_match.... will it return true, - if 'albums' contain a number, - any number, - no matter what the rest of the content of 'album' can be ?

I'm not arguing, - and I haven't looked into it, - and as I don't know what 'album' is supposed to contain, - I have no way of telling if this works as expected.... but I feel preg_match should 'do' something slightly different than ctype_digit.

But feel free to try my setup if you want to test it on that particular setup (yell if you need administrative rights)

Setup : SME server (from http://contribs.org), - php 4.1.2

Kim Igel.
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

kegobeer

QuoteI had used the $_ENV['script_name'] variable that apparently isn't always available. I changed to the $_SERVER['script_name'] variable.

Unless you include "E" (Environment variables) in variables_order in php.ini, you can't use $_ENV.  For example, mine is set to GPCES.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

donnoman

Kiig, it's still not working right, (I'm assuming because its still using the _ENV variable instead of the _SERVER variables.

I'm reasonably certain if you download the updated theme, or make the change from _ENV to _SERVER it will work.

Look in the first post and download  cpg1.3.x_theme_powerbookg4_13.zip (45 KB - downloaded 1 times.)

Thanks Casper, appreciate the help.

Thanks Kegobeer for your explanation, I didn't know which variable to choose, on the servers I tested _ENV worked fine, so I didn't suspect any issues.

I'm assuming since you didn't caution me about using _SERVER that it should be ok to use.  There were at least 4 other variables that I could get identical information out of, what is generally the best one to use?

kegobeer

Visit php.net for a list of common $_SERVER variables.  It's a great resource for php coding in general.

http://us2.php.net/manual/en/reserved.variables.php#reserved.variables.server
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

donnoman

Yeap, thanks Keg... I consulted that page before and after I released the theme, I didn't gather from the section on _ENV that it WOULDN'T be available on different systems.

It cautions at the top of the page, that some of the variables may not be on some systems, it has that waring in the _SERVER section as well.  So I guess it was 50/50 that I chose the wrong one to begin with.

No big deal, I'll know for the future.

kiig

#18
I've just updated my site with the latest version of your theme, - Donnoman. Again, - it appears to be working, - but I don't know what to look for.


Kim Igel.
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

donnoman

@kim PERFECT!

What I was looking for was that "Albumliste" came up as the Active button with the wrap around border that connects it visually to the first menu, as opposed to the darker grey of the rest of the sunken buttons.

Before they were all coming up as sunken.

There are a few places where this would normally happen, like if you are in the ADMIN menus, all of {MENU2} would appear sunken, because there isn't a decent enough match to make any of them active.

From a user's perspective, "Albumliste" should be active most of the time as the users are navigating your gallery.

Hope that helped.