Username as url?!?!?

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Username as url?!?!?

Post by jmansa »

Is it possible to get the username as a pretty url after login...

My idea is that when I go to my frontend login page "mypage.com/login" and login I have set the frontendtag to redirect to a page called "mypage.com/users" whenever a user login, but I would like it to say "mypage.com/username" (username=mikejansen)

Is this possible, and if yes... How?
alby

Re: Username as url?!?!?

Post by alby »

jmansa wrote: Is it possible to get the username as a pretty url after login...

My idea is that when I go to my frontend login page "mypage.com/login" and login I have set the frontendtag to redirect to a page called "mypage.com/users" whenever a user login, but I would like it to say "mypage.com/username" (username=mikejansen)

Is this possible, and if yes... How?
If you have many pages for each username, you can insert in FronEndUsers Preferences to redirect {$username}

Alby
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Username as url?!?!?

Post by jmansa »

My idea is only to have one, and then the page has diffenent content depending on each user... Like myspace.com... Same idea. So if I have lets say 5000 users with the same template page I dont have to create 5000 pages, just one... Then each user has a homepage called mypage.com/hisusername...
alby

Re: Username as url?!?!?

Post by alby »

jmansa wrote: My idea is only to have one, and then the page has diffenent content depending on each user... Like myspace.com... Same idea. So if I have lets say 5000 users with the same template page I dont have to create 5000 pages, just one... Then each user has a homepage called mypage.com/hisusername...
Yes, but in this way you must have 5000 content  ::)

Ok, it's better that you build a your module that retrieve, from db table (always 5000 rows), content for username page content

Alby
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Username as url?!?!?

Post by jmansa »

I have put in the {$username} in the feusers prefrences, but how do I create 1 single page with a dynamic title/name ({$username})... Any idea anyone?
Post Reply

Return to “Developers Discussion”