coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: MTM on April 28, 2006, 11:55:10 AM

Title: Few questions - how to not show albums on front page etc.
Post by: MTM on April 28, 2006, 11:55:10 AM
I have a few questions I hope somebody can answer - I have tried searching, but couldn't find the answers.

I'm almost done setting up my gallery at http://martintoft.net/billeder/index.php.

1) How do I change the appearance of the front page of my gallery, so that the albums under the categori isn't shown? I would like to only have the categories shown with their respective thumbnails. I have tried looking in both the theme and on the setup page with no avail.

2) I can't seem to get rid of the 1px lines inside the tables. I'm not a really hardcore html programmer, so it might be some simple tweaking, but I haven't been able to find a place to change it.

3) Sometimes the "Billedoversigt" link on the top left on the page isn't linking to the front page of the album (index.php - index.php?cat=0 will do too I think?), but index.php?cat=3 - how can I make sure it doesn't?

Thanks in advance - it's a great gallery you guys have created :)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Stramm on April 28, 2006, 01:04:38 PM
Please respect the 'one question per thread' policy

1.) read the docs http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_album_list
Album list view - Show first level album thumbnails in categories
2.) Post a screenshot
3.) Not sure what you mean, I guess the button 'Album list'.. then this is intended behaviour. To go to the index use the 'home' button. Of course you need to define your gallery index as home page (in config)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Amit Badkas on April 28, 2006, 01:31:17 PM
Hi MTM,

#2 - The 1px lines are due to 'cellspacing' for table set as 1 and your page's background color is also set. If you change 'cellspacing' as 0 (zero) then it should display as per your need.

#3 - The 'Billedoversigt' link will change according to picture in category you are viewing. To change the link's URL according to your need, open file 'include/themes.inc.php' and find function 'theme_main_menu'. Then change line 1357 from

'{ALB_LIST_TGT}' => "index.php$cat_l",

to

'{ALB_LIST_TGT}' => "index.php",

This should work.

Amit :)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Amit Badkas on April 28, 2006, 01:41:05 PM
Hi MTM,

#1 - You can remove 'album list' box by changing some code in index.php page.

On line 195 in function 'get_subcat_data', change code from


// Check if you need to show subcat_level
if ($level == $CONFIG['subcat_level']) {
    $cat_albums = list_cat_albums($subcat['cid']);
} else {
    $cat_albums = '';
}


to

$cat_albums = '';

This will remove album list under each category.

Amit :)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: MTM on April 28, 2006, 02:04:19 PM
I'm in hurry right now so will probably not have time to try your suggestions before tomorrow, but it looks like I have all the information I need - thank you very much for the fast replies!

I will post again when I have tried your suggestions and tell you if it works :)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Abbas Ali on April 28, 2006, 02:16:55 PM
Quote from: Stramm on April 28, 2006, 01:04:38 PM
1.) read the docs http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_album_list
Album list view - Show first level album thumbnails in categories

This will be the correct way...
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Joachim Müller on April 28, 2006, 06:55:29 PM
This is the correct suggestion as well:
Quote from: Stramm on April 28, 2006, 01:04:38 PM
3.) Not sure what you mean, I guess the button 'Album list'.. then this is intended behaviour. To go to the index use the 'home' button. Of course you need to define your gallery index as home page (in config)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: MTM on April 30, 2006, 01:36:54 AM
I have now solved 1) and 3) thanks to you :)

I can't seem to get rid of those 1 pixel lines, though. You can see a screenshot of which lines I mean here (http://martintoft.net/lort/1pxlines.png) - I guess it's the same lines that runs between e.g. '771' and '67'.
The 'table' was actually created with Div tags, so i tried to replace them with Table tags with cellspacing="0", but it looks exactly the same. I'm doing this in the template.html so it looks like this:

<table width="770" border="0" cellpadding="0" cellspacing="0">{GALLERY}</table>

Any suggestions? :)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Stramm on April 30, 2006, 10:13:51 AM
post a link please, then it's far easier to help you
Title: Re: Few questions - how to not show albums on front page etc.
Post by: MTM on April 30, 2006, 12:45:32 PM
Quote from: Stramm on April 30, 2006, 10:13:51 AM
post a link please, then it's far easier to help you

It's in the first post, but here it is again http://martintoft.net/billeder/index.php :)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Stramm on April 30, 2006, 01:12:30 PM
in your themes/yourtheme/style.css search for
.maintable
and here modify the border value to your likings
Title: Re: Few questions - how to not show albums on front page etc.
Post by: MTM on April 30, 2006, 01:22:56 PM
Quote from: Stramm on April 30, 2006, 01:12:30 PM
in your themes/yourtheme/style.css search for
.maintable
and here modify the border value to your likings

It's not them, it's the 1-pixel blue lines (same colour as the main background) that runs just inside those black borders :)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: MTM on May 01, 2006, 12:21:22 AM
Nobody has an idea on how I can get rid of these lines?
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Nibbler on May 01, 2006, 12:40:48 AM
Quote from: Amit Badkas on April 28, 2006, 01:31:17 PM
#2 - The 1px lines are due to 'cellspacing' for table set as 1 and your page's background color is also set. If you change 'cellspacing' as 0 (zero) then it should display as per your need.

As suggested earlier, those lines are the cellspacing. If you set cellspacing to 0 for the maintable then they will disappear, but you lose the other lines too.
Title: Re: Few questions - how to not show albums on front page etc.
Post by: MTM on May 01, 2006, 03:03:49 AM
Quote from: Nibbler on May 01, 2006, 12:40:48 AM
As suggested earlier, those lines are the cellspacing. If you set cellspacing to 0 for the maintable then they will disappear, but you lose the other lines too.

Maybe I'm doing something completely wrong here, but I set the cellspacing to 0 in the maintable and nothing happens  :-\

.maintable {
        border: 2px solid #000000;
cellspacing: 0px;
        margin-top: 10px;
        margin-bottom: 0px;
}
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Stramm on May 01, 2006, 08:10:21 AM
template.html... search that for 'cellspacing'
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Nibbler on May 01, 2006, 08:56:19 AM
theme.php, starttable() function
Title: Re: Few questions - how to not show albums on front page etc.
Post by: MTM on May 01, 2006, 03:19:06 PM
Quote from: Stramm on May 01, 2006, 08:10:21 AM
template.html... search that for 'cellspacing'

I only have two places where it says cellspacing - they're both set to 0, but I'm pretty sure they have nothing to do with this, since it's the tables above the {GALLERY}.

I assume the code I'm going to change is the <div align="center">{GALLERY}</div> but I have tried to both add cellspacing="0" and make a table with cellspacing="0" instead of using div to no avail.


Quote from: Nibbler
theme.php, starttable() function

You got to help me a bit more on that one. I have to add a starttable() function? I'm not much of a php programmer :)
Title: Re: Few questions - how to not show albums on front page etc.
Post by: Nibbler on May 01, 2006, 03:27:14 PM
Copy starttable() function from themes/sample/theme.php into your custom theme if it doesn't already exist, then remove the cellspacing.


function starttable($width = '-1', $title = '', $title_colspan = '1')
{
    global $CONFIG;

    if ($width == '-1') $width = $CONFIG['picture_table_width'];
    if ($width == '100%') $width = $CONFIG['main_table_width'];
    echo <<<EOT

<!-- Start standard table -->
<table align="center" width="$width" cellspacing="1" cellpadding="0" class="maintable">

EOT;
    if ($title) {
        echo <<<EOT
        <tr>
                <td class="tableh1" colspan="$title_colspan">$title</td>
        </tr>

EOT;
    }
}
Title: Re: Few questions - how to not show albums on front page etc.
Post by: MTM on May 01, 2006, 07:15:09 PM
Quote from: Nibbler on May 01, 2006, 03:27:14 PM
Copy starttable() function from themes/sample/theme.php into your custom theme if it doesn't already exist, then remove the cellspacing.

It worked! :D

Thank you very much :)