Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Brtt on July 20, 2012, 11:34:45 AM

Title: Post count disabled, yet showing in PMs
Post by: Brtt on July 20, 2012, 11:34:45 AM
Hello,

My forums are on SMF 2.0.2 using a modified SquareEra theme, and Post count is disabled in APF.

It works fine just about everywhere... besides in PMs.

Is that an intended behavior ?
If not, should I go back to diving in css, or should I wait for it to get corrected ?
Title: Re: Post count disabled, yet showing in PMs
Post by: Brtt on July 23, 2012, 05:15:25 AM
I hid the text showing the postcount, but the size of the text field is still accounted for, and that creates a space.
Changing the height helps a bit, but that's sub-optimal, and it would be better to have the mod that's supposed to do it... well, do it, but properly.

Here's what I added:

.poster li.postcount
{
   color: transparent;
   height: 1px;
}
Title: Re: Post count disabled, yet showing in PMs
Post by: Brtt on July 25, 2012, 04:06:23 AM
So, is that post count disabling tool the new Fight Club ?

You know, "You do NOT talk about the Post Count"... ^^
Title: Re: Post count disabled, yet showing in PMs
Post by: kat on July 25, 2012, 06:58:44 AM
Quote from: Brtt on July 20, 2012, 11:34:45 AMIt works fine just about everywhere... besides in PMs.

How silly is that?!?!

In the deault theme's directory, you'll find a file named PersonalMessage.template.php

If you find this section of code:

// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';


and remove it (Keep a copy of the file, as a backup!), they should vanish. :)
Title: Re: Post count disabled, yet showing in PMs
Post by: NanoSector on July 25, 2012, 07:00:11 AM
Weird though, as the if K@ posted indicates that the field should be hidden when the post count is disabled...
Title: Re: Post count disabled, yet showing in PMs
Post by: kat on July 25, 2012, 07:02:18 AM
Weird, innit?

I've flagged this up, in Bug Reports, to see if anyone has anything to go (http://www.katzy.dsl.pipex.com/Smileys/scratchhd.gif) about. ;)
Title: Re: Post count disabled, yet showing in PMs
Post by: NanoSector on July 25, 2012, 07:08:34 AM
Yeah, it gives the reverse effect... It indicates that the disable switch is not set, while it is...
Title: Re: Post count disabled, yet showing in PMs
Post by: kat on July 25, 2012, 07:12:35 AM
The weirdness of code, huh? ;)
Title: Re: Post count disabled, yet showing in PMs
Post by: Brtt on July 25, 2012, 07:39:22 AM
Thanks for the answer(s).

I went on to modify that file and... it doesn't exist :/
The only php files in that theme are index.template.php and Settings.template.php, and none of them has any reference to postcount.

Fubar theme ?
Title: Re: Post count disabled, yet showing in PMs
Post by: NanoSector on July 25, 2012, 07:45:02 AM
Quote from: Brtt on July 25, 2012, 07:39:22 AM
Thanks for the answer(s).

I went on to modify that file and... it doesn't exist :/
The only php files in that theme are index.template.php and Settings.template.php, and none of them has any reference to postcount.

Fubar theme ?
Check if the file exists in the "default" directory.
Title: Re: Post count disabled, yet showing in PMs
Post by: Brtt on July 25, 2012, 08:08:01 AM
Ah yes, I misunderstood SMF default theme with the one I set as default...

The if is now commented and the post count hidden... until I still find it lurking somewhere else :]

Thanks for the help !
Title: Re: Post count disabled, yet showing in PMs
Post by: kat on July 25, 2012, 09:05:00 AM
It's a know one, apparently.

Proper fix:

Code (find in PersonalMessage.php) Select
$context['signature_enabled'] = substr($modSettings['signature_settings'], 0, 1) == 1;
Code (add after) Select
$context['disabled_fields'] = isset($modSettings['disabled_profile_fields']) ? array_flip(explode(',', $modSettings['disabled_profile_fields'])) : array();