vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   a href="member.php? u= $bbuserinfo[userid] (https://vborg.vbsupport.ru/showthread.php?t=174077)

yinyang 03-24-2008 11:25 PM

a href="member.php? u= $bbuserinfo[userid]
 
Any help or pointing in a certain direction is greatly appreciated.

I would like to load the member.php file as my homepage. I was thinking of copying the member.php page and renaming it to index.php.

However, I can't get my personal profile to pull up automatically for me. What I would like is to have everyone's own profile page pull up as their home page and then build around that.

The problem i'm having is fetching the page automatically. in vb3.7, you can click to yoru profile by doing this:
PHP Code:

 <a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]

However, i've tried to cut and paste this into the address bar and obviously, it doesn't work. Does anyone know how to bring up this page as a default or if need be, to automatically redirect to this page?

Please help. Thanks!

GameWizard 03-25-2008 05:25 AM

[s]probably using .htaccess redirect.[/s]

The simplest way is using a javascript redirect. Replace the contents of the FORUMHOME template with this:

Code:

<script type="text/javascript">
<!--
window.location = "member.php?$session[sessionurl]u=$bbuserinfo[userid]"
//-->
</script>


Opserty 03-25-2008 10:41 AM

Or.... create a Plugin hooked to the member.php file that automatically detects the UserID (if the person is logged in) and uses that as the variable. i.e.:
PHP Code:

if($vbulletin->userinfo['userid'])
{
    
$_GET['u'] = $vbulletin->userinfo['userid'];


Or something like that. Remember to cater for guests if necessary.

yinyang 03-25-2008 02:35 PM

Thank you GameWizard and Opserty. I really appreciate you taking the time out. I will try both out!

--------------- Added [DATE]1206459379[/DATE] at [TIME]1206459379[/TIME] ---------------

Quote:

Originally Posted by GameWizard (Post 1473924)
[s]probably using .htaccess redirect.[/s]

The simplest way is using a javascript redirect. Replace the contents of the FORUMHOME template with this:

Code:

<script type="text/javascript">
<!--
window.location = "member.php?$session[sessionurl]u=$bbuserinfo[userid]"
//-->
</script>


Quote:

Originally Posted by Opserty (Post 1474058)
Or.... create a Plugin hooked to the member.php file that automatically detects the UserID (if the person is logged in) and uses that as the variable. i.e.:
PHP Code:

if($vbulletin->userinfo['userid'])
{
    
$_GET['u'] = $vbulletin->userinfo['userid'];


Or something like that. Remember to cater for guests if necessary.

Thank you GameWizard and Opserty. I really appreciate you taking the time out. I will try both out!


All times are GMT. The time now is 10:08 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.01129 seconds
  • Memory Usage 1,730KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete