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)

ywwz 10-29-2013 02:57 PM

SO USEFUL IT IS.

clubkeeper 03-23-2014 12:48 AM

Quote:

Originally Posted by Boofo (Post 2141195)
Either turn off visitor messages, which would make the About Me tab the default one

Sorry to bump an old thread, but how is visitor messaging turned off for the whole forum?

And is there a way to not only set a different profile tab as default, but also completely delete the activity stream tab from user profiles? I don't even want the option there.

ozzy47 03-23-2014 01:15 AM

To set a different tab as default, use this mod, [ozzy47] Default Profile Tab

To remove the Activity tab in the profiles, open the template MEMBERINFO, and find the following code:

Code:

                                                <vb:if condition="$blocks[activitystream]"><dd<vb:if condition="$selected_tab == 'activitystream' OR $selected_tab == ''"> class="userprof_module" <vb:else /> class="userprof_moduleinactive" </vb:if>><a id="activitystream-tab" href="{vb:link member, {vb:raw userinfo}, "tab=activitystream"}#activitystream" onclick="return tabViewPicker(this);">{vb:raw activity_phrase}</a></dd></vb:if>
And change it to this:

Code:

                                                <vb:comment><vb:if condition="$blocks[activitystream]"><dd<vb:if condition="$selected_tab == 'activitystream' OR $selected_tab == ''"> class="userprof_module" <vb:else /> class="userprof_moduleinactive" </vb:if>><a id="activitystream-tab" href="{vb:link member, {vb:raw userinfo}, "tab=activitystream"}#activitystream" onclick="return tabViewPicker(this);">{vb:raw activity_phrase}</a></dd></vb:if></vb:comment>

clubkeeper 03-23-2014 04:41 PM

Quote:

Originally Posted by ozzy47 (Post 2489026)
To set a different tab as default, use this mod, [ozzy47] Default Profile Tab

To remove the Activity tab in the profiles, open the template MEMBERINFO, and find the following code:

Code:

                                                <vb:if condition="$blocks[activitystream]"><dd<vb:if condition="$selected_tab == 'activitystream' OR $selected_tab == ''"> class="userprof_module" <vb:else /> class="userprof_moduleinactive" </vb:if>><a id="activitystream-tab" href="{vb:link member, {vb:raw userinfo}, "tab=activitystream"}#activitystream" onclick="return tabViewPicker(this);">{vb:raw activity_phrase}</a></dd></vb:if>
And change it to this:

Code:

                                                <vb:comment><vb:if condition="$blocks[activitystream]"><dd<vb:if condition="$selected_tab == 'activitystream' OR $selected_tab == ''"> class="userprof_module" <vb:else /> class="userprof_moduleinactive" </vb:if>><a id="activitystream-tab" href="{vb:link member, {vb:raw userinfo}, "tab=activitystream"}#activitystream" onclick="return tabViewPicker(this);">{vb:raw activity_phrase}</a></dd></vb:if></vb:comment>

Thank you ozzy47!! This code removed the activity stream from user profiles entirely and your plug-in allowed me to set the default tab to About Me. Perfect!

Thanks again,
clubkeeper

ozzy47 03-23-2014 04:48 PM

Not a problem, glad to help. :)

WxP 10-09-2014 01:12 PM

Quote:

Originally Posted by Andreas (Post 2141223)
Try the following Plug-in code on Hook member_build_blocks_start

PHP Code:

if (!$vbulletin->GPC_exists['tab'])
{
    
$vbulletin->GPC['tab'] = 'aboutme';



i have more of 2 member_build_blocks_start...

BirdOPrey5 10-09-2014 02:37 PM

Quote:

Originally Posted by WxP (Post 2518246)
i have more of 2 member_build_blocks_start...

Create a new plugin on that hook.

ozzy47 10-09-2014 05:28 PM

Or use this mod, https://vborg.vbsupport.ru/showthread.php?t=302655

thetechgenius 10-10-2014 10:50 PM

There is a small mini mod for this. Search the Addons, its there somewhere, I installed it on my forum, and it works great. I just don't have the exact vb.org addon url. Sorry. But there is a mod for this exact purpose.

ozzy47 10-10-2014 10:54 PM

Quote:

Originally Posted by thetechgenius (Post 2518426)
There is a small mini mod for this. Search the Addons, its there somewhere, I installed it on my forum, and it works great. I just don't have the exact vb.org addon url. Sorry. But there is a mod for this exact purpose.

Yeah I posted the link above your post. :P

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:

ozzy47 12-28-2014 06:46 PM

Not a problem, glad to help. :)

thetechgenius 12-30-2014 03:12 PM

There is an Addon for this. I have it installed on my vB forum.

ozzy47 12-30-2014 03:24 PM

Yeah I mentioned that in post #48

Max Taxable 12-07-2015 01:32 AM

Very handy, still works.


All times are GMT. The time now is 05:02 PM.

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.01391 seconds
  • Memory Usage 1,785KB
  • 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_code_printable
  • (5)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)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