user's album by url http://site.com/gallery/username - Page 3 user's album by url http://site.com/gallery/username - Page 3
 

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]

Main Menu

user's album by url http://site.com/gallery/username

Started by newbie, April 05, 2005, 07:12:52 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

bitcloud

This mod works great, but I have a small problem...
My users are only allowed one gallery, so, while this mod works perfectly, it would be much better if it linked directly to the first (or only) gallery in the album... The only issue is that this gallery isn't based on the UID like the album page, but the number of galleries created before it...

can anyone suggest any way of modding this mod to link directly to the first/only gallery for any given UID?

(incidentally I had no luck with the rewritemap issue to keep the address in the address bar)

raqkp

Great mod, but what do you do if the username has a period in it? (e.g. first.last)

Is there a way to redirect everything after "gallery" with no slash that doesn't end in ".php"? In other words, redirect for every character, including the period, as long as it isn't part of ".php".

I've tried:
([^\<\.php\>/]+)$

but it doesn't work right. Any help would be appreciated, thanks :)

Nibbler

Best way is to adopt a different system such as http://site.com/gallery/members/username - then it can't interfere with anything else and you can use a looser regex.

bradenkeith

Quote from: AWJunkies on January 15, 2006, 03:15:04 PM
RewriteEngine On
RewriteRule ^([^\./]+)$ useralb.php?user=$1

This worked for me as well. Thanks. Spectacular!

sharif_aly

Is this will be added or added to coppermine new versions ?

Joachim Müller


dke


mommaroodles

Hi All

I've gone over this thread how many times now and I cant seem to get this too work :(

I'm hosting a site that has the following on server:

Apache 2.2.9
PHP 5.2.5
MYSQL 5.0.51a
Coppermine  v1.4.19 - which is installed at http://mydomain.com

I created the useralb.php page and it contains the following and uploaded it to public_html/ folder

<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');

header('Location: ' rtrim($CONFIG['ecards_more_pic_target'], '/') .'/index.php?cat='.(get_userid($_GET['user']) + FIRST_USER_CAT));
?>


then I created the .htaccess file which is also uploaded to the public_html folder

RewriteEngine On
RewriteRule ^([^\./]+)$ useralb.php?user=$1


I have a category called "User Galleries" and it contains an album called "test20", however, when I browse to the album it shows up as http://www.mydomain.com/index.php?cat=10005 and not http://www.mydomain.com/test20

I really would like to have this feature working, could someone please help tell me what I'm not doing or should be doing.

I'd really appreciate the assistance.

Regards
mommaroodles

mommaroodles

Hi

I have misunderstood this entire thread - I've been under the impression that after applying the changes the url would remain as http://mydomain.com/test20 instead of reverting to http://mydomain.com/index.php?cat=10005

I do have this working.  If I type into the browser's address bar http://mydomain.com/test20 it does go to the users gallery.

Many thanks to those involved for making this possible. :)

Regards
mommaroodles