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: Categories always on the bottom  (Read 2817 times)

0 Members and 1 Guest are viewing this topic.

Peter R

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 26
Categories always on the bottom
« on: December 16, 2008, 10:53:51 pm »

I changed the way the category list looks like. Now it is a list with all categories and albums in it. Because all categories are on the first level, this looks pretty neat. Because the list is a bit long now,  it looks better if this list is on the bottom of the page. For this I changed the layout in the admin from :
breadcrumb/anycontent/catlist/alblist/lastup,4
to
breadcrumb/anycontent/alblist/lastup,4/catlist
This works well, until an album opens. The album will be under the category list, and I want the albums to open above the  category list. The category list should always be on the botton, no matters what is shown.

I found out showing is arranged in index.php where is found :
if (is_array($matches)) {
                switch ($matches[1]) {

And that is where I lost track.
Where should I start looking, or is this also an admin setting?

Thanks in advance
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Categories always on the bottom
« Reply #1 on: December 16, 2008, 11:04:08 pm »

All is set in the themes folder where everything can be re-arranged. Don't edit core files but edit your theme. Take a look at the faq's here and it will explain everything for you.

Also take a look at these docs.

http://documentation.coppermine-gallery.net/en/theme_create.htm

Taking note of this from the docs.

"How the theme engine works
When a Coppermine page is being parsed, the core code will call theme functions. If those functions exist in your custom theme, they will be taken into account. If a particular function does not exist in your custom theme, the core function will be used. The core functions (the default theme behaviour if you want to put it that way) reside in includes/themes.inc.php. Therefor, you mustn't edit includes/themes.inc.php, under no circumstances, as all your changes will be lost when upgrading in the future. Everything that possibly could be accomplished by editing include/themes.inc.php can be accomplished by editing themes/yourtheme/theme.php as well - stuff defined in your custom theme will take precedence over the core theme functions.

"
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Peter R

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 26
Re: Categories always on the bottom
« Reply #2 on: December 17, 2008, 05:38:00 pm »

Iíve really searched a lot, but didnít find it. Because I couldnít find it in the theme section, I started to take a close look at the core code. With what is possible in the theme section, together with the admin setting changing to (breadcrumb/anycontent/alblist/lastup,4/catlist), I menaced to get the category list on the bottom. This was only working for the index page. As soon as you open an album, the thumbnails.php page opens with the categories on top.

I am certain, well as certain as a professional beginner can be  ;D, that getting the category list on the bottom of thumbnails.php is only possible by changing this particular core page. It was not difficult. Just move the line:
theme_display_cat_list($breadcrumb, $cat_data, '');
to just above the line which will show the pagefooter.

Oke, now I succeeded in what I wanted to achieve. My final question is now, is this the way to go, or is this really to be don in the theme files, and am I not looking good enough.
Logged
Pages: [1]   Go Up
 

Page created in 0.046 seconds with 20 queries.