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?

Alfa1 02-12-2008 10:17 PM

I have one site, but with multiple url's pointing to it:
mymainurl.com
mysecondurl.com

I want to display mymainurl.com/forum/member.php?=member.php?username=ExampleUserName
as
mysecondurl.com/username

Is this possible?

iogames 02-12-2008 11:10 PM

Bulletproof?

mystic10 02-12-2008 11:42 PM

what if i want the same thing but for admincp...and put their ip so when then log on with their id it must match the ip for them to log on to admin cp or mod cp can u kindly help

MiahBeSmokin420 02-13-2008 01:44 AM

Quote:

Originally Posted by CallieJo2 (Post 1441690)
I see...very clever;)


Good work!

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

it dose not change any of the urls its just a basic redirect type deal

the link that you enter http://example.com/username is not even a real link it just redirects you to http://example.com/forums/member.php?=username

which would be the profile of the members name you entered after http://Example.com/

also please make sure you click install if you are using this

Quote:

Originally Posted by Alfa1 (Post 1441808)
I have one site, but with multiple url's pointing to it:
mymainurl.com
mysecondurl.com

I want to display mymainurl.com/forum/member.php?=member.php?username=ExampleUserName
as
mysecondurl.com/username

Is this possible?

yes thats the way i have mine set up

just add the .httaccess file in the other domain you have and set it to go to the domain you want it to



Quote:

Originally Posted by iogames (Post 1441828)
Bulletproof?

not really sure what that means

Quote:

Originally Posted by mystic10 (Post 1441846)
what if i want the same thing but for admincp...and put their ip so when then log on with their id it must match the ip for them to log on to admin cp or mod cp can u kindly help


i dont know you would have to ask someone else im not sure that would most likely need a totaly diffrent mod

MiahBeSmokin420 02-13-2008 01:48 AM

**Updated** Added info the my reserved post.

iogames 02-13-2008 05:49 PM

Well, actually it sends me to the Profile Page of the User... BUT!
still looks the same!
Why?

MiahBeSmokin420 02-13-2008 06:02 PM

ya its supoesed to

this is just so that members do not have to remember the whole link

do you think that a member wants to go to his friend and be like:

Hey man check out my profile the link is
http://www.iogames.com/chat/member.php?username=coder

no i dont think they want to try to remember that whole thing when all they have to do is remember a much smaller link which would be your site link and then there username

see the point of this?

TCE Killa 02-13-2008 06:13 PM

Thanks alot for this Stillfallin, I've been looking for this for awhile. Marked installed :)

Btw, are you online on COD4 PS3? If so, get back to me through PM. Thanks.

MiahBeSmokin420 02-13-2008 08:36 PM

nope i dont have a ps3 yet i should have one here probally next month

iogames 02-14-2008 11:10 PM

Quote:

Originally Posted by MiahBeSmokin420 (Post 1442379)
ya its supoesed to

this is just so that members do not have to remember the whole link

do you think that a member wants to go to his friend and be like:

Hey man check out my profile the link is
http://www.iogames.com/chat/member.php?username=coder

no i dont think they want to try to remember that whole thing when all they have to do is remember a much smaller link which would be your site link and then there username

see the point of this?

Now I see! well I will add the explanation to users

MiahBeSmokin420 02-14-2008 11:35 PM

Quote:

Originally Posted by iogames (Post 1443315)
Now I see! well I will add the explanation to users

if you do the first part of this addon for this in this post
https://vborg.vbsupport.ru/showpost....36&postcount=2

then they should be able to figure it out

but ya hope you like it

Alfa1 02-16-2008 05:07 PM

Quote:

Originally Posted by Alfa1 (Post 1441808)
I have one site, but with multiple url's pointing to it:
mymainurl.com
mysecondurl.com

I want to display mymainurl.com/forum/member.php?=member.php?username=ExampleUserName
as
mysecondurl.com/username

Is this possible?

Quote:

Originally Posted by MiahBeSmokin420 (Post 1441891)
yes thats the way i have mine set up

just add the .httaccess file in the other domain you have and set it to go to the domain you want it to

I do not have different directories per url. It's all the same. My profiles can be accessed on both:
mymainurl.com/forum/member.php?u=1
and
mysecondurl.com/forum/member.php?u=1

It is the same page. How do I set this in .htaccess?

stwilson 02-18-2008 04:09 PM

Does this work in 3.7B5? I tried but no go and was not sure if I was doing something wrong.

MiahBeSmokin420 02-18-2008 05:28 PM

i dont know i dont have 3.7

im would imagine it would though

TCE Killa 02-18-2008 07:48 PM

If you want this to show up in your welcome box instead of by your navbar... Then in your navbar template, find:

PHP Code:

<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]2="$vbphrase[total_x_nav_compiled]3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if> 

And add below:

PHP Code:

<if condition="$show['member']">Your Profile URL: <a href="http://YourDomain.com/$bbuserinfo[username]">YourDomain.com/$bbuserinfo[username]</a>
</if> 

Changing 'YourDomain' with your forums domain name.

See screenshot in what I mean.

jeepcircle 02-18-2008 07:49 PM

Is there a way to allow this only for people in certain usergroups?

MiahBeSmokin420 02-19-2008 10:05 AM

not realy i dont know why you would want to do that though

but im sure you could hide that link to user groups that way they dont know it is there for them

but doing that would just not be cool

caocao1 02-19-2008 10:23 AM

thanks for your post :D

Alfa1 02-19-2008 01:55 PM

MiahBeSmokin420; do you have a solution to my question above?

MiahBeSmokin420 02-20-2008 04:25 PM

Quote:

Originally Posted by Alfa1 (Post 1446645)
MiahBeSmokin420; do you have a solution to my question above?

sorry missed that post

just add the httaccess file to both domains and then just point them to where your foums are installed i guess

but from the way you said that there it looks like you have 2 diffrent forums on 2 diffrent domains cause i dont see how you can have the same forum with 2 domains without having one of the domains redirect to the other

so honestly idk man

jeepcircle 02-20-2008 11:49 PM

Quote:

Originally Posted by MiahBeSmokin420 (Post 1446519)
not realy i dont know why you would want to do that though

but im sure you could hide that link to user groups that way they dont know it is there for them

but doing that would just not be cool

It would be cool if you had a "premium member" group (or something of the like) where they could have there own address like that. Just a thought

MiahBeSmokin420 02-21-2008 12:15 AM

ya that would be cool but unfortunately there is now way that i know of to make a htaccess file have user group permissions seeing as how it is controlled by the server and not vb

iogames 02-21-2008 12:29 AM

Can you add this info on the 'Welcome Email'??? for them not to forget their URLs?

MiahBeSmokin420 02-21-2008 08:48 AM

dont quote me on this but im almost positive what you would add to the the welcome email is:

Your profile url: http://yourdomain.com/$username

that should do it but i would send a test email to your seld before you make that a permant change to the welcome email

Jongo 02-23-2008 02:52 PM

This is an awesome addition to my board, the members love it.

Thanks ever so much for uploading it!

TCE Killa 03-04-2008 03:21 PM

Their is an error with this though, it effects the currently active users/who's online list.

It keeps saying everyone is viewing an error message and looking at a user profile, but no one is infact doing that. I got rid of it from the .htaccess and it is fine again, any way to fix this? Thanks.

MiahBeSmokin420 03-06-2008 12:53 AM

Quote:

Originally Posted by TCE Killa (Post 1456808)
Their is an error with this though, it effects the currently active users/who's online list.

It keeps saying everyone is viewing an error message and looking at a user profile, but no one is infact doing that. I got rid of it from the .htaccess and it is fine again, any way to fix this? Thanks.


There is no way it could mess with anything in vB

Especially not the WOL

Take a screen shot of the WOL page

dancue 03-06-2008 02:23 AM

Thanks. Nice and simple.

For those of you who want to place a link in your userCP do the following edit in the UserCP_Shell:

find:
Code:

$navbar
add below:
Code:

<!-- table for MySpace profile link -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

<tr>

        <td class="tcat" align="center">My URL</td>
</tr>
<tr>
<td class="$navclass[signature]" nowrap="nowrap" align="center">
<b><a href="http://YourDomain.com/$bbuserinfo[username]">YourDomain.com.com/$bbuserinfo[username]</a>
</b></td>
</tr>
</table>
<br>
<!-- / table for MySpace profile link -->

edit:
For those of you still using the default vBulletin style replace "$navclass[signature]" with "info" or any other predefined class. Otherwise you will get an error.

TCE Killa 03-07-2008 10:50 PM

I'll get a screenshot tomorrow, but I hope you can help, thanks man.

TCE Killa 03-09-2008 10:15 PM

Heres a screenshot of the problem, and like I'm saying, when I remove the code from .htaccess or whatever it is, it works fine again:


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

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.01413 seconds
  • Memory Usage 1,848KB
  • 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
  • (2)bbcode_code_printable
  • (5)bbcode_html_printable
  • (2)bbcode_php_printable
  • (17)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
  • (40)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