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: Different Way of Displaying Categories - MOD  (Read 24342 times)

0 Members and 1 Guest are viewing this topic.

Dr Preacox

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 122
  • Is the Matrix...
    • Dynamic Creations
Different Way of Displaying Categories - MOD
« on: May 31, 2006, 07:55:15 pm »

=Okay basically this mod is a substitute for the /catlist/ feature which you set in the config and displays your categories on the gallery home page, basically using drop down lists, this is extremely handy when you have hundreds of catergories and albums.

Go here to see a DEMO

Still interested? then read on.....

First thing you need to do is enable anycontent.php in your admin settings, and hopefully it will show on the top of your board, if not then your going to have to edit your theme.php and make anycontent.php display where ever you want the drop down lists to appear.

Now for the code which you need to copy into /gallery/anycontent.php
Code: [Select]
<div align="center" class="tableh1">Browse Art</div><br>
<br>
Please choose a category.
<div align="center">
<script language="javascript" type="text/javascript">
function Go() {
if (document.artform.artlinks[document.artform.artlinks.selectedIndex].value != "") {
location = document.artform.artlinks[document.artform.artlinks.selectedIndex].value
}
}//--></script>
<form name="artform">
<select name="artlinks" class="nav">
<option value="#">All Categories</option>

<option value="http://www.URLTOYOURGALLERY.com/gallery/index.php?cat=10" class="navbold">Category Name</option>
        <option value="http://www.URLTOYOURGALLERY.com/gallery/thumbnails.php?album=" class="nav"> --> Album Name</option>
                <option value="http://www.URLTOYOURGALLERY.com/gallery/thumbnails.php?album=" class="nav"> --> Album 2 Name</option>

</select>
<input type="button" value="Go!" onClick="Go()" class="nav">
</form>
</div>

Now to edit the code above, since unfortuantly this script doesn't do everything for you yet, you need to customize the option values as you choose. I'v given some examples, you just need to paste your Category and Album links inside.

Now for the CSS styles which you copy to /gallery/themes/YOURTHEME/styles.css
Code: [Select]
select.nav {
 background-color: #444444;
 font-size: 12px;
 color: #ffffff;
}

option.navbold {
 background-color: #222222;
 font-weight: bold;
 font-size: 12px;
 color: #ffa51e;
}

input.nav {
border: 1px solid #1b1c1c;
background: #444444;
color: #8A8E95;
}

Done!!

Im building a plugin version of this code which does everything for you, but untill then here's this, its hard to implent for Newbs, but we where all ones once.

If you have any troubles please feel free to ask. The Devs probably wont approve of this since its so damn ugly and probably buggy, so use at your own risk.

Samuel Freeman~
« Last Edit: June 01, 2006, 07:05:18 am by GauGau »
Logged
My Mods:
Making Memberlist Public - VIEW
Different Way of Displaying Categories - VIEW
Coming Soon - Automated Sub Domains -MOD

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Are these possible?
« Reply #1 on: June 07, 2006, 07:24:15 am »

=Okay basically this mod is a substitute for the /catlist/ feature which you set in the config and displays your categories on the gallery home page, basically using drop down lists, this is extremely handy when you have hundreds of catergories and albums.
Samuel Freeman~

Hi Samuel,

Actually, some of the applications I plan to use the Coppermine Photo Gallery (CPG) would involve not hundreds but more like tens of thousands of categories and albums, once it is complete -- if such numbers would result in a very slow presentation of photos in the gallery.  Examples would include taxonomic classifications of animals, plants, fungi, etc. Animals taxonomy, for example would involve more than 40,000 categories (and more ones the albums are included).

Your mod would be very useful for such galleries.

In the demo, two drop down menus  were shown in the main gallery page.  A CPG with tens of thousands of categories and albums (e.g., taxonomic classifications) would require more dropdown menus.  I was thinking of creating an A-Z index of links of such dropdown menus for the major categories -- preferrably appearing in a separate page, rather than in the main photogallery page.  Clicking a major category link in the A-Z index page  would lead to another page containing the dropdown menu of the major category much like your Demo.  I wonder how your script may be modified to achieve this.

There are other applications of your Mod that I could think of, e.g., interfacing it would create category, create albums, etc. -- to  avoid the "mile-length", slow and confusing  category, albums, etc. lists that will result with the current CPG.

cgc0202
Logged

Dr Preacox

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 122
  • Is the Matrix...
    • Dynamic Creations
Re: Different Way of Displaying Categories - MOD
« Reply #2 on: June 07, 2006, 08:27:39 am »

40.000 albums ay? well I would suggest putting them into around 40 or less catergories, and then you can do this, you can have a drop down on list on the left which chooses the Main catergory, then another besides it which chooses a sub catergory which then will change the one on the right of that which will display the Albums

so from left to right you have three drop down boxes, and by choosing a selection on the left it will change the contents of the next one, so you would use a code such as following to change the contents of each drop down box, it would be a lot of work,

Code: [Select]
<!--select id="browse-category-select" name="category" onchange="BrowseCategorySelect(this);">
                <!--select id="browse-category-select" name="category" onchange="BrowseCategorySelect(this);">
                <option value="">All Categories</option>
                                </select-->

but I think 40,000 it excessive, especially for one databse, I mean backups of that would be almost impossible, maybe try downsizing your amount of albums? Im sure you have thought of this, but I can see a lot of errors which could occur from such over use :)

Sam~
Logged
My Mods:
Making Memberlist Public - VIEW
Different Way of Displaying Categories - VIEW
Coming Soon - Automated Sub Domains -MOD

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Different Way of Displaying Categories - MOD
« Reply #3 on: June 07, 2006, 09:32:07 am »

Thanks Sam,

40.000 albums ay? well I would suggest putting them into around 40 or less catergories, and then you can do this, you can have a drop down on list on the left which chooses the Main catergory, then another besides it which chooses a sub catergory which then will change the one on the right of that which will display the Albums

so from left to right you have three drop down boxes, and by choosing a selection on the left it will change the contents of the next one, so you would use a code such as following to change the contents of each drop down box, it would be a lot of work,

Actually, it is more than 40,000 categories and subcategories, as you can see for example in this link:

http://www.itis.usda.gov/itis_phy.html

for the taxonomic classification of animals, for example (i.e., phylum -> genus).  The number of albums would even be larger.  Unfortunately, the number of dropdown menus cannot be arbitrarily subdivided, as you suggested -- because this will be dependent on the way the taxonomic classification have been specified.  Moreover, in scientific taxonomy, the names of the categories-subcategories are almost identical as you go deeper into the subcategories within each major category. 

As a result, it is imperative that certain categories would have their own drop down menus.  It is for this reason that I suggested  the A-Z indexing of the categories in a separate page, and inquired whether that could be done in the existing CPG

but I think 40,000 it excessive, especially for one databse, I mean backups of that would be almost impossible, maybe try downsizing your amount of albums? Im sure you have thought of this, but I can see a lot of errors which could occur from such over use :)

Sam~

You are correct, this is the reason why I decided to create related multigalleries (with each gallery having its own database) because as I stated above, after you add the albums, the hypothetical number would even be greater.  For example, the more popular major taxonomic categories would have their own gallery and linked to a master introductory gallery that will include all the major taxonomic groups. 

If you examine the ITIS taxonomy database (see link above) for example, there will be three major introductory galleries (as a start) for animals, plants, fungi -- each with its own set of related multigalleries.

This multigalleries approach has its own drawbacks -- each Coppermine Photogallery  code is more than 10MB, and they will add up.  More importantly, if there are too many galleries, it will be a pain to upgrade each of them.  [It is not germane to this thread, but the solution to that would be a  Coppermine Photogallery  code that will be able to control multiple galleries. I believe there is such a feature already.  I have just not implemented it.]

cgc0202
Logged

Nibbler

  • Guest
Re: Different Way of Displaying Categories - MOD
« Reply #4 on: July 21, 2006, 09:17:07 am »

Logged

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Drop Down Menu Navigation
« Reply #5 on: January 07, 2007, 01:56:14 pm »

This tweak is close to what I need to easily navigate to one of several categories > albums ...except that it must have the information hard coded.  Has anyone figured a way to dynamically create a menu system like this - that pulls info from the CPG database?
Logged

OzButcher

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Different Way of Displaying Categories - MOD
« Reply #6 on: February 14, 2007, 07:41:25 am »

The DEMO site seems to be down. If anyone has another site where I can see a demo please post it, thanks :)
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Different Way of Displaying Categories - MOD
« Reply #7 on: March 14, 2007, 08:49:16 am »

Quote
Im building a plugin version of this code which does everything for you, but untill then here's this, its hard to implent for Newbs, but we where all ones once.

Any update on that part :)
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.