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: Twirl-Down Front Page Catagories  (Read 3196 times)

0 Members and 1 Guest are viewing this topic.

realeyz

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Twirl-Down Front Page Catagories
« on: August 29, 2006, 09:00:52 pm »

One of the things I really loved when I first started configuring Coppermine was the admin config section twirl-down functionality.  Now what would really be cool is the ability to make the front page catagories/albums behave in the same way.  This would make it much easier and clearer to distinguish catagory nesting and album/catagory differences not to mention cut down on clutter while making things much more accessible.

Thanx for listening.
- todd
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Twirl-Down Front Page Catagories
« Reply #1 on: August 29, 2006, 11:53:03 pm »

This would be a reasonable addition to the CPG_OCat plugin since it deals with similar advanced functionality to the category list. 

This request may also be reasonable for inclusion into the core (with corresponding on/off setting).  There are other requests to allow more options for organizing the category & album lists.  This might be considered as one way to do so.  I support this as a "valid" feature request.  I'm curious to see what the other devs think.

One issue with the CPG_OCat plugin is that it replaces the main sections of the core code for the category list.  What this means is that the plugin itself needs to be updated if the corresponding core code is updated.  A simple solution would be to incorporate the entire plugin into the core (along with the feature request here).  Or if not, a careful plugin hook in the category list code might help things out.  This will be discussed on the OCat board of course.  I only bring it up here to say that even if the Collapse/Expand feature is added to the plugin, it should also be considered separate as a feature request for the core since the OCat plugin has this one drawback.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Twirl-Down Front Page Catagories
« Reply #2 on: August 30, 2006, 06:09:19 am »

I like the idea, too. I'm just wondering how it would work out to implement it. Does this require javascript? If so, how about people who can't or won't use it? Would everything be loaded in the source, yet hidden until expanded? This might not bode well for large galleries with lots of categories and albums. Or could something like ajax be used to grab the info dynamically?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Twirl-Down Front Page Catagories
« Reply #3 on: August 30, 2006, 08:15:18 am »

Well, Ajax needs JavaScript as well ;)

Yes, users who disabled JavaScript would in fact be locked out, as the initial view would have the CSS attribute  hidden (the workaround we use in coppermine's config by having it unhidden by default and hide it with the use of JavaScript onload would cause an unwanted visual effects). As a workaround, two options seem possible: have the blocks that are suppossed to be unexpanded in the first place twice: once inside the regular HTML code (with all the JavaScript triggers) and one within a <noscript> section.
Second option would be to store a flag in the cookie that "tells" the script if the user has enabled or disabled JavaScript and generate the output accordingly. Subsequently, on a first visit, the sub-cats would be expanded and a JavaScript detection script would run and write the results into a cookie. Subsequent page visits would be looking into the cookie and create the output as it sees fit.

Here's some pseudo code for option one:
Code: [Select]
<script type="text/javascript">
  function expand(section) {
    document.getElementById(section).style.display = 'block';
  }
</script>
[...]
<div>
  Parent category markup that is suppossed to show no matter what
  <script type="text/javascript">
    // only write the expand link into the document if JavaScript is turned on to avoid non-JavaScript users from being confused
    document.write("<a href=\"javascript:expand('subcat1');\">expand subcategory</a>");
  </script>
</div>
<div name="subcat1" id="subcat1" style="display:none">
  Child category markup
</div>
<noscript>
  <div>
    Child category markup
  </div>
</noscript>
Logged

realeyz

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Twirl-Down Front Page Catagories
« Reply #4 on: August 30, 2006, 08:50:49 am »

Hey Guys

Thanx for the thoughtful consideration of my suggestion - One of the other things I was thinking about today when I showed some of my family members the new site was some other (probably simpler) ways to distinguish catagories from albums.  A few of my family members are still having trouble identifying these two entities visually on the front page no matter how I try to simplify it with the configuration. Anyway - A couple other ideas I have are maybe some border art or generic icon art or even the ability to change the text style and size separately for albums vs. catagories.  Maybe there is a plug-in I am not familiar with that already does this, but I can't find a guide anywhere that explains what each of these separate plug-ins from the plug-in packs do.

Again - thanx very much for the time, courtesy and consideration.  You guys have done a tremendous job on Coppermine and it is much appreciated! :)

- todd
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Twirl-Down Front Page Catagories
« Reply #5 on: August 30, 2006, 02:09:03 pm »

@realeyz: This is not a support thread, and please keep to one issue per thread.  The Features Request board is marked "No Support" and so you are only meant to suggest features here.  In addition, those who have code to implement them may discuss how to do so on the same thread.  Think of it as "suggest" and "report only" - no questions about specific code is allowed here.

For support requests, please post on the appropriate support board.  In your case, your question about changing the appearance of Coppermine categories & albums belongs on the themes board.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.