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?
Quote from: Arkham 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"?
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
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
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
Quote from: jasonpell
In the main code
Jason, Thanks for this info. Where do you mean in the index when you say "main code"?
Quote from: nickelsto 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"?
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
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 on July 21, 2005, 04:22:52 AM
Quote from: nickelsto 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"?
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