Few questions - how to not show albums on front page etc. Few questions - how to not show albums on front page etc.
 

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

Main Menu

Few questions - how to not show albums on front page etc.

Started by MTM, April 28, 2006, 11:55:10 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

MTM

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 :)

Stramm

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)

Amit Badkas

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 :)

Amit Badkas

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 :)

MTM

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 :)

Abbas Ali

Chief Geek at Ranium Systems

Joachim Müller

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)

MTM

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 - 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? :)

Stramm

post a link please, then it's far easier to help you

MTM


Stramm

in your themes/yourtheme/style.css search for
.maintable
and here modify the border value to your likings

MTM

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 :)

MTM

Nobody has an idea on how I can get rid of these lines?

Nibbler

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.

MTM

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

Stramm


Nibbler


MTM

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 :)

Nibbler

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

MTM

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 :)