Making user homes....

VaginaMuncher

Chilling with me bitch Fiona
Mar 17, 2013
447
58
Hello mein negers....
So I've been learning bits of PHP whilst learning how to filter things efficiently and more proper....
I've been working on a user based project. Where users can register, login, view others profiles.....

I wanted it so they could go from
localhost/home/profile/{username} - This is a site based on RevCMS but fuck all to do with hotels...
I was gathering that I would need to site/home/profile={username} but I have no clue after what I've learnt I couldn't find it's uses...
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
You'd have to add a RewriteRule to your .htaccess file, like so to accomplish this:
Code:
RewriteEngineOn
RewriteRule ^profile/([a-zA-Z0-9]+)$ profile.php?user=$1

The above code assumes that you have a file called "profile.php" and a $_GET variable called user. It also assumes that the users name can only contain alphabetaical and numeric characters.
Code:
Before: http://localhost/profile.php?user=RastaLulz
After: http://localhost/profile/RastaLulz
 

VaginaMuncher

Chilling with me bitch Fiona
Mar 17, 2013
447
58
You'd have to add a RewriteRule to your .htaccess file, like so to accomplish this:
Code:
RewriteEngineOn
RewriteRule ^profile/([a-zA-Z0-9]+)$ profile.php?user=$1

The above code assumes that you have a file called "profile.php" and a $_GET variable called user. It also assumes that the users name can only contain alphabetaical and numeric characters.
Code:
Before: http://localhost/profile.php?user=RastaLulz
After: http://localhost/profile/RastaLulz
Ah thanks Josh. I have a file named profile.php
And I've put that in the htaccess file...
But It just doesn't print anything on the site other than Object not found...
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
Ah thanks Josh. I have a file named profile.php
And I've put that in the htaccess file...
But It just doesn't print anything on the site other than Object not found...
That's because "profile.php" doesn't exist in that location..
 

VaginaMuncher

Chilling with me bitch Fiona
Mar 17, 2013
447
58
As it's using RevCMS to use the user system etc...
How would I add it so /app/tpl/skins/MySite/profile.php

Like you said its wrong atm RewriteRule ^profile/([a-zA-Z0-9]+)$ profile.php?user=$1
 

VaginaMuncher

Chilling with me bitch Fiona
Mar 17, 2013
447
58
Okay so i've fixed it now...
RewriteRule ^profile/(.*)/?$ index.php?url=profile&user=$1 [L,QSA]
All I need to know Is how to change the page title to fit the members username?S:
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
You could just echo out $_GET['user'] (remember to filter it both for the output to the user and when searching the database).
 

VaginaMuncher

Chilling with me bitch Fiona
Mar 17, 2013
447
58
Hey.. So I'm pretty much complete and managed to fix it perfectly...
I'm just wondering how to pull information for that user so when its
url.com/profile/ryan it pulls THERE information....
Any help? I've already done this for my hosting site but for the retro I don't know how to pull credits... pixels... figure etc?!?
 

GohanSSJ

Ya.
Feb 18, 2013
281
30
I'm basically looking for homepage for the Habbo theme but i clearly can't code nor program so this may just be the thread to ask if someone has it or not and if they are able to release / give it because I'm really in need of it.
 

GohanSSJ

Ya.
Feb 18, 2013
281
30
Yes the profile page and as I'm unable ton code such thing myself I'd think that it would be appreciated if someone else shared / released it because I'm really in need of it.
 

VaginaMuncher

Chilling with me bitch Fiona
Mar 17, 2013
447
58
It's nothing brilliant....
Ill give you the code with enables to view other peoples pages
so url.com/profile/anyones account....
I still need to code the scripts which pull player info
 

Users who are viewing this thread

Top