Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Few questions - how to not show albums on front page etc.  (Read 9238 times)

0 Members and 1 Guest are viewing this topic.

MTM

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Few questions - how to not show albums on front page etc.
« 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 :)
« Last Edit: May 01, 2006, 07:28:09 pm by Stramm »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Few questions - how to not show albums on front page etc.
« Reply #1 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)

Amit Badkas

  • Dev Team member
  • Coppermine novice
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 43
    • Amit's Blog
Re: Few questions - how to not show albums on front page etc.
« Reply #2 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 :)
Logged

Amit Badkas

  • Dev Team member
  • Coppermine novice
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 43
    • Amit's Blog
Re: Few questions - how to not show albums on front page etc.
« Reply #3 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

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

to

Code: [Select]
$cat_albums = '';
This will remove album list under each category.

Amit :)
Logged

MTM

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Few questions - how to not show albums on front page etc.
« Reply #4 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 :)
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Few questions - how to not show albums on front page etc.
« Reply #5 on: April 28, 2006, 02:16:55 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...
Logged
Chief Geek at Ranium Systems

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Few questions - how to not show albums on front page etc.
« Reply #6 on: April 28, 2006, 06:55:29 pm »

This is the correct suggestion as well:
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)
Logged

MTM

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Few questions - how to not show albums on front page etc.
« Reply #7 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 - 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:

Code: [Select]
<table width="770" border="0" cellpadding="0" cellspacing="0">{GALLERY}</table>
Any suggestions? :)
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Few questions - how to not show albums on front page etc.
« Reply #8 on: April 30, 2006, 10:13:51 am »

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

MTM

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Few questions - how to not show albums on front page etc.
« Reply #9 on: April 30, 2006, 12:45:32 pm »

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

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Few questions - how to not show albums on front page etc.
« Reply #10 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

MTM

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Few questions - how to not show albums on front page etc.
« Reply #11 on: April 30, 2006, 01:22:56 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 :)
Logged

MTM

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Few questions - how to not show albums on front page etc.
« Reply #12 on: May 01, 2006, 12:21:22 am »

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

Nibbler

  • Guest
Re: Few questions - how to not show albums on front page etc.
« Reply #13 on: May 01, 2006, 12:40:48 am »

#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.
Logged

MTM

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Few questions - how to not show albums on front page etc.
« Reply #14 on: May 01, 2006, 03:03:49 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  :-\

Code: [Select]
.maintable {
        border: 2px solid #000000;
cellspacing: 0px;
        margin-top: 10px;
        margin-bottom: 0px;
}
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Few questions - how to not show albums on front page etc.
« Reply #15 on: May 01, 2006, 08:10:21 am »

template.html... search that for 'cellspacing'

Nibbler

  • Guest
Re: Few questions - how to not show albums on front page etc.
« Reply #16 on: May 01, 2006, 08:56:19 am »

theme.php, starttable() function
Logged

MTM

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Few questions - how to not show albums on front page etc.
« Reply #17 on: May 01, 2006, 03:19:06 pm »

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
Code: [Select]
<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 :)
Logged

Nibbler

  • Guest
Re: Few questions - how to not show albums on front page etc.
« Reply #18 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.

Code: [Select]
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;
    }
}
Logged

MTM

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Few questions - how to not show albums on front page etc.
« Reply #19 on: May 01, 2006, 07:15:09 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 :)
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.