|
|
|
Creating a CUSTOM URL for users/members
|
|
Date: 2005/12/20 11:59
|
By: nbarfoot101
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 10 |   | |
|
Hey everyone,
Im looking to do something pretty specific here, and i just want to know if its possible, and if it is, how i can do it.
I want members of my site to get a custom URL that is assigned when they register to become a member (i am using community builder RC2), and it would entale creating something such as:
(after they sign up they get)
http://www.mydomain.com/USERNAME
where username would be the one they sign up with, and it would take the browser to that users page in community builder, their profile with thier picture, blog etc.
I HAVE the PHP code to do it, so that it writes to the htaccess and creates a new rule.
My only problem is, where do i put it?
I would have to put the code right where they sign up, and there member data gets inserted?
Any ideas.
thanks.
|
|
The topic has been locked. |
|
|
|
Re:Creating a CUSTOM URL for users/members
|
|
Date: 2005/12/20 14:35
|
By: mikko
|
Status: User
|
|
|
Karma: 106  
|
|
Platinum Joomlapolitan  | Posts: 2230 |   | |
|
You could either make a custom plugin with your code (see the plugin docs), or use SEF and alias component (search for alias niin mamboforge), or make custom redirection by making a directory for each user and having that directory to redirect to the profile at index.php
Making the plugin would be the most elegant way to do this.
mikko My FREE plugins: List Tab, Conditions, Extended Selects, ReadPDF, Consolidated Tab, Privacy Policy, CB Tab Wrapper Module, CB List Wrapper Module, Simple Sort, Filter Columns, Super Search, Advanced Search, Template Switcher. More info and downloads.
Check out a demo of super search and sortable lists.
My commercial plugins: Advanced Profile Control (1.0.6 stable released)
|
|
The topic has been locked. |
|
|
|
|
Re:Creating a CUSTOM URL for users/members
|
|
Date: 2006/01/03 15:01
|
By: nbarfoot101
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 10 |   | |
|
How exactly do you make a plugin?
I have the code done, but i have NO idea how to make a plugin?
Also, wouldnt it be easier, just to find the part of the code where member data is stored in the database, and execute the code right there?
|
|
The topic has been locked. |
|
|
|
Re:Creating a CUSTOM URL for users/members
|
|
Date: 2006/01/03 17:52
|
By: trail
|
Status: Admin
|
|
|
Karma: 612  
|
|
Admin  | Posts: 473 |   | |
|
Ehm.. this idea has been suggested and developped by me in RC1, after wich it was perfected by the core dev and incorporated in RC2.
To enable this you just have to use MOD_REWRITE (if you can do sef you can do this to) and add this line to your htaccess
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ /index.php?option=com_comprofiler&task=userProfile&user='$1' [L]
RC2 is expecting you to do this and will pick up your userprofile...
Post edited by: Trail, at: 2006/01/03 11:52 DJ Trail. CB Co-Founder & Test-Lead. Plugins: My Age, Starsign Matchmaking Horoscope, My Visitor, My Highscores, My ProfileID, My Components: Import & Invite Karma Casino (Use Test / Test) My Modules: Many 
|
|
The topic has been locked. |
|
|
|
|
Re:Creating a CUSTOM URL for users/members
|
|
Date: 2006/01/04 03:17
|
By: nbarfoot101
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 10 |   | |
|
WOW.
thank you. you are the man. It works perfectly.
|
|
The topic has been locked. |
|
|
|
Re:Creating a CUSTOM URL for users/members
|
|
Date: 2006/01/04 14:38
|
By: rembrandt
|
Status: User
|
|
|
Karma: 1  
|
|
Fresh Joomlapolitan  | Posts: 14 |   | |
|
In my htaccess file I already have the rule below. Do I just add your rule below the existing one, or replace part of it?
# Rules #
RewriteCond %{REQUEST_FILENAME} !.(jpg|jpeg|gif|png|css|js|pl|txt)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php
|
|
The topic has been locked. |
|
|