forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: photosbyjeremiah on March 31, 2009, 07:21:36 pm

Title: Customizing "Classic" Template?
Post by: photosbyjeremiah on March 31, 2009, 07:21:36 pm
I've searched and searched, read the docs 5 times, and tried figuring out myself. I like the classic template, and supposedly after reading the directions it says to edit the theme.php. When I look in the theme.php for the classic theme there isn't much in there. When I look at the other themes that came with the installation those seem to have html code that you could edit.

Link to my gallery.

http://www.cameratalk.org/gallery/index.php

Below is a screenshot of what I wouldlike to change outlined in red. I would like if possible to change that from the php?pos=-11 to either be the real url to the photo, as in www.website.com/gallery/album/useralbum/10088/image.jpg so that they can use the img tags.

If there is a way to change it to include [img] tages that would be great. (I've already seen the mod to add the img tag under the photo, but looks horrible directly under the image like that)

Any help that could be provided would be appreciated. Let me know if you need any other information.

Title: Re: Customizing "Classic" Template?
Post by: Nibbler on March 31, 2009, 08:49:55 pm
The classic theme.php is empty since classic is essentially the 'built in' theme. The theme.php is used only to specify things that are different to the classic theme, so the classic theme is of course not different to itself in any way.

That's not relevant anyway, since the modification is to core code, not the theme.

Edit displayimage.php, find

Code: [Select]
    // Create the absolute URL for display in info
    $info[$lang_picinfo['URL']] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" >' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';

You can change that to

Code: [Select]
    $info[$lang_picinfo['URL']] = $CONFIG["ecards_more_pic_target"] . get_pic_url($CURRENT_PIC_DATA, 'fullsize');

Adding [ img ] tags would be:

Code: [Select]
    $info[$lang_picinfo['URL']] = '[img]' . $CONFIG["ecards_more_pic_target"] . get_pic_url($CURRENT_PIC_DATA, 'fullsize') . '[/img]';
Title: Re: Customizing "Classic" Template?
Post by: photosbyjeremiah on April 01, 2009, 04:47:21 am
Thank you very much for the help. That changed it just how I wanted it.