vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - MySpace type User Profile Link (https://vborg.vbsupport.ru/showthread.php?t=170293)

MiahBeSmokin420 02-11-2008 10:00 PM

MySpace type User Profile Link
 
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.

MiahBeSmokin420 02-12-2008 09:02 AM

Extra little things you can do with this:

Find in navbar template:

HTML Code:

<!-- breadcrumb, login, pm info -->
Directly Above or if you have a top nav bar then add above that:

HTML Code:

<if condition="$show['member']">
<b>My Url: <a href="http://Example.com/$bbuserinfo[username]">Example.com/$bbuserinfo[username]</a>
</b></if>

Which will add:

My Url: Example.com/UserName

Note: this will only be view able to members.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In Register template find:

HTML Code:

<div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
                <strong>$vbphrase[username]</strong>:<br />

Add above:

HTML Code:

<BR><strong>Your user name will also be your permanent link to your profile and can not be changed.<BR>Example: http://Example.com/YourUserName</strong><BR><BR>
Changing Example.com to the domain you are going to use to shorten profile links with.

Which will add a small note during registration letting soon to be new members know that there user name will also be used as part of the link to there profile.

Hope that this info is useful to you and remember to click install if you use this mod.

sheryjutt 02-12-2008 11:45 AM

Any ScreenShot Please

MiahBeSmokin420 02-12-2008 11:50 AM

how are you going to have a screen shot for a link???

the closest your are going to get to a screen shot is look at my signature on here and you will see that it says my profile link

and then once you click on the it will redirect you to my profile

but my site is closed right now while we are updating alot of things

but its a link you ready dont need a screen shot

just upload the .httaccess to your public_html after you put replace the link with your forum link like it says and then just go to that domain /yourusersname

MiahBeSmokin420 02-12-2008 11:51 AM

also if your user name has a space make sure you type the space in the url when you try to go to it or else it will say some dumb stuff

Gryphon 02-12-2008 01:47 PM

Quote:

Originally Posted by sheryjutt (Post 1441398)
Any ScreenShot Please

:rolleyes:

CallieJo 02-12-2008 04:52 PM

What is the difference with this and this: https://vborg.vbsupport.ru/showthread.php?t=165986
Thanks ;)

Gryphon 02-12-2008 04:53 PM

Quote:

Originally Posted by CallieJo2 (Post 1441565)
What is the difference with this and this: https://vborg.vbsupport.ru/showthread.php?t=165986
Thanks ;)

Different author ;)

That other one will not allow usernames with special characters, only numbers and letters.

MiahBeSmokin420 02-12-2008 06:46 PM

Quote:

Originally Posted by Gryphon (Post 1441567)
Different author ;)

That other one will not allow usernames with special characters, only numbers and letters.

bingo

CallieJo 02-12-2008 07:10 PM

Quote:

Originally Posted by Gryphon (Post 1441567)
Different author ;)

That other one will not allow usernames with special characters, only numbers and letters.

I see...very clever;)

Quote:

Originally Posted by MiahBeSmokin420 (Post 1441666)
bingo

Good work!

Does this also change the url noted in the profile to reflect the new url?


All times are GMT. The time now is 02:45 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.01825 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete