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: Default Home Category to User Groups  (Read 9605 times)

0 Members and 1 Guest are viewing this topic.

didge_jason

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Default Home Category to User Groups
« 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.
« Last Edit: February 21, 2006, 03:47:14 pm by Nibbler »
Logged

didge_jason

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Possible Solution
« Reply #1 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.
Logged

chalky6666

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: Default Home Category to User Groups
« Reply #2 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
Logged

webfairy

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: Default Home Category to User Groups
« Reply #3 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.
Logged

Nibbler

  • Guest
Re: Default Home Category to User Groups
« Reply #4 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;
    }
Logged

lauriesscraps

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Default Home Category to User Groups
« Reply #5 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
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 21 queries.