vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Profile Enhancements - MySpace Style Profile Links PLUS (https://vborg.vbsupport.ru/showthread.php?t=178929)

MiahBeSmokin420 05-11-2008 10:00 PM

MySpace Style Profile Links PLUS
 
MySpace Style Profile Links PLUS

Only tested on a linux server and will only work if you can use .htaccess files (Rewrite Conditions) on your server.

What this will do:
It gives your members a simple and easy link to remember and give to there friends to get to there profile.
Also changes the profile link in members profiles contact us tab from the long ugly link to the new short sexy link.
Also Adds a nicely placed User Profile link to the top of the navbar with profile editing links.

DEMO:
This link:
http://StillFallin.com/StillFallin
Will take you to this link:
http://stillfallinentertainment.com/...me=StillFallin

Screen Shots Attached

vB 3.6.x Version:

https://vborg.vbsupport.ru/showthread.php?t=170293

(Step 1) File Edits

Open your Favorite FTP software

Go to the root of your domain you wish to use as a jump point
Example: /public_html/

Find and open your .htaccess file
Note if you do not have one then create one

Add in the .htaccess file:

Code:

<MySpace Style Profile Link>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://Example.com/Forums/member.php?username=$1 [R]
</MySpace Style Profile Link>

Edit this line here:
RewriteRule ^(.*)$ http://Example.com/Forums/member.php?username=$1 [R]

Just replace:
Code:

Example.com/Forums/
With your forum domain and forum folder

Save, close, and upload back to the server unless you did live edits on the server in that case just close and save.

NOTE:
If you have more then one domain you can add the .htaccess file to other domains as well.
For Example:
My forums are on MyLongDomain.com
But i added the .htaccess file to MyShortDomain.com

Now go to:
Code:

http://Example.com/User Name
Note:
If there are spaces in your user name you must enter the spaces in the link as well
Same goes with other characters like if you have ---User Name---
You Would Enter:
Code:

http://Example.com/---User Name---
That should then redirect you to your profile.
If that works correctly then move on to Step 2


(Step 2) Template Edites

Go to your vB Forums Admin cP > Style Manager > Navigation / Breadcrumb Templates
Open navbar

Before:
Code:

<!-- breadcrumb, login, pm info -->
Add:
Code:


<!-- MySpace Style Profile Link -->
<if condition="$show['member']">
<div align="center">
<table width="100%" align="center">
<tr>
<td width="100%" align="left">
<font color="#FF0000">
My Profile Url: <a href="http://StillFallin.com/$bbuserinfo[username]">StillFallin.com/$bbuserinfo[username]</a>  [<a href="profile.php?$session[sessionurl_q]do=customize">Customize</a>]-[<a href="profile.php?$session[sessionurl_q]do=editprofile">My Details</a>]-[<a href="album.php?$session[sessionurl_q]">My Albums</a>]-[<a href="profile.php?$session[sessionurl_q]do=editprofilepic">My Pic</a>]
</font>
</td>
</tr>
</table>
</div>
</if>
<!-- / MySpace Style Profile Links -->


Edit:

Code:

<font color="#FF0000">
Changing the font color to match you site. Currently it its set to red.

Edit 2 times:
Code:

Example.com
Replace both with the domain that you put the .htaccess file in.

Save and Close

Go to your vB Forums Admin cP > Style Manager > Member Info Templates
Open memberinfo_block_contactinfo

Find:
Code:

<a href="$prepared[profileurl]">$prepared[profileurl]</a>
Replace With:
Code:


<!-- MySpace Style Profile Link -->
<a href="http://Example.com/$prepared[username]">http://Example.com/$prepared[username]</a>
<!-- / MySpace Style Profile Link -->

Edit 2 times:
Code:

Example.com
Replace both with the domain that you put the .htaccess file in.

Save and Close

To get a Sexier looking error page for when a member dose not exist you can do the following edit.

Search in Phases for:
Code:

This user has not registered and therefore does not have a profile to view.
Edit and replace with:

Code:

<center>This user has not registered and therefore does not have a profile to view. <BR><a href="memberlist.php" style="text-decoration: none;">Click Here</a> to view the Full Members List.</center>

MiahBeSmokin420 05-11-2008 10:17 PM

Change Log:

ADDED - Sexier Looking No Member Error

indie2industry 05-11-2008 11:10 PM

Will this only redirect the URL's or EVERYTHING (like pics, files, etc.)
I had a rewrite script before, I would enter something like www.mysite.com/images/logo.gif and it would say that "this profile doesn't exist". Will this do the same??

MiahBeSmokin420 05-12-2008 12:02 AM

no this will only redirect things that have no ending

Example of things that will get redirected
http://Example.com/redirected
http://Example.com/redirected/

Example of things that would not get redirected
http://Example.com/file.extention
http://Example.com/folder/file.extention

so basically anything that dose not have a file extension will be redirected

its also kinda a security feature in a way cause now you don't have to worry about any folders that don't have a index in them cause if someone tried to browse a folder and don't add a file extension then they will be redirected and it will say that member dose not exist error or what not

if you are still unclear of how it works just ask and ill try to explain it some more

See Here is a test:

http://stillfallin.com/close.gif << That will show the image
but if you type it wrong like lets say
http://stillfallin.com/close.GIF << That will not show the image and will get redirected and you will see the no member error

To get a Sexier looking error page for when a member dose not exist you can do the following edit.

Search in Phases for:
Code:

This user has not registered and therefore does not have a profile to view.
Edit and replace with:

Code:

<center>This user has not registered and therefore does not have a profile to view. <BR><a href="memberlist.php" style="text-decoration: none;">Click Here</a> to view the Full Members List.</center>

indie2industry 05-12-2008 12:45 AM

cool & installed.

Zaiaku 05-12-2008 03:47 AM

I did this a long time ago to my forums. :)

elmati 05-12-2008 04:16 AM

Works like a charm :D
Thanks!

MiahBeSmokin420 05-12-2008 05:34 AM

Quote:

Originally Posted by Zaiaku (Post 1516766)
I did this a long time ago to my forums. :)

using my last version or something else
the reason i ask is cause there is another version besides mine that dose not work too well with spaces and symboles

Quote:

Originally Posted by elmati (Post 1516788)
Works like a charm :D
Thanks!

yep no prob

indie2industry 05-12-2008 11:02 AM

no sir......

This one does it too..
Here's an image link directly from my server.

http://www.indie2industry.com/images/keithmurray.jpg

IrPr 05-12-2008 12:41 PM

This will rewrite all 404 files to member.php?username=w00t!

suggestion: rewrite forum/members/username instead of forum/username;)
suggestion2: replace all forum member.php?u=userid links to rewrited one


All times are GMT. The time now is 02:34 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.01157 seconds
  • Memory Usage 1,762KB
  • 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
  • (15)bbcode_code_printable
  • (2)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