Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: New Theme: PowerBookG4  (Read 40654 times)

0 Members and 1 Guest are viewing this topic.

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
New Theme: PowerBookG4
« on: November 26, 2004, 12:23:27 am »

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]
« Last Edit: December 01, 2004, 10:12:10 am by GauGau »
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: New Theme: PowerBookG4
« Reply #1 on: November 26, 2004, 12:32:08 pm »

oh my oh my :) excellent work!

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

kiig

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: New Theme: PowerBookG4
« Reply #2 on: November 26, 2004, 01:47:21 pm »

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 :
Code: [Select]
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)
Logged
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: New Theme: PowerBookG4
« Reply #3 on: November 26, 2004, 02:27:58 pm »

Your site looks good in that theme Kim. http://igel.it/gallery/index.php?theme=powerbookg4
Logged
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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: New Theme: PowerBookG4
« Reply #4 on: November 26, 2004, 02:33:19 pm »

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

Nibbler

  • Guest
Logged

kiig

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: New Theme: PowerBookG4
« Reply #6 on: November 26, 2004, 02:39:10 pm »

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

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

kiig

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: New Theme: PowerBookG4
« Reply #7 on: November 26, 2004, 02:58:34 pm »

I changed
Code: [Select]
ctype_digit(... to
Code: [Select]
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.
Logged
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: New Theme: PowerBookG4
« Reply #8 on: November 26, 2004, 04:26:54 pm »

That is a nice one, thanx.

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: New Theme: PowerBookG4
« Reply #9 on: November 26, 2004, 06:59:02 pm »

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.

Code: [Select]
        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;
          }


« Last Edit: November 26, 2004, 09:47:39 pm by donnoman »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: New Theme: PowerBookG4
« Reply #10 on: November 26, 2004, 09:21:51 pm »

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.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: New Theme: PowerBookG4
« Reply #11 on: November 27, 2004, 07:59:03 am »

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.



Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: New Theme: PowerBookG4
« Reply #12 on: November 27, 2004, 11:38:20 am »

Hi donnoman,

I have edited your first post to replace the original zip with this latest.  Nice work.
Logged
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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: New Theme: PowerBookG4
« Reply #13 on: November 27, 2004, 04:07:43 pm »

@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.
Logged
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: New Theme: PowerBookG4
« Reply #14 on: November 27, 2004, 04:13:02 pm »

Quote
I 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.
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: New Theme: PowerBookG4
« Reply #15 on: November 27, 2004, 07:20:08 pm »

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?
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: New Theme: PowerBookG4
« Reply #16 on: November 27, 2004, 08:06:25 pm »

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
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: New Theme: PowerBookG4
« Reply #17 on: November 27, 2004, 08:36:09 pm »

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.
Logged

kiig

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: New Theme: PowerBookG4
« Reply #18 on: November 28, 2004, 11:54:51 pm »

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.
« Last Edit: November 29, 2004, 12:06:16 am by kiig »
Logged
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: New Theme: PowerBookG4
« Reply #19 on: November 29, 2004, 12:48:43 am »

@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.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.038 seconds with 22 queries.