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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 515
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 508
  • Total: 508

remove TP option from profile

Started by dbailey, April 07, 2010, 01:50:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dbailey

How can I remove the Tinyportal option from the member profile menu please? I don't want my members to have access to this.

Cheers
Duane

IchBin

It's not a setting that you can turn off. The only way to make it go away off the top of my head would be to change the function. This would remove it from ALL profiles though.

In Sources/TPmodules.php at about line 1190 right before the ending } bracket for the tp_getprofileareas() function, you can unset the $data array by putting in this code:

unset($data['tp']['areas']);


That should do it I think.

stormlrd

#2
Quote from: IchBinâ„¢ on April 07, 2010, 04:29:44 PM
It's not a setting that you can turn off. The only way to make it go away off the top of my head would be to change the function. This would remove it from ALL profiles though.

In Sources/TPmodules.php at about line 1190 right before the ending } bracket for the tp_getprofileareas() function, you can unset the $data array by putting in this code:

unset($data['tp']['areas']);


That should do it I think.

Ich remember each theme works like SMF default, if the template file is not present in the theme it will default back to the default theme template files.

So if they want a specific theme not to show something they would load the template file into that theme and go into that file and simply blank the inside of the display functions.

Edit i thought this was that theme specific one, but the same principle applies but in this case goto default theme template file and instead of blanking it i'd just comment it out so you dont lose it in case you change your mind lol.


IchBin

But the files I referenced is not a template file. It's a TP Source file. This modification can't be done per theme AFAIK.

stormlrd

#4
Bro are you sure?

Now you got me thinking lol, i will have to try this out to see what happens, you know me hard headed lmao

okay what ive done just removes the summary not the link in the profile menu. I was hoping he wouldnt have to mess with the source files

with the way smf 2.0 is setup we should just be able to remove it from the profile menu shouldnt we?

IchBin

Yes, any file in the Sources/ directory is not theme dependent. Bloc uses the functions in the TPmodules.php file to add to the $context['profiles_areas'] array if I remember right. The Profile template automatically generates the menu's by output that array. So it's not something you can do in a template file to my knowledge.

stormlrd

Quote from: IchBinâ„¢ on April 07, 2010, 05:34:56 PM
Yes, any file in the Sources/ directory is not theme dependent. Bloc uses the functions in the TPmodules.php file to add to the $context['profiles_areas'] array if I remember right. The Profile template automatically generates the menu's by output that array. So it's not something you can do in a template file to my knowledge.

Gotcha, its pulling it from the menu and that array defines the menu, the way its laidout after is in the template

This website is proudly hosted on Crocweb Cloud Website Hosting.