xoops forums

trabis

Core Developer
Posted on: 2007/12/4 1:25
trabis
trabis (Show more)
Core Developer
Posts: 2269
Since: 2006/9/1 1
#11

Re: username as uid ?

Hi again, I tried to do that and it can be done but there is a problem.
The images and Url's in the userinfo.php and userinfo.html are relative and will be relative to the new URI so they will break. Changes must be made in this two files like for example adding <{xoops_url}> or XOOPS_ROOT_PATH here and there.
I can´t find another way around this so the final result would be an ugly hack.

If anyone Knows a way around this please post here. I took a look into the SEO hack for CBB and tried to overwrite global variables the same way but it did not solve this problem. I guess it's the browser that transforms this relative URL´s, right?

sarahmx

Quite a regular
Posted on: 2007/12/8 12:54
sarahmx
sarahmx (Show more)
Quite a regular
Posts: 381
Since: 2007/10/28
#12

Re: username as uid ?

bump ...any other solution ?

sarahmx

Quite a regular
Posted on: 2007/12/21 4:00
sarahmx
sarahmx (Show more)
Quite a regular
Posts: 381
Since: 2007/10/28
#13

Re: username as uid ?

Bump ?

antifmradio

Just can't stay away
Posted on: 2008/4/19 5:01
antifmradio
antifmradio (Show more)
Just can't stay away
Posts: 457
Since: 2007/8/15
#14

Re: username as uid ?

currently the way i have been doing it is i need to go into myHTACCESS file and add in a new line for each new member that joins the site

This is the code youll want to use
PLEASE MAKE SURE YOU SAVE A WORKING COPY OF YOUR HTACCESS FILE BEFORE DOING THIS!!!!!!!!.


RewriteEngine on
Options +FollowSymLinks

RewriteRule ^USERNAME$ http://MYWEBSITE.com/modules/yogurt/index.php?uid=USER NUMBER [R=301,L,NC]



***********
username is whatever they will use to log into the site
MYWEBSITE is your domain name
The ( number, 1,2,3,4,5 ) is the user id number for each person who joins)

Dont worry about username being case sensitive. Its not.
At the end of the code i placed this " NC " in the flagged section
this means NOT CASE SENSITIVE


copy this code and use it again and again for each user who joins by simply placing a new line in your HTACCESS file.

sarahmx

Quite a regular
Posted on: 2008/4/19 5:30
sarahmx
sarahmx (Show more)
Quite a regular
Posts: 381
Since: 2007/10/28
#15

Re: username as uid ?

thank you very much antifmradio....

it will be cool if this can be done automatically....just like in social network sites


i want to use this in one of my project..but the problem is currently i have 700+ members in my site..

thank you

antifmradio

Just can't stay away
Posted on: 2008/4/19 5:36
antifmradio
antifmradio (Show more)
Just can't stay away
Posts: 457
Since: 2007/8/15
#16

Re: username as uid ?

i also have more then 800 members
If you know alittle about EXCEL spreadsheets, you can make the sheet write out all the lines for you
All you need to do is COPY / PASTE the list of user names (which you can get a list of from your database downloaded AS an excel sheet ) * wink

Theres another little hand for ya :)

trabis

Core Developer
Posted on: 2008/4/19 8:53
trabis
trabis (Show more)
Core Developer
Posts: 2269
Since: 2006/9/1 1
#17

Re: username as uid ?

Hello, I´ve been studing rewrite urls methods. In this studing I found a solution for my problem above. I´ll see if i can make a script. Give a day.

sarahmx

Quite a regular
Posted on: 2008/4/19 13:23
sarahmx
sarahmx (Show more)
Quite a regular
Posts: 381
Since: 2007/10/28
#18

Re: username as uid ?

antifmradio: thanks..I'll try it

trabis: ok..take your time..thank you trabis

trabis

Core Developer
Posted on: 2008/4/20 3:29
trabis
trabis (Show more)
Core Developer
Posts: 2269
Since: 2006/9/1 1
#19

Re: username as uid ?

Here you go:

http://www.xuups.com/modules/wfdownlo ... inglefile.php?cid=6&lid=1

Instructions are inside.

It shall redirect yoursite/watheveryoulike/username
to
the profile page you choose: system, smartprofile, yogurt, etc

Any bugs please report.

sarahmx

Quite a regular
Posted on: 2008/4/20 5:17
sarahmx
sarahmx (Show more)
Quite a regular
Posts: 381
Since: 2007/10/28
#20

Re: username as uid ?

thank you trabis...I will test this...

you should submit this to the news section so more user will aware of this hack and can test it