forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: vraagje on May 09, 2008, 06:31:46 pm

Title: personal galleries into subdomains
Post by: vraagje on May 09, 2008, 06:31:46 pm
Hello,

I'd like to have personal galleries which go into subdomains. The reason behind this is that I want to be able to have statistics over individual albums (bandwith used and views).

I want to be able to show the last uploads&most popular uploads on a central page (so I can't install coppermine on each subdomain, right?)


Is this possible and if so, how? I'm quite a php newbie, sorry... any help would be greatly appreciated!

Thanks in advance.

Joe
Title: Re: personal galleries into subdomains
Post by: just_some_guy on May 09, 2008, 08:29:23 pm
Use Mod Rewrite in a .htaccess to forward the dynamic url to a ("fake") subdomain. There will be plenty solutions on the net, search Google.
Title: Re: personal galleries into subdomains
Post by: vraagje on May 13, 2008, 11:17:43 am
hello, thanks for replying.

I'm sorry but I don't know what mod rewrite in a .htaccess means. I've used google and it lead me to this forum...

could you please expand on your answer? You'd help me a great deal. It's not lazyness, it's poor technical knowledge which makes me post here...

Thanks in advance.
Title: Re: personal galleries into subdomains
Post by: just_some_guy on May 13, 2008, 12:30:43 pm
mod_rewrite is an Apache module - http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
.htaccess is an Apache configuration file - http://httpd.apache.org/docs/1.3/howto/htaccess.html

You can rewite a url in many different ways, what you are looking to do is rewrite something like - user.website.tld to website.tld/file.php?query=user, correct? However, CPG interprets the user id to generate the user gallery and not user name so you would also need to find away to convert the given user name to the users id. Have a look in include/functions.inc.php and look at the get_id() (i think its called that) function.