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 2 [3]   Go Down

Author Topic: user's album by url http://site.com/gallery/username  (Read 62458 times)

0 Members and 1 Guest are viewing this topic.

bitcloud

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: user's album by url http://site.com/gallery/username
« Reply #40 on: March 27, 2007, 06:44:22 pm »

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)
Logged

raqkp

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: user's album by url http://site.com/gallery/username
« Reply #41 on: April 13, 2007, 11:19:29 pm »

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:
Code: [Select]
([^\<\.php\>/]+)$
but it doesn't work right. Any help would be appreciated, thanks :)
Logged

Nibbler

  • Guest
Re: user's album by url http://site.com/gallery/username
« Reply #42 on: April 13, 2007, 11:33:46 pm »

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.
Logged

bradenkeith

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • Braden Keith.com
Re: user's album by url http://site.com/gallery/username
« Reply #43 on: December 14, 2007, 01:17:18 am »

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

This worked for me as well. Thanks. Spectacular!
Logged

sharif_aly

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 36
Re: user's album by url http://site.com/gallery/username
« Reply #44 on: December 28, 2007, 01:57:11 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: user's album by url http://site.com/gallery/username
« Reply #45 on: December 28, 2007, 10:43:42 am »

Not scheduled. Probably not.
Logged

dke

  • Guest
Re: user's album by url http://site.com/gallery/username
« Reply #46 on: January 23, 2008, 04:21:23 pm »

Wonderful modification, thank you.
Logged

mommaroodles

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 2
    • Breadon Family Gallery
Re: user's album by url http://site.com/gallery/username
« Reply #47 on: December 10, 2008, 12:14:17 pm »

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

Code: [Select]
<?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

Code: [Select]
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
Logged

mommaroodles

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 2
    • Breadon Family Gallery
Re: user's album by url http://site.com/gallery/username
« Reply #48 on: December 10, 2008, 01:47:48 pm »

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
Logged
Pages: 1 2 [3]   Go Up
 

Page created in 0.032 seconds with 19 queries.