Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Advertise on this site

Joomlapolis Forums  


<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>
Creating a CUSTOM URL for users/members
Date: 2005/12/20 11:59 By: nbarfoot101 Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 10
graphgraph
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.
Click here to see the profile of this user 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
graphgraph
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)

Click here to see the profile of this user 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
graphgraph
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?
Click here to see the profile of this user 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
graphgraph
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
Click here to see the profile of this user 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
graphgraph
WOW.


thank you. you are the man.
It works perfectly.
Click here to see the profile of this user 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
graphgraph
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
Click here to see the profile of this user The topic has been locked.

<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC2, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login