vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Show "About Me" tab in profile by default (https://vborg.vbsupport.ru/showthread.php?t=256179)

MarkFL 12-27-2014 02:34 AM

I found this thread searching for a way to set the "About Me" tab as the default tab when visiting user profiles, and so I created the plugin and it worked well on my dev site (vB 4.2.1 ), but when I implemented it on the live site (vB 4.2.2 PL2), it did not work. I found though that if I removed the conditional, and just used as the Plugin PHP code:

PHP Code:

$vbulletin->GPC['tab'] = 'aboutme'

then it works. However, I do not want to just remove the conditional:

PHP Code:

if (!$vbulletin->GPC_exists['tab']) 

without knowing what its purpose is or what problems this could cause. Could anyone shed some light on why we want the above conditional?

ozzy47 12-27-2014 02:37 AM

Disable that plugin, and see if this mod works for you, https://vborg.vbsupport.ru/showthread.php?t=302655

MarkFL 12-27-2014 03:03 AM

Quote:

Originally Posted by ozzy47 (Post 2528964)
Disable that plugin, and see if this mod works for you, https://vborg.vbsupport.ru/showthread.php?t=302655

Hello Ozzy,

First, thank you for you quick and helpful response. :cool:

It works beautifully on my dev site, but not on my live site. I looked at your plugin code, and it uses the same conditional. I would rather use your product though if I can figure out why the conditional is causing a problem, so that we can change this in the future if we want via the AdminCP without having to hack a plugin. :D

ozzy47 12-27-2014 03:07 AM

Have you tried disabling all other mods? Does the same thing happen on a unmodified default style?

MarkFL 12-27-2014 03:28 AM

Quote:

Originally Posted by ozzy47 (Post 2528968)
Have you tried disabling all other mods? Does the same thing happen on a unmodified default style?

Disabling all other mods would require the consent of the site owner, however, I have been planning to set up a dev site identical to the live site and at that time I can do what I like with it.

At your suggestion, I did just now try an unmodified default style and had the same result.

So, once I set up the new dev site, I will disable all mods, and then enable them one by one until I find the conflict. I will let you know what I find. :D

ozzy47 12-27-2014 03:29 AM

Yeah let me know how it goes, and we can proceed from there. :)

BirdOPrey5 12-28-2014 08:42 AM

Quote:

Originally Posted by MarkFL (Post 2528970)
Disabling all other mods would require the consent of the site owner, however, I have been planning to set up a dev site identical to the live site and at that time I can do what I like with it.

At your suggestion, I did just now try an unmodified default style and had the same result.

So, once I set up the new dev site, I will disable all mods, and then enable them one by one until I find the conflict. I will let you know what I find. :D

First look for any mods that might use the same hook before disabling them all. You might get lucky.

MarkFL 12-28-2014 06:29 PM

Quote:

Originally Posted by ozzy47 (Post 2528971)
Yeah let me know how it goes, and we can proceed from there. :)

I found the culprit was DB Tech's Post Thanks/Like product. Changing the execution order of your plugin in either direction seemed to have no effect.

So, I hacked your plugin code, and replaced the condition:

PHP Code:

 !$vbulletin->GPC_exists['tab'

with:

PHP Code:

 ($vbulletin->userinfo['userid'] != $userinfo['userid']) || ($vbulletin->GPC['tab'] != 'thanks'

This way if a user is visiting their own profile because of a thanks notification, the "Post Thanks/Like" tab is used, otherwise the "About Me" tab is used (or whatever tab I define in the AdminCP via your product). This gives me the desired result, but if any unforeseen problems arise because of the change I made, I will let you know.

ozzy47 12-28-2014 06:32 PM

Then it is a bug in their mod, but glad you got it sorted. :)

MarkFL 12-28-2014 06:40 PM

Quote:

Originally Posted by ozzy47 (Post 2529201)
Then it is a bug in their mod, but glad you got it sorted. :)

I can't thank your posts now, but I did want to let you know your help and your product(s) are greatly appreciated. :up:


All times are GMT. The time now is 07:33 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.01269 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
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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