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
  #2  
Old 05-23-2005, 08:03 PM
Paul_d_g Paul_d_g is offline
 
Join Date: Apr 2005
Location: UK
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenshots?
Reply With Quote
  #3  
Old 05-23-2005, 08:04 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well there aren't really any because all this is doing is allowing you to type in username after your forum address to go directly to a users profile making it easy to link to and lookup users profiles.

Rather than having to type in {forumaddress}/member.php?username={username}. Now you can just type {forumname}/{username}.
Reply With Quote
  #4  
Old 05-23-2005, 08:10 PM
nexialys
Guest
 
Posts: n/a
Default

NOTA: you need MOD_REWRITE to be activated in your Apache installation... not all Hosts permit this... verify before making any complain here that it's not working properly...
Reply With Quote
  #5  
Old 05-23-2005, 08:15 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah thanks nexialys for that good point. If this hack doesn't work for you it means that you don't have MOD_REWRITE activated in your Apache installation and the hack won't work period.
Reply With Quote
  #6  
Old 05-23-2005, 09:36 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Problem with this hack, everything under is subjected to it, such as /forums/gallery tells you user has not registered
Reply With Quote
  #7  
Old 05-23-2005, 09:43 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not if you place the trailing slash at the end of the directory e.g. /forums/gallery/ will still take you to gallery. No slash takes you to the user profile trailing slash takes you to the driectory you want and, if you link directly to a PHP file that works fine too.
Reply With Quote
  #8  
Old 05-23-2005, 10:00 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, thanks. I will put the trailing slash in the links because I like your hack.
Reply With Quote
  #9  
Old 05-23-2005, 10:39 PM
nexialys
Guest
 
Posts: n/a
Default

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

Quote:
Originally Posted by Lionel
ok, thanks. I will put the trailing slash in the links because I like your hack.
You should always make sure you put the trailing slashes in just to make sure . If you installed the hack please click install as this is my first hack and I would love to see how many people actually end up using this hack.
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 02:10 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.10578 seconds
  • Memory Usage 2,288KB
  • Queries Executed 23 (?)
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
  • (1)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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (8)postbit_onlinestatus
  • (10)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