Advanced search  

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

Pages: [1]   Go Down

Author Topic: GrimmDF - Theme for cpg1.4.x and WordPress 1.5  (Read 23877 times)

0 Members and 1 Guest are viewing this topic.

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« on: August 21, 2006, 03:36:25 pm »

Hi All,

Here is another WordPress theme that I came across and thought had a nice layout that would fit Coppermine. This design is by Viitoria at http://www.darkfaerytale.com/2006/06/29/grimmdf/. There were a couple of IE layout issues that needed to be addressed but I think I got most of them (I really dislike IE during these testing phases). I tested this on Firefox 1.5x and IE 6.0x.

A couple of the Config pages (Users, Groups, Ecards) expand outside the edges but are still very readable so no need to force a scroll bar. The only main issue is that the Welcome paragraph at the top is static and shows on every page but maybe a random picture using CPMFetch, http://forum.coppermine-gallery.net/index.php?board=57.0 or a php script like random.php will provide you with a more dynamic layout if you wish. Random.php displays graphics but you could make graphic of several text based comments like, "words of wisdom" and then they would randomly be displayed in the theme. I'm sure with all the artistic minds here at Coppermine, there will be many solutions. Also, the little picture above the menu list can be swapped out and if used with random.php, can be different after every reload.

Enjoy and if you find any layout issues, please post them here for fixes.

Cheers,

Billy  :D

[edit] uploaded new GrimmDF.zip file to correct title issue
« Last Edit: August 21, 2006, 11:01:47 pm by Gizmo »
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #1 on: August 21, 2006, 09:41:38 pm »

Hate to say it, but there's an issue with GrimmDF and Firefox when you have a larger name for your gallery. See screenshots (taken with resolution 1024x768).

Demo - Download
« Last Edit: October 22, 2008, 10:34:24 am by Joachim Müller »
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #2 on: August 21, 2006, 10:59:54 pm »

Yea, this is a problem using "fancy" layouts with short title space. In order to test, I looked through the forum user galleries and made a name for my test gallery that was longer than any I ran acrossed which is 22 characters long but I guess I should use the demo name which is much longer.

I changed and commented the title and description css properties and uploaded the new gallery in the initial post. It should be straightforward and easy for any users to change this if they wish. It looks as it should now with the demo name.

Cheers,

Billy
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Fabrian

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 126
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #3 on: August 23, 2006, 02:54:39 am »

Nice work Gizmo.  I really hope you keep going with the Wordpress themes...there's a lot of good looking ones out there.  They look soooo much better than any of the basic CPG's plus there are tons of WP users that use coppermine just waiting for their theme to be done..
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #4 on: August 23, 2006, 02:19:20 pm »

Thanks for the compliment. :D While not always trival, it's not all that hard to convert a theme over to CPG. One needs to test.... test.... test... I think the biggest issue is with the configuration menus (groups, users, ecards for example) that are wider than 600px but if care is taken, this can be minimized with a scroll bar or just let it over run (not pleasing to eye). Since only an admin will see this, I don't think it should stop someone from using a particular theme. Maybe a future release will address this but other than that, you can't beat the quality and usability of Coppermine. A good place for information to starting or converting a theme is http://forum.coppermine-gallery.net/index.php?topic=24056.0. That's how I learned about it!  ;)

If someone needs help in creating or converting a theme whether their own, from WordPress or any other source, all they need to do is ask here in the forum as there are many users here that are always willing to help. Like I said, the hardest part is testing before releasing it to the general public (ummm... maybe I should have taken my own advice on this particular theme!  ::) ). However, the theme should not be copyrighted or a "pay for a single use". It's best if it's released under GPL - http://www.opensource.org/licenses/gpl-license.php. Also, if converting a theme, it's cool to list the original author and give credit for their artistic work. In my opinion, this is very important!

Cheers,

Gizmo
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

akulion

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #5 on: October 23, 2006, 11:59:15 pm »

Brilliant & Beeautiful Theme

Its just wonderful!! Those text size issues dont even matter - its a small thing :D

I do however have a small question:

- How can I add other links to the small grey menu?
I want to add one link "Forum" which leads back to my forum.

** edited theme.php - solved :D

Thanks
« Last Edit: October 24, 2006, 12:15:10 am by akulion »
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #6 on: October 24, 2006, 01:30:36 am »

Hey Karma,

Glad you like it. I uploaded a corrected version to my original post up top that takes care of the LARGE text in the title however I'm glad you managed to fix it yourself.

Cheers,

Gizmo
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #7 on: October 20, 2008, 08:47:08 pm »

Hello Everyone,

I've updated this theme with some of the other features I've put in most of my themes such as truncated album descriptions, intermediate image resizing to fit the theme width but there is also one other feature that's been asked more many times in the forum and that's for a random image to be displayed. You can read about it further down in this post.

I've overwritten some of the configuration settings by using variables in the theme.php file and added a new variable for retrieving the album description. The reason for this is to prevent the standard settings in the Configuration tables set by you from "breaking" the theme. If you wish to change these settings, do so here or delete them altogether and use the Configuration Manager in Coppermine. These changes are:

// These parameters overide what the user inputs in the Configuration setup to prevent the theme from breaking.
$CONFIG['max_film_strip_items'] = 4; //overrides the number of thumbnails.
$CONFIG['thumbcols'] = 4; //overrides the number of columns for thumbnails.
$CONFIG['main_table_width'] = '100%'; //overrides the Width of the main table (pixels or %).
$CONFIG['picture_table_width'] = '100%'; //overrides the Width of the table for file display (pixels or %).
$CONFIG['album_list_cols'] = 2; // sets "Number of columns for the album list = 2"
$CONFIG['first_level'] = 0 ; //sets "Show first level album thumbnails in categories = no".
$album_desc = get_album_desc($_GET[album]);

This theme has the first level of album thumbnails turned off to make large galleries look move attractive. This will prevent the main page from being cluttered with thumbnails and easier to chose a particular category. There is also a new function for truncating the album descriptions when viewing on the index or category pages. When you view a single album, the full description is printed out at the top of the album. This makes the index and category pages much cleaner looking. I've also adapted it to truncate long image captions when viewing on a thumbnail page but prints the full caption when viewing the intermediate image.

To edit the number of characters in the truncated album description, find in 2 places in the theme.php file - '{ALB_DESC}' => myTruncate($album['album_desc'], 20, " "), and change the number (20) to any length your desire. You can also change the padding characters (...) to any other set of characters by editing function myTruncate($string, $limit, $break=".", $pad="...") in the theme.php file.

To edit the number of characters in the truncated image caption, find in 2 places in the theme.php file - '{CAPTION}' => myTruncate($caption, 120, " "), // changing the number changes the # of characters printed for the thumbnail caption. and change the number (120) to an length you desire. This number doesn't seem to be match the string length but it is consistant so change it and view the results.

I've also adapted the compute_img_size($width, $height, $max) function to manage the size of the intermediate image. As in some cases (example would be the Coppermine demo page), some galleries have intermediate images of different sizes. This function was changed and added to the theme.php to make view all intermediate images at 600px wide or less. This function is compute_img_size_max($width, $height) and you can change the viewing size by editing $max = 600;. If you have intermediate images smaller than 600px wide then this function will not correct the image size when viewing. This setting in the theme.php file does not affect the setting in your Coppermine configuration but only resizes the images in the browser. Here's a link to additional info in the manual - http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_picture_thumbnail.

Another edit I made was remove the thumbnail from the categories list. These category thumbnails are added to the gallery in the Category Manager with no way in the configuration to turn them off so I remove the {CAT_THUMB} from the $template_cat_list variable in the theme.php. Below is how you add it back in if you wish.
____________________________________________________________
Find in theme.php:

Code: [Select]
<td class="catrow" align="left"><table border="0"><tr><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>

And replace with:

Code: [Select]
<td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>____________________________________________________________

A cool new feature available with this theme is a random photo. This is accomplished with a new function I developed called "function randomimage()" and it resizes all images to a maximum height of 150px. If you wish to change this, you'll find it in the theme.php file and it's commented to make it easy to understand. For non-logged in users, this function will only display images from public albums but for users logged in it will display images from private albums as well. Also, this hack works only if you have "normal" images meaning you haven't changed the way CPG imports images with the standard installation for intermediate images. Read more about it here - http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_picture_thumbnail.

I've tested this theme without issue on FireFox 3.0.1 (Mac & PC), Safari 3.1.2 and IE 6.0.x & 7.0.5.x (PC).

Please enjoy the theme and make all the changes you need to suit your gallery but please respect the footer notes in the template.html.

Cheers,

Billy
http://www.billygbullock.com
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #8 on: October 22, 2008, 10:34:57 am »

Thanks for your contribution. I have updated the demo and download links in my posting above.
Logged

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #9 on: January 16, 2009, 04:44:42 pm »

thanks for the demo! its a pain in the butt to modify this theme, the images are all cut up!

btw, the zip in the first post needs to be updated, I installed that one and it crashed the site.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #10 on: January 22, 2009, 09:54:21 am »

btw, the zip in the first post needs to be updated, I installed that one and it crashed the site.
If you read this thread carefully you should know, that's why I always post a link to the downloads section where the most recent file is being made available.
A broken theme doesn't crash your site though - that's nonsense. You can savely test it before appayling it for the public. How to accomplish that is beyond the scope of this thread though - it's being explained in the docs.
Logged

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #11 on: January 26, 2009, 02:10:17 pm »

If you read this thread carefully you should know, that's why I always post a link to the downloads section where the most recent file is being made available.
A broken theme doesn't crash your site though - that's nonsense. You can savely test it before appayling it for the public. How to accomplish that is beyond the scope of this thread though - it's being explained in the docs.
maybe crashed the site, but i had some sort of error that made it inaccessible, and I did test it on a test site before my live site.

on another note, anyone running stramms modpak will likely have a few issues as the theme calls functions that the modpak changes so they dont get used, the themes versions get used
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #12 on: January 27, 2009, 11:28:13 pm »

Check the top of the theme.php file for configuration variables that I set. If these variables are used by the modpack then you'll have to remove them from the theme.php file.
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: all things concerning the website
« Reply #13 on: April 12, 2009, 11:52:20 pm »

Could someone take a look at this thread?

http://forum.coppermine-gallery.net/index.php/topic,58991.0.html

The theme GrimmDF is not working properly in IE.

As a simple fix I replaced this.

Code: [Select]
/* This function resizes images to a max size to properly fix on the intermediate viewing page.
 * To change the max image size edit "$max = 600;" to whatever you want the max width to be.
*/

function compute_img_size_max($width, $height)
{
global $CONFIG;
$thumb_use = $CONFIG['thumb_use'];
$width = $CURRENT_PIC_DATA['pwidth'];
$max = 600;

if($width < $max) {
$image_size['reduced'] = true;
if($thumb_use == 'ht') {
$image_size['geom'] = ' height="'.$image_size['height'].'"';
} elseif($thumb_use == 'wd') {
$image_size['geom'] = 'width="'.$image_size['width'].'"';
} else {
$image_size['geom'] = 'width="'.$image_size['width'].'" height="'.$image_size['height'].'"';
        }

with this.

Code: [Select]
/* This function resizes images to a max size to properly fix on the intermediate viewing page.
 * To change the max image size edit "$max = 600;" to whatever you want the max width to be.
*/

function compute_img_size_max($width, $height)
{
global $CONFIG;
$thumb_use = $CONFIG['thumb_use'];
$width = $CURRENT_PIC_DATA['pwidth'];
$max = 600;

if($width < $max) {
$image_size['reduced'] = true;
if($thumb_use == 'ht') {
$image_size['geom'] = ' height="100%"';
} elseif($thumb_use == 'wd') {
$image_size['geom'] = 'width="98%"';
} else {
$image_size['geom'] = 'width="98%" height="100%"';
        }

As my coding skills are not up to woking out how to do it properly.

Could someone take a look at this and fix the theme because at the moment it is useless in IE.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #14 on: April 13, 2009, 03:39:00 pm »

I will fix it tonight. Also, I wouldn't call it "useless"  ;). Useless is when you have something that you can't fix like Internet Explorer. Themes you can fix.
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: GrimmDF - Theme for cpg1.4.x and WordPress 1.5
« Reply #15 on: April 13, 2009, 07:22:01 pm »

Sorry, maybe my choice of wording was not the best. It is not your fault MS choose to provide such a great browser (insert sarcasm emoticon)

I will be interested in the update. While what I did provides a simple fix I am fully aware I have not chosen the best method due to my lack of skills. Seeing what you do will really help and it would be great if you could detail the change.

I'm currently trying to port a wordpress theme myself (http://wordpress.org/extend/themes/inanis-glass) and your guides have been a great help. Hopefully I will have it working soon.

Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.