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: User Galleries on main page, NOT in default Cat  (Read 4455 times)

0 Members and 1 Guest are viewing this topic.

Arkham

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
User Galleries on main page, NOT in default Cat
« on: October 21, 2004, 06:19:10 pm »

How can I get the user galleries to appear on the main page, without having them in "User Galleries"?

I don't want my family to have to click on (renamed) "Family Gallery" first, and then again to get into each member's gallery.  Isn't there a way to remove the Category option and just have each User Gallery appear?

I know we can create albums that will appear outside the category, but those are individual albums -- I want individual groups of "my galleries".  IE  Father, Mother, Son, Daughter galleries, without having to take the extra step.

Any ideas?
« Last Edit: October 21, 2004, 06:58:02 pm by TranzNDance »
Logged

Arkham

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: User Galleries on main page, NOT in default Cat
« Reply #1 on: October 21, 2004, 06:34:57 pm »

How can I get the user galleries to appear on the main page, without having them in "User Galleries"?

N/M -- Thanks anyway.

I found the answer in this thread:  http://forum.coppermine-gallery.net/index.php?topic=5900.0

I just copied the necessary code to my 1.3.1 index.php file and it works well.


Cheers
Logged

jasonpell

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 15
    • I-Am-Vegan.net
Re: User Galleries on main page, NOT in default Cat
« Reply #2 on: October 22, 2004, 01:36:21 am »

Hi,

I actually did not like the solution listed in the thread you provided, my solution did involve modifying index.php,
but i believe its a little less severe modification.

In the main code I modified the following:

if (isset($HTTP_GET_VARS['cat'])) {
    $cat = (int)$HTTP_GET_VARS['cat'];

}
// NEW CODE
 else if( count($HTTP_GET_VARS)==0 ){
   $cat = 1;
}
// END NEW CODE

Basically I just forced cat=1 if cat not specified, which causes the User Categories page to load in the index.  I know
there are probably consequences of doing this, but it works well for me.

Cheers
Jason
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: User Galleries on main page, NOT in default Cat
« Reply #3 on: October 22, 2004, 07:55:10 am »

Jason,

this method should work fine, I can see no reason why you shouldn't do this. This has been suggested in the past, and appears to have worked for those who applied this hack. I agree that it is a less intrusive hack and should be used instead of the "monstrous" hack that is the alternative.

Joachim
Logged

nickelsto

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: User Galleries on main page, NOT in default Cat
« Reply #4 on: January 26, 2005, 11:30:18 pm »

Quote from: jasonpell
In the main code

Jason, Thanks for this info.  Where do you mean in the index when you say "main code"?
Logged

jasonpell

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 15
    • I-Am-Vegan.net
Re: User Galleries on main page, NOT in default Cat
« Reply #5 on: July 21, 2005, 04:22:52 am »

Quote from: jasonpell
In the main code

Jason, Thanks for this info.  Where do you mean in the index when you say "main code"?

Hi in 1.3.2 and 1.3.3 the main code is identified by a comment, my change is indicated by the
// NEW CODE comments:

/**
 */
/**
 * Main code
 */

if (isset($HTTP_GET_VARS['page'])) {
    $PAGE = max((int)$HTTP_GET_VARS['page'], 1);
    $USER['lap'] = $PAGE;
} elseif (isset($USER['lap'])) {
    $PAGE = max((int)$USER['lap'], 1);
} else {
    $PAGE = 1;
}

if (isset($HTTP_GET_VARS['cat'])) {
    $cat = (int)$HTTP_GET_VARS['cat'];
// NEW CODE
} else if( count($HTTP_GET_VARS)==0 ){ // force cat to 1 if not supplied, so User Categories Albums display
   $cat = 1;
}
// END NEW CODE
Logged

ZakRhino

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 55
Re: User Galleries on main page, NOT in default Cat
« Reply #6 on: November 23, 2005, 09:00:27 pm »

The option below only works showing the Users gallery is there a way to show the owners gallery and the user gallery as well?

Quote from: jasonpell
In the main code

Jason, Thanks for this info.  Where do you mean in the index when you say "main code"?

Hi in 1.3.2 and 1.3.3 the main code is identified by a comment, my change is indicated by the
// NEW CODE comments:

/**
 */
/**
 * Main code
 */

if (isset($HTTP_GET_VARS['page'])) {
    $PAGE = max((int)$HTTP_GET_VARS['page'], 1);
    $USER['lap'] = $PAGE;
} elseif (isset($USER['lap'])) {
    $PAGE = max((int)$USER['lap'], 1);
} else {
    $PAGE = 1;
}

if (isset($HTTP_GET_VARS['cat'])) {
    $cat = (int)$HTTP_GET_VARS['cat'];
// NEW CODE
} else if( count($HTTP_GET_VARS)==0 ){ // force cat to 1 if not supplied, so User Categories Albums display
   $cat = 1;
}
// END NEW CODE

Logged
Pages: [1]   Go Up
 

Page created in 0.033 seconds with 19 queries.