TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 07:16:31 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 113
  • Total: 113

Remove TP Button from Profile

Started by Skb, November 28, 2017, 12:32:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Skb


SMF 2.1 RC4 (default theme) / TP 2.1.0

Skhilled

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.

lurkalot

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',
),
);
}

Skb


SMF 2.1 RC4 (default theme) / TP 2.1.0

lurkalot

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

Skb

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.

SMF 2.1 RC4 (default theme) / TP 2.1.0

lurkalot

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