forum.coppermine-gallery.net

No Support => Modifications/Add-Ons/Hacks => Mods: Miscellaneous => Topic started by: didge_jason on March 29, 2004, 03:05:37 am

Title: Default Home Category to User Groups
Post by: didge_jason on March 29, 2004, 03:05:37 am
Hello.

I would like to make the default "Home" page to display the albums in the "User Groups" category.  All of my albums are posted by users (my family) and I would like the list of user names to be the top level categories.  Right now, anyone viewing must first select "User Categories" then the appropriate family member's name.  I would like the viewer to be shown the family member's name list at the "Home" page.
Title: Possible Solution
Post by: didge_jason on March 29, 2004, 04:12:14 am
To default to the "User Categories" on the home page, I modified index.php starting at line 518

514   if (isset($HTTP_GET_VARS['cat']))
515   {
516       $cat = (int)$HTTP_GET_VARS['cat'];
517   }
518    // JASON'S CHANGE
519    else
520   {
521           $cat = USER_GAL_CAT;
522   }
523   // END JASON'S CHANGE

This seems to be an effective solution, but I am worried about bugs arising later because of this change.  I am currently testing it.  If there is another way to change it, please let me know.
Title: Re: Default Home Category to User Groups
Post by: chalky6666 on June 28, 2004, 11:23:23 pm
Hi

Is it posible to go 1 step further and have the home page display just 1 album?

Cheers
Title: Re: Default Home Category to User Groups
Post by: webfairy on February 21, 2006, 03:36:26 pm
is it possible to modify this to work in 14.x?

any assistance in this matter is greatly appreciated.
Title: Re: Default Home Category to User Groups
Post by: Nibbler on February 21, 2006, 03:46:22 pm
The code is practically unchanged since 1.3

Code: [Select]
    if (isset($_GET['cat'])) {
        $cat = (int)$_GET['cat'];
    }

Code: [Select]
    if (isset($_GET['cat'])) {
        $cat = (int)$_GET['cat'];
    } else {
        $cat = USER_GAL_CAT;
    }
Title: Re: Default Home Category to User Groups
Post by: lauriesscraps on August 01, 2010, 07:36:36 pm
I tried adding the coding listed above and it did what you said, but not what I wanted. I took the coding out and now it changed everything back to normal but one thing. It is now listing all the user galleries at the bottom and repeating them. Do you know how I can fix this? ( I already restored the back up file I made, but it is not fixing it).

I was also wondering how I can change the links to the user galleries into showing a thumbnail link to each of them, while leaving everything else the same? Any help would be great! Thank you so much!

lauriesscraps.com/gallery