coppermine-gallery.com/forum

Support => cpg1.3 Themes/Skins/Templates => cpg1.3.x Support => Older/other versions => cpg1.3 theme contributions => Topic started by: donnoman on November 26, 2004, 12:23:27 AM

Title: New Theme: PowerBookG4
Post by: donnoman 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]
Title: Re: New Theme: PowerBookG4
Post by: Hein Traag 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!
Title: Re: New Theme: PowerBookG4
Post by: kiig 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 :
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)
Title: Re: New Theme: PowerBookG4
Post by: Casper on November 26, 2004, 02:27:58 PM
Your site looks good in that theme Kim. http://igel.it/gallery/index.php?theme=powerbookg4
Title: Re: New Theme: PowerBookG4
Post by: kiig on November 26, 2004, 02:33:19 PM
yeah, - but have you clicked on one of the images ?
Title: Re: New Theme: PowerBookG4
Post by: Nibbler on November 26, 2004, 02:37:59 PM
@kiig: http://pmichaud.com/pipermail/pmwiki-users_pmichaud.com/2004-June/005390.html
Title: Re: New Theme: PowerBookG4
Post by: kiig 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.
Title: Re: New Theme: PowerBookG4
Post by: kiig on November 26, 2004, 02:58:34 PM
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.
Title: Re: New Theme: PowerBookG4
Post by: rphMedia on November 26, 2004, 04:26:54 PM
That is a nice one, thanx.
Title: Re: New Theme: PowerBookG4
Post by: donnoman 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.


        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;
         }



Title: Re: New Theme: PowerBookG4
Post by: donnoman 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.
Title: Re: New Theme: PowerBookG4
Post by: donnoman 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.



Title: Re: New Theme: PowerBookG4
Post by: Casper 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.
Title: Re: New Theme: PowerBookG4
Post by: kiig 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.
Title: Re: New Theme: PowerBookG4
Post by: kegobeer on November 27, 2004, 04:13:02 PM
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.
Title: Re: New Theme: PowerBookG4
Post by: donnoman 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?
Title: Re: New Theme: PowerBookG4
Post by: kegobeer 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
Title: Re: New Theme: PowerBookG4
Post by: donnoman 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.
Title: Re: New Theme: PowerBookG4
Post by: kiig 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.
Title: Re: New Theme: PowerBookG4
Post by: donnoman 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.
Title: Re: New Theme: PowerBookG4
Post by: Joachim Müller on December 01, 2004, 10:23:07 AM
Wow, this is an extremely nice theme, especially the nav tabs are great.
However, I have to report an issue using v13 of the theme with Firefox (doesn't happen with IE) when going to any meta album (like "Last upload", "Last comments" etc.). See attached screenshot and the html output I get.

Joachim
Title: Re: New Theme: PowerBookG4
Post by: donnoman on December 02, 2004, 03:42:31 AM
I don't think it's my theme GauGau. I can't reproduce it with firefox on the demo site.

HOWEVER, the demo site AND the forums have been running DOG slow for me.

I also downloaded the htm file, threw it in my cpg folder, and it renders just fine and doesn't show the problem you have a pic of.

Did you try refreshing the page when that happened?



Title: Re: New Theme: PowerBookG4
Post by: Joachim Müller on December 02, 2004, 09:00:55 AM
our webhost sf.net is currently doing maintenance/server upgrades, that's why the site/forum is so slow currently - nothing we can do about this. Of course I tried refreshing, the same thing happens with all kinds of meta albums. Not sure if it's me, I'll check further at work on some other boxes. You can take a look for yourself: http://coppermine.sourceforge.net/demo/index.php?theme=powerbookg4 - thanks in advance for further looking into this issue.

Joachim
Title: Re: New Theme: PowerBookG4
Post by: Hein Traag on December 02, 2004, 09:07:31 AM
Installed the them here http://www.rondvierkant.nl/stoffelsite/thumbnails.php?album=lastup
And got a good result from it. GauGau could your problem be related to the server maintenance somehow?
Title: Re: New Theme: PowerBookG4
Post by: Casper on December 02, 2004, 12:48:20 PM
I had the same result as Joachim, on about 3 out of every 5 reloads, when viewing the demo.
But I had no such problems with Heins site.
Title: Re: New Theme: PowerBookG4
Post by: Hein Traag on December 02, 2004, 03:39:18 PM
Maybe reinstalling the theme on the demo site ? Or has that been done already ?
Title: Re: New Theme: PowerBookG4
Post by: Joachim Müller on December 05, 2004, 11:34:49 AM
yes, I reinstalled the theme already. I'm not sure what's wrong, maybe it's just me. If anyone should experience issues similar to the ones I posted about, please reply. If nobody does, I guess this is somehow related to me being stupid ;).

Anyway, here are the "official" links:
Joachim
Title: Re: New Theme: PowerBookG4
Post by: Casper on December 05, 2004, 02:31:48 PM
Quote from: Casper on December 02, 2004, 12:48:20 PM
I had the same result as Joachim, on about 3 out of every 5 reloads, when viewing the demo.
But I had no such problems with Heins site.

Still happening for me.  It even happened once on the album list, so it affects the entire menu, not just the meta albums.
Could it be related to the terrible server speed we are getting at sourceforge.
Title: Re: New Theme: PowerBookG4
Post by: kiig on December 05, 2004, 09:16:55 PM
For what's is worth, - I dont see this problem on my site http://igel.it/gallery no matter how many times I reload.

I've tried sitting on the lan next to the server, - and a 768 K connection as well as a 256 K line.... I dont' see the problem at all.
Title: Re: New Theme: PowerBookG4
Post by: donnoman on December 05, 2004, 11:09:48 PM
I haven't seen the problem either, even on the demo site.

I am assuming everybody has upgraded to the released version of FF, and not using the preview still? ::)
Title: Re: New Theme: PowerBookG4
Post by: Joachim Müller on December 06, 2004, 12:01:03 AM
happens on FF1.0 as well as 0.9 (localized German versions). I'll install the english version on an english Windoze box tomorrow at work and re-check.

Joachim
Title: Re: New Theme: PowerBookG4
Post by: Charles Scott on April 06, 2005, 06:02:40 PM
donnoman, this is awesome work. Thank you.

Question: How do I add an additional menu option? I want to add an option to send a user to another website.

I want it to be to the left of "My Gallery" or to the right of "Search".

Ideas?

BTW, my gallery is at http://wwgallery.dungeonkeepersdomain.com/index.php
Title: Re: New Theme: PowerBookG4
Post by: donnoman on April 07, 2005, 06:33:07 AM
In powerbookg4 you can simply modify the button array so for example if you edit theme.php and
find:

// {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}
addbutton($main_menu1_buttons,'{MY_GAL_LNK}','{MY_GAL_TITLE}','{MY_GAL_TGT}','my_gallery');


replace with:

// {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}
addbutton($main_menu1_buttons,'Forum','dungeonkeepers forum','http://www.dungeonkeepersdomain.com/forum','forum_link');
addbutton($main_menu1_buttons,'{MY_GAL_LNK}','{MY_GAL_TITLE}','{MY_GAL_TGT}','my_gallery');


Will give you a button before the my gallery button. the fourth option "block_id" needs to be there, has to be unique, but other than that can be whatever you want; it isn't used by coppermine for the custom buttons you make.

Title: Re: New Theme: PowerBookG4
Post by: Charles Scott on April 07, 2005, 02:58:39 PM
Sweet!! Thank you very much.
Title: Theme: PowerBookG4 - how to fix height size?
Post by: fraula on June 07, 2005, 03:13:05 PM
Hello,

I got your theme. Very very nice! However, I was only after the Aqua theme, so I got rid of the laptop screen "look and feel"(I hope you don't mind). I made further changes to it (e.g. main menu items) but now I am stuck with the resize facility. I can resize fine the width through the admin configuration or even through the style sheets but I CAN"T change the height!.

I need the gallery to be about 280px height. I know that having more albums it wouldn't fit in that small space and that's why I would like an auto scrolling to come up for content that exceeds that size. I simply can't figure out how to do it. I tried all the possible (I guess) options in the style.css in the part where it defines the width. Changes to height simply don't work.

Could you be so kind to help me out on this? Is it possible in the first place? Maybe this is a feature that Coppermine doesn't support?

Thank you in advance.

:)
Title: Window's height resize - how to fix it?Heeeeelp!!!!!
Post by: fraula on June 07, 2005, 04:57:58 PM
Hello,

I installed the "new PowerBook" theme. Very very nice! I made some changes to it (e.g. main menu items) but now I am stuck with the resize facility. I can resize fine the width through the admin configuration or even through the style sheets but I CAN"T change the height!.

I need the gallery to be about 280px height. I am aware that having more albums it wouldn't fit in that small space and that's why I would like an auto scrolling to come up for content that exceeds that size. I simply can't figure out how to do it. I tried all the possible (I guess) options in the style.css in the part where it defines the width. Changes to height simply don't work.

Could you be so kind to help me out on this? Is it possible in the first place? Maybe this is a feature that Coppermine doesn't support?

Thank you in advance.  :-\\
Title: Re: New Theme: PowerBookG4
Post by: donnoman on June 08, 2005, 07:22:39 AM
post a link to your gallery, I'm having a hard time visuallizing what the problem is.
Title: Re: New Theme: PowerBookG4- resize
Post by: fraula on October 08, 2005, 04:52:20 PM
Hello,
sorry I've been away and in the meanwhile I forgot my password for this forum and also to renew hosting for my gallery.... :-\\

Now that I got a new password and just renewed the hosting space, I will post the link to the gallery a.s.a. they enable my account again.  :P

I hope you will be able to help me with this resize height issue.

Thanks
F.
Title: Re: PowerBookG4 theme -resize height
Post by: fraula on October 09, 2005, 11:41:03 PM
Hello,
I'm back. They enabled again my space on the hosting server therefore my miserable attempt of setting up this gallery is up on display again. http://www.picturestudio.biz/gallery/

Now, all I wanted is to be able to keep the height at 280px regardless how many rows/categories I'll add. Basically I'd love to define the height to 280px and if the page exceeds, to have a scroll bar. Is it possible? You might wonder why I want it like that. That's because I want to create the other pages of the website as stickers and have a sense of consistency when I want to view the gallery section.

The only solution I could think of so far, is to create an iframe and then load Coppermine gallery inside that.

I really hope you can help me, guys. I need to finish off this website at some point...in my life ;-)

Thanks
Title: Re: New Theme: PowerBookG4
Post by: donnoman on October 10, 2005, 09:33:44 PM
I can't think of a way other than an I-Frame. I think your going to have to go that direction.