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
  #12  
Old 05-24-2005, 01:52 AM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nexialys
a little modif here, so everyone is happy...:

ifyou want your users to be located also by their userid instead of just their username, change the last line with:
Code:
RewriteRule (^[-_A-Za-z\ ]*$) member.php?username=$1
RewriteRule (^[-_0-9\ ]*$) member.php?userid=$1
Nexialys thanks again for making sure everyone is happy. I appreciate that. Follow Nexialysis' mod of this hack if you want to do it by userid too.
Reply With Quote
  #13  
Old 05-24-2005, 02:03 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have the guestbook/homepage hack installed, the modified version that displays it on a separate page; so what I did was a htaccess from root to display members webpage and another one at forum root to display the profile.

I learn something today and I started to change all my directory links to reflect the trailing slash.
Reply With Quote
  #14  
Old 05-24-2005, 02:11 AM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

altsounds, nice mod! I also really dig your site, it looks like you are using jamroom? I wrote up a little something so your vb members can add their jamroom album to under their avatar in the postbit, here's the link to it on the jamroom site http://www.jamroom.net/phpBB2/viewtopic.php?t=2910
Reply With Quote
  #15  
Old 05-24-2005, 01:02 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Eric cool MOD, I will be using this for sure.
Reply With Quote
  #16  
Old 05-25-2005, 01:27 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will they still get the appropriate error message if they are now allowed to view profiles, like Guests, or will this bypass that?
Reply With Quote
  #17  
Old 05-26-2005, 06:10 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Will they still get the appropriate error message if they are now allowed to view profiles, like Guests, or will this bypass that?
Haven't tested this but you should still get the same message regardless of whether or not you are a guest or a registered visitor. Basically letting you know that the member doesn't exist.
Reply With Quote
  #18  
Old 05-26-2005, 06:48 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They get the error I just wish this worked more smoothly. A lot of links come up dead after doing this.


isnt there a wildcard version to this that makes your site a subdomain?

username.yoursite.com
?
Reply With Quote
  #19  
Old 05-27-2005, 05:20 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As discussed earlier, if your directory links have a trailing / you should have no problem, you should be putting / into links that are directories anyway.

Hope that helped?
Reply With Quote
  #20  
Old 05-27-2005, 08:09 PM
Lizard King Lizard King is offline
 
Join Date: Jan 2005
Location: Mersin
Posts: 907
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working pretty good thanks
Reply With Quote
  #21  
Old 05-28-2005, 12:20 AM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is sort of overkill. There are two ways to access user profiles built in, ID and username.

the parameter for id is member.php?u=Userid
the parameter for username is member.php?getinfo&username=username

You do not need to mod rewrite 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 06:15 PM.


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.05340 seconds
  • Memory Usage 2,305KB
  • 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
  • (1)bbcode_code
  • (2)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