vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   User MOD Rewrite (https://vborg.vbsupport.ru/showthread.php?t=81914)

altsounds 05-31-2005 05:13 PM

Quote:

Originally Posted by Jolten
This is sort of overkill. There are two ways to access user profiles built in, ID and username.

the parameter for id is member.php?u=Userid
the parameter for username is member.php?getinfo&username=username

You do not need to mod rewrite it.

There is a lot of call for people just be able to do sitename/username . You have to understand that most users of websites want to direct link to their profiles but have no idea how. This little hack makes people linking to their profiles and sharing it with friends that much easier.

blueuniverse 06-20-2005 09:24 AM

Just to make things even easier for the members (something that is needed on my boards, you can add a link to their profile on the main usercp page). This is what suited me best, but I thought it might be wortwhile posting it here so some of you guys could possibly make use of it.

Anyway, it's just a simple template edit. Go to the template USERCP. Then do the following.

Find

Code:

<!-- ############## SUBSCRIBED THREADS ##############  -->
ABOVE add

Code:

<!-- Start modrewrite usercp add - by ed -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody id="collapseobj_usercp_proflink" style="$vbcollapse[collapseobj_usercp_proflink]">
<tr>
        <td class="alt1"><strong>Link to profile: </strong><a href="$vboptions[bburl]/$bbuserinfo[username]">$vboptions[bburl]/$bbuserinfo[username]</a></td>
</tr>
</tbody>
</table>
<br />
<!-- End modrewrite usercp add - by ed -->

Note - edited it to add the $vboptions[bburl] suggested by nexialys. Thanks. :)

Also, it should be noted that the bit of code there only works when you do the username mod_rewrite. If you did the userid mod_rewrite then replace $bbuserinfo[username] with $bbuserinfo[userid]. I haven't tested that, but I'm pretty sure it should work.

altsounds 06-21-2005 02:06 PM

Nice add on ed. I have already done this on my site but for those that haven't this is of course beneficial.

nexialys 06-21-2005 02:12 PM

YOURBOARDURLHERE can be replaced by : $vboptions[bburl] ... that's the goal of that variable!

blueuniverse 06-21-2005 06:05 PM

Ok, I edited it to include that. Thanks :D

amykhar 07-10-2005 02:34 PM

There's a bug, gang. The username is working. The userid isn't. It's going to a user not found page because it can't find a user with a number name.

Amy

altsounds 07-15-2005 08:05 PM

Thanks for letting me know Amy. The userid thing was added by another user, not me. My original was specifically so that you could do username.

Kirk Y 07-20-2005 02:26 AM

The UserID works for me, as does the member name. This is very neat.. the only thing I didn't like was the trailing slash, but I'll just get used to it!

@Amy: Could it be something with your mod_rewrite?

KTBleeding 07-20-2005 03:08 AM

Pretty cool mod..

I did notice a problem though. If a user has a "." in their name, it will not work. I'm pretty sure this is an obvious error..

Would there happen to be a fix for this at all?

Kirk Y 07-20-2005 03:58 AM

I also noticed that if the user has a space in their name, it doesn't work. A %20 is added in its place... and won't work.


All times are GMT. The time now is 11:39 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.01003 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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