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: Please help me!!! How i can hide Parent category in gallery main page ?  (Read 4858 times)

0 Members and 1 Guest are viewing this topic.

farremixtkof_2007

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

plz help me friends

How i can hide Parent category in gallery main page ? ???
Logged

farremixtkof_2007

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Please help me!!! How i can hide Parent category in gallery main page ?
« Reply #1 on: December 15, 2007, 09:24:02 am »

plz friends anybody know how i can disappear Parent category in gallery main page  ???
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Please help me!!! How i can hide Parent category in gallery main page ?
« Reply #2 on: December 15, 2007, 12:38:45 pm »

Obviously nobody knows. That's why nobody answers. Bottom line: can't be accomplished easily unless you code it yourself.
Logged

jacefarm

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

Responding long after the original post, but I was able to hide a lot of the areas by commenting out the "case" options that I didn't want inside the "switch" at line 777 of the main index.php file.
Logged

Nibbler

  • Guest

You should read the manual before editing the code. Those are all easily controlled by configuration options.
Logged

jacefarm

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

Ah yes - well spoken my good man.  In the Config tab - Album List View / Content of the main page.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

Additionally, the thread starter didn't ask how to hide meta albums. He asked for something completely different. You shouldn't have tried to hijack this thread.
Logged

jacefarm

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

Hijacking was not my intent.

My intent was to leave behind some potential solutions as a matter of leaving this thread with an answer that was more helpful than your vague post which said, "Bottom line: can't be accomplished easily unless you code it yourself."  At least Nibbler's response revealed that an answer was to be found in the manual, and he's not even an administrator.  Oh well.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

At least Nibbler's response revealed that an answer was to be found in the manual
No, you got this wrong: the answer to your question (how to disable certain meta albums) is to be found in the docs - that's what Nibbler said. The answer to the question posted by the thread starter can not be found in the docs.

and he's not even an administrator.
You can't conclude from the fact that a person has admin privileges on this forum or not how his coding skills are or what level of understanding on coppermine a person has. Nibbler is one of the most skilled coders around. My coding skills don't rival his skills. That's why I have to take care of this forum (performing backups and other boring tasks), while he gets all the money, women and fame that come naturally when you're a genius coder. ;D
Being an admin on this forum means that you have extra work to do that the other dev team members don't have to perform. Being an admin is just a job description and no indicator for a person's rank within a hierarchy. It's something the forum application does (sticking that silly title next to my user name) and there (sadly) is no option to disable this.

My intent was to leave behind some potential solutions as a matter of leaving this thread with an answer that was more helpful than your vague post which said, "Bottom line: can't be accomplished easily unless you code it yourself."
Well, if you have accomplished something code wise, why not reply with something less vague and posting your actual code proposals? Instead of just saying that you commented out some code - that's not helpfull for newbies at all.
« Last Edit: July 13, 2009, 08:23:04 am by Joachim Müller »
Logged

jacefarm

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

I had a request from a client to remove a lot of the default features from the gallery main page, and to leave behind just the albums (remove categories, latest additions, etc.).  Searching your forum, I found this thread, and alas, presumed it was a similar issue.  But I'll take your word on the original post.

Anyway, if it's of some help, to address hiding certain elements on the main page, I changed the code in the index.php file, by commenting out (using /* ... */) most of the case situations I didn't need.  Beginning at line 777:

Code: [Select]
          switch ($matches[1]) {
                    case 'breadcrumb':
                        // Added breadcrumb as a separate listable block from config
                        if (($breadcrumb != '' || count($cat_data) > 0) && $cat != 0) theme_display_breadcrumb($breadcrumb, $cat_data);
                        break;

                    /* case 'catlist':
                        if ($breadcrumb != '' || count($cat_data) > 0) theme_display_cat_list($breadcrumb, $cat_data, $statistics);
                        if (isset($cat) && $cat == USER_GAL_CAT) {
                            list_users();
                        }
                        flush();
                        break; */

                    case 'alblist':
                        list_albums();
                        flush();
                        break;

                    /* case 'random':
                        display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'lastup':
                        display_thumbnails('lastup', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'lastalb':
                        display_thumbnails('lastalb', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        break;

                    case 'topn':
                        display_thumbnails('topn', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'toprated':
                        display_thumbnails('toprated', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'lastcom':
                        display_thumbnails('lastcom', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'lasthits':
                        display_thumbnails('lasthits', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break; */

                    case 'anycontent':
                        if ($cat == 0) {
                            ob_start();
                            /**
                             * Any php code or HTML can be put in this file and will be displayed
                             */
                            include('anycontent.php');
                            $anycontent = CPGPluginAPI::filter('anycontent',ob_get_contents());
                            ob_end_clean();
                            echo ($anycontent);
                        }
                        flush();
                        break;
                }

That worked great for my needs, but I hear what Nibbler is saying regarding the config settings, which would have been simpler:

Those are all easily controlled by configuration options.
« Last Edit: July 13, 2009, 08:25:40 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

OK, thanks for being ready to share. As you said, it's much easier to use the corresponding options in coppermine's config, so the above mentioned code should not be actually used (this is a recommendation for others reviewing this thread). Please use bbcode to post code in the future - I edited your posting accordingly.
The main reason why you should only fiddle with the code if there's no other option: upgrading get's so much harder, as you need to re-apply your code changes every time you perform an update/upgrade.
Logged

jacefarm

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

Yes - good point.  Thanks for the advice.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.