Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
MySpace type User Profile Link Details »»
MySpace type User Profile Link
Version: 1.00, by MiahBeSmokin420 MiahBeSmokin420 is offline
Developer Last Online: Aug 2009 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.x Rating:
Released: 02-11-2008 Last Update: 02-11-2008 Installs: 26
Additional Files  
No support by the author.

Tested with vb 3.6.7 and 3.6.8
Tested on IE7 and FF2

Ok lets say your site is:

http://Example.com/Forums/


And the path to members profiles is even longer:

http://Example.com/Forums/member.php...xampleUserName


Well lets give your members a smaller and easy link to remember.


How about:

http://Example.com/Username

Oh ya thats alot better huh?

Ok well this is how you do it.


Add this to the .htaccess in root of example.com


HTML Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://Example.com/Forums/member.php?username=$1 [R]
Replace this:

http://Example.com/Forums/


With the link to your forums.


All members and guests will be able to go to:

http://Example.com/ThereUserName

And automatically be forwarded to the profile of the user name they entered after the site link.


Thats it just one easy .htaccess file edit and your done.


NOTE:
Want to use a diffrent domain like:

http://ExampleTwo.com/UserName

Just add the .htaccess file to that domain instead

just make sure that whats in red below links to your site

RewriteRule ^(.*)$ http://Example.com/Forums/member.php?username=$1



Enjoy and click install if you use this mod.

Also Some Credit to Eikinskjaldi for pointing me in the right way to get this working.

Show Your Support

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

Comments
  #72  
Old 05-05-2008, 08:31 PM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any chance of setting it up as a subdomain as in

http://username.example.com

thanks
Reply With Quote
  #73  
Old 11-22-2008, 11:32 PM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using this on vb3.7 and it works beautifully. I am just looking to make one change in the user profile. On the contact tab it shows a direct link to the user profile. Where would I go in the templates to change that and what would I replace it with to show it as www.sitename/username

Thanks!!


EDIT: I figured it out!! Thanks again for a great addition to my site!!
Reply With Quote
  #74  
Old 12-05-2008, 11:57 PM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome! I LOVE this!
Reply With Quote
  #75  
Old 12-06-2008, 12:28 PM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm... this hack seems to interfere with me getting to phpMyAdmin. (it thinks that the link to my phpMyAdmin is a username and redirects me to the forums saying that there is no such user.

I can work around this by deleting the htacess file when I need in phpMyAdmin and uploading it again when I'm logged in, but is there a way to actually make it so that certain filenames in the root directory of your site are called correctly?
Reply With Quote
  #76  
Old 12-24-2008, 01:13 AM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We were having some problems with this code, as it seemed to redirect actual directories that exist thinking that they were member user names.

The following code seems to work better. It also includes the fix for the log-in issues some users experience when site administrators use vBulletin and vBAdvanced.

Code:
Options +FollowSymLinks
RewriteEngine on
#
# Externally redirect to canonical hostname to fix vBadvanced login
# problems and to prevent duplicate content problems in search engines
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
#
# Internally rewrite all requests for URL-paths which do not resolve
# to existing files or directories to user profile script
RewriteCond $1 !^vb/member\.php$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /vb/member.php?username=$1 [L]
Reply With Quote
  #77  
Old 01-28-2009, 11:48 PM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you actually want to rewrite the links change:

Quote:
RewriteRule (.*) /vb/member.php?username=$1 [L]
to


Quote:
RewriteRule (.*) /vb/member.php?username=$1 [R]
You will have to hard code any variables (like profile pic) in your memberinfo template though or they won't appear.
Reply With Quote
  #78  
Old 02-27-2009, 05:26 PM
zombietom's Avatar
zombietom zombietom is offline
 
Join Date: May 2008
Location: ky
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I been trying to get this to work but it wouldn't so ..i got to looking and found my problem

here is the current code to add to htacess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://Example.com/Forums/member.php?username

notice -- example.com/Forums....

Well that is a Capital F and that was causing it not to work for me...i changed the F to a f and it works fine on 3.7.1

thanks
Reply With Quote
  #79  
Old 02-27-2009, 06:54 PM
zombietom's Avatar
zombietom zombietom is offline
 
Join Date: May 2008
Location: ky
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

member profiles to reflect their new profile url in contact tab

Edit the template "memberinfo_block_contactinfo" and find this code:
HTML Code:
<dd><a href="$prepared[profileurl]">$prepared[profileurl]</a></dd>
Add or change it to:
HTML Code:
<dd><a href="http://www.yoursite.com/$prepared[username]">http://www.yoursite.com/$prepared[username]</a></dd>
What it was leave the orginal code and add this:

HTML Code:
<br>or<dd><a href="http://www.yoursite.com/$userinfo[username]">http://www.yoursite.com/$userinfo[username]</a></dd>
to see example go to www.tzaclan.net/zombietom and then click on contact info tab-- look toward the bottom

You will need to change yoursite.com to that of your forum.


PS -the one guy was right , you do get a error report if you are watching the "who's online" section --it will show users looking at profiles that are not there so it gives a error,no emails or anything,just you will not really know what the person is looking at in the forums sometimes.
Reply With Quote
  #80  
Old 05-13-2009, 09:07 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zombietom View Post
member profiles to reflect their new profile url in contact tab

Edit the template "memberinfo_block_contactinfo" and find this code:
HTML Code:
<dd><a href="$prepared[profileurl]">$prepared[profileurl]</a></dd>
Add or change it to:
HTML Code:
<dd><a href="http://www.yoursite.com/$bbuserinfo[username]">http://www.yoursite.com/$bbuserinfo[username]</a></dd>
What it was leave the orginal code and add this:

HTML Code:
<br>or<dd><a href="http://www.yoursite.com/$userinfo[username]">http://www.yoursite.com/$userinfo[username]</a></dd>
to see example go to www.tzaclan.net/zombietom and then click on contact info tab-- look toward the bottom

You will need to change yoursite.com to that of your forum.


PS -the one guy was right , you do get a error report if you are watching the "who's online" section --it will show users looking at profiles that are not there so it gives a error,no emails or anything,just you will not really know what the person is looking at in the forums sometimes.
That code you provided will give the current user their profile url....If they view another person's profile it will not give you their's, but yours again.
Reply With Quote
  #81  
Old 05-13-2009, 09:16 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the code you should use.

Replace This:
Code:
<a href="$prepared[profileurl]">$prepared[profileurl]</a>
With This:
Code:
<a href="http://YourSiteName.com/$prepared[username]">YourSiteName/$prepared[username]</a>
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 04:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05898 seconds
  • Memory Usage 2,325KB
  • 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
  • (3)bbcode_code
  • (7)bbcode_html
  • (3)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