Can a theme disable a block on its own?

Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Sat, 2006-08-12 07:22

For a theme I'm developing, is there a way to disable the part of the block that lists all the albums? I'm not very good with the terminology, it's the part of the sidebar that'll list things like:

1. Album1
2. Album2
3. Album3
4. Album4
5. Album5
6. Album6
7. Album7
...
12. Album12

If I cannot have the theme automatically not have it show, is it possible to disable it from the theme files, or do I have to mess with the album settings?

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Tue, 2006-08-15 20:12

That either shows up as a module or you can set the defaults for your theme in theme.inc. It's been a long time since I set the defaults for my theme.

 
Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Tue, 2006-08-15 21:51

Would anyone have an example of what to put in theme.inc? I had a feeling it might work like that, but I don't fully understand all of the coding.

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Tue, 2006-08-15 23:11

You can take a look at mine. Download it here.

 
Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Tue, 2006-08-22 04:03

Okay, I looked through theme.inc, thank you for the example, lvlthunder, but I'm still not sure what to edit. Where it shows links to your other albums, what is that block called? If I cdan find out its name, I think it'll be easier to find it in theme.inc and change what I have to.

(example)
My Gallery

1. Portraits
...
6. Landscapes
7. Still Lifes
8. Photography

There's something I'm curious about though. I reset the stuff for my theme in the siteadmit, and there's:

Show image owners (unchecked)
Show album owners (checked)
Show micro navigation thumbnails (checked)

And in theme.inc I have:

'showImageOwner' => 1, 'showAlbumOwner' => 0,
'albumFrame' => '', 'itemFrame' => '', 'photoFrame' => '',
'colorpack' => '',
'showMicroThumbs' => 0,

I changed showImageOwner to 0, reset to default in my theme, and it still went back to unchecked, checked, checked like above.

Also, it says in siteadmin for my theme's default:
Rows per album page: 5
Columsn per album page: 3

But in theme.inc it has:
array('rows' => 3, 'columns' => 3,

To make sure I was uploading the right one, I cut out all the content, uploaded it, and got a bunch of errors, so I'm editing the right file and putting it up in the right place.

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Tue, 2006-08-22 04:29

Those values in theme.inc are default values. To get those values back you must uninstall the theme and reinstall it in Site Admin. The current values are stored in the database somewhere.

Also do you have the album select module installed. If so uninstall it. I think that's what's being put there.

In theme.inc 'sidebarBlocks' => serialize(array()), is the line that I took stuff out of to set the defaults for what is in the sidebar. I doubt you will see it there though.