TinyPortal

Development => Support => Topic started by: Skb on November 28, 2017, 12:32:03 PM

Title: Remove TP Button from Profile
Post by: Skb on November 28, 2017, 12:32:03 PM
I've tried the tricks mentioned here
https://www.tinyportal.net/index.php?topic=34947.msg280449#msg280449
but came up blank.
Any help on this please ?
Title: Re: Remove TP Button from Profile
Post by: Skhilled on November 28, 2017, 03:22:36 PM
I'm no coder but have done a quick check and "TP_fetchprofile_areas" and "TP_fetchprofile_areas2" are still in use. Perhaps, whatever file that currently calls those functions may lead to a fix.
Title: Re: Remove TP Button from Profile
Post by: lurkalot on December 02, 2017, 10:22:03 AM
Quote from: Skb on November 28, 2017, 12:32:03 PM
I've tried the tricks mentioned here
https://www.tinyportal.net/index.php?topic=34947.msg280449#msg280449
but came up blank.
Any help on this please ?

Take a look in /sources/TPassimilate.php

Comment out this code, (Make backup first, just in case).


function tpAddProfileMenu(&$profile_areas)
{
global $txt;

$profile_areas['tp'] = array(
'title' => 'Tinyportal',
'areas' => array(),
);

$profile_areas['tp']['areas']['tpsummary'] = array(
'label' => $txt['tpsummary'],
'file' => 'TPmodules.php',
'function' => 'tp_summary',
'permission' => array(
'own' => 'profile_view_own',
'any' => 'profile_view_any',
),
);

$profile_areas['tp']['areas']['tparticles'] = array(
'label' => $txt['articlesprofile'],
'file' => 'TPmodules.php',
'function' => 'tp_articles',
'permission' => array(
'own' => 'profile_view_own',
'any' => 'profile_view_any',
),
'subsections' => array(
'articles' => array($txt['tp-articles'], array('profile_view_own', 'profile_view_any')),
'settings' => array($txt['tp-settings'], array('profile_view_own', 'profile_view_any')),
),
);

$profile_areas['tp']['areas']['tpdownload'] = array(
'label' => $txt['downloadprofile'],
'file' => 'TPmodules.php',
'function' => 'tp_download',
'permission' => array(
'own' => 'profile_view_own',
'any' => 'profile_view_any',
),
);

$profile_areas['tp']['areas']['tpshoutbox'] = array(
'label' => $txt['shoutboxprofile'],
'file' => 'TPmodules.php',
'function' => 'tp_shoutb',
'permission' => array(
'own' => 'profile_view_own',
'any' => 'profile_view_any',
),
);
}
Title: Re: Remove TP Button from Profile
Post by: Skb on December 02, 2017, 11:12:58 AM
Thanks Mickey Bro. That worked.
Title: Re: Remove TP Button from Profile
Post by: lurkalot on December 02, 2017, 11:36:23 AM
Quote from: Skb on December 02, 2017, 11:12:58 AM
Thanks Mickey Bro. That worked.

You're welcome.  Apologies for the delay.  ;)

Strangely enough there was the same question asked in the support thread, here today, https://www.simplemachines.org/community/index.php?topic=27642.msg3950365#msg3950365
Title: Re: Remove TP Button from Profile
Post by: Skb on December 02, 2017, 04:32:30 PM
I had asked him. He was trying to help me out. I have informed him of the correct measure.

Apologies if this has created any issues.
Title: Re: Remove TP Button from Profile
Post by: lurkalot on December 02, 2017, 04:42:19 PM
Quote from: Skb on December 02, 2017, 04:32:30 PM
I had asked him. He was trying to help me out. I have informed him of the correct measure.

Apologies if this has created any issues.

Skb, I did wonder if that was the case, either way it's not a problem.  O0