TinyPortal

Development => Support => Topic started by: raid on April 20, 2008, 08:40:36 AM

Title: TP sideblocks on Profile after wrong password check
Post by: raid on April 20, 2008, 08:40:36 AM
hi all,

I select that on profile I do not want to see tinyportal blocks, but I saw that on my forum when someone went on profile to change personal settings and added a wrong check password to apply the changes, with the error message we could see the tinyportal side blocks.


I fixed it adding this:

on sources/profile.php
Code (search for:) Select
// Execute the modifications!
function ModifyProfile2()
{
global $txt, $modSettings;
global $cookiename, $context;
global $sourcedir, $scripturl, $db_prefix;
global $ID_MEMBER, $user_info;
global $context, $newpassemail, $user_profile, $validationCode;


Code (replace with) Select
// Execute the modifications!
function ModifyProfile2()
{
global $txt, $modSettings;
global $cookiename, $context;
global $sourcedir, $scripturl, $db_prefix;
global $ID_MEMBER, $user_info;
global $context, $newpassemail, $user_profile, $validationCode;

   tp_hidebars();


it seems to work, but is it correct?
Title: Re: TP sideblocks on Profile after wrong password check
Post by: G6Cad on April 20, 2008, 03:35:17 PM
If it works for you it is correct for you ;)

But with that  tp hidebars, the tp blocks will never show for anyone in the profile section, so if thats what yolu want to have it on your site, then it's ok
Title: Re: TP sideblocks on Profile after wrong password check
Post by: raid on April 22, 2008, 03:13:03 PM
yup, but I selected the option on TP control panel Not to show side blocks in profile, they are showed on when the error happens.

is it possible to write a condition to add "hidebars" only when sidebars are hidden select on CP?

thx for support   ::)
Title: Re: TP sideblocks on Profile after wrong password check
Post by: G6Cad on April 22, 2008, 09:01:19 PM
Dont know what version of TP you have, but TP V1.0.5 should allready have that option in the TP settings to npt show the panel for this action etc etc
Title: Re: TP sideblocks on Profile after wrong password check
Post by: IchBin on April 23, 2008, 12:22:51 AM
If you're using TP 0.9,8
http://www.tinyportal.net/index.php?topic=13031.msg108852#msg108852
Title: Re: TP sideblocks on Profile after wrong password check
Post by: raid on April 23, 2008, 12:04:38 PM
well, this mod works, but I ask you, is it correct?

on sources/TPortal.php
Code (look for) Select
// for some very large forum sections, give the option to hide bars
if($context['TPortal']['hidebars_profile']=='1' && $context['TPortal']['action']=='profile')


Code (replace with) Select
// for some very large forum sections, give the option to hide bars
if(($context['TPortal']['hidebars_profile']=='1' && $context['TPortal']['action']=='profile') || ($context['TPortal']['hidebars_profile']=='1' && $context['TPortal']['action']=='profile2'))


thx for support guys   ::)

p.s.
I removed the added code on first post
Title: Re: TP sideblocks on Profile after wrong password check
Post by: IchBin on April 23, 2008, 03:05:37 PM
Wouldn't hurt to try it out?
Title: Re: TP sideblocks on Profile after wrong password check
Post by: raid on April 23, 2008, 06:21:38 PM
I am testing, it seems to work  ::)