Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User MOD Rewrite Details »»
User MOD Rewrite
Version: 1.00, by altsounds altsounds is offline
Developer Last Online: Dec 2014 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 05-22-2005 Last Update: Never Installs: 24
 
No support by the author.

This is a pretty simple hack but is designed so that you can access members profiles quickly and / or your members can have an easy link to pass around for their user profile.

STEP 1:

If you don't have one already create a file named .htaccess in your forums root directory.

STEP 2:

Paste the following code within that file:

## Altsounds.com Member re-write Hack Version1
## All music fans should check out altsounds.com for lots of free music to listen to!!

# turn the Apache MOD_REWRITE engine on
RewriteEngine On

# this first rule will catch the "blank" entry into the
# Forums directory, taking the user to the main forum page - change as appropriate
RewriteRule ^$ hangout.php

# this next entry will catch everything else and pass
# it to the member.php engine for processing in
# the "member" section
RewriteRule (^[-_A-Za-z0-9\ ]*$) member.php?&username=$1

That's it! My main forum page is hangout.php. So you should change that within the code above to whatever your forum main page is (usually index.php).

Now all your members links to their profile is {link to forum}/{username} or {link to forum}/{userid} e.g. in my websites case http://hangout.altsounds.com/altsounds or will take you directly to the username "altsounds" user profile. If no profile is available (i.e. a member is not registered) you will get the appropriate error message.

Simple but cool. Hope you all enjoy.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 07-20-2005, 04:39 AM
KTBleeding's Avatar
KTBleeding KTBleeding is offline
 
Join Date: Feb 2004
Location: Tooele, UT
Posts: 756
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by acidburn0520
I also noticed that if the user has a space in their name, it doesn't work. A %20 is added in its place... and won't work.
I can't confirm this: The %20 works just fine for me so far.
Reply With Quote
  #33  
Old 07-25-2005, 09:49 PM
loftyasianz loftyasianz is offline
 
Join Date: May 2004
Location: philadelphia, pa
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this hack is very usefule thank you. it will work PERFECTLY when vBSpace comes out. where the users can have a http://www.yoursite.com/username. awesome!

vbspace here -> https://vborg.vbsupport.ru/showthread.php?t=82930

edit: one of my members noticed something after i installed. i have vba cmps installed on my forum so i put the .htaccess file in the root directory, edited hangout.php to forums/index.php and members.php to forums/members.php so users can have www.mysite.com/username. but when one of my members was playing around with it he noticed that if you do so it goes to the user's profile but then all of the images that are comming from image.php are comming up broken. does anyone know how to get around this?

thanks in advance.
Reply With Quote
  #34  
Old 07-28-2005, 05:05 PM
Q-v-n-s-Q Q-v-n-s-Q is offline
 
Join Date: Mar 2005
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by loftyasianz
this hack is very usefule thank you. it will work PERFECTLY when vBSpace comes out. where the users can have a http://www.yoursite.com/username. awesome!

vbspace here -> https://vborg.vbsupport.ru/showthread.php?t=82930

edit: one of my members noticed something after i installed. i have vba cmps installed on my forum so i put the .htaccess file in the root directory, edited hangout.php to forums/index.php and members.php to forums/members.php so users can have www.mysite.com/username. but when one of my members was playing around with it he noticed that if you do so it goes to the user's profile but then all of the images that are comming from image.php are comming up broken. does anyone know how to get around this?

thanks in advance.

* BUMP
Reply With Quote
  #35  
Old 07-28-2005, 05:17 PM
loftyasianz loftyasianz is offline
 
Join Date: May 2004
Location: philadelphia, pa
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks ricky. lol i guess you're having the same problem too.
Reply With Quote
  #36  
Old 08-08-2005, 03:09 PM
poetic poetic is offline
 
Join Date: Apr 2003
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what if they have different characters than "(^[-_A-Za-z0-9\ ]*$)"

how can we make it so people with all different characters can use it
Reply With Quote
  #37  
Old 10-13-2005, 02:50 PM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack.

how about if the link site.com/usernamewhatever doesn't return a match username it will then check if there is a folder with the name usernamewhatever ?

well I think it's ok without that

/me clicks install
Reply With Quote
  #38  
Old 11-11-2005, 05:15 AM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KTBleeding
Pretty cool mod..

I did notice a problem though. If a user has a "." in their name, it will not work. I'm pretty sure this is an obvious error..

Would there happen to be a fix for this at all?
Yes, it is recommended tha you run another hack on here for no Special Characters in usernames. Add that hack to stop your users being allowed to add special characters to their usernames. This is pretty much an essential addon hack needed to get the full functionality of this and so you get no 404 erros. I will see if I can find it and post the link here. If anyone finds it b4 me feel free to post it here.
Reply With Quote
  #39  
Old 11-11-2005, 05:19 AM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This would not be due to the hack. MOD rewrite does nothign to your code it meerly takes a string and based on the criteria (or lack thereof) returns a users profile or appropriate error message.

You might want to try (don't know if this will do anything) to put the links as full URLs e.g. http://blahblahblah/forums/member.php.

Other than that I'm not sure why this may have happened and as I said above this hack does not change your vbulletin setup or configuration at all.

Quote:
Originally Posted by loftyasianz
this hack is very usefule thank you. it will work PERFECTLY when vBSpace comes out. where the users can have a http://www.yoursite.com/username. awesome!

vbspace here -> https://vborg.vbsupport.ru/showthread.php?t=82930

edit: one of my members noticed something after i installed. i have vba cmps installed on my forum so i put the .htaccess file in the root directory, edited hangout.php to forums/index.php and members.php to forums/members.php so users can have www.mysite.com/username. but when one of my members was playing around with it he noticed that if you do so it goes to the user's profile but then all of the images that are comming from image.php are comming up broken. does anyone know how to get around this?

thanks in advance.
Reply With Quote
  #40  
Old 11-11-2005, 06:18 AM
vau7 vau7 is offline
 
Join Date: Mar 2004
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could work for 3.5, or?
Reply With Quote
  #41  
Old 12-14-2005, 02:55 PM
Inferno Dragon's Avatar
Inferno Dragon Inferno Dragon is offline
 
Join Date: Sep 2005
Location: United Kingdom
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ yes..It will work! I am sure about it
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:53 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05763 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete