News:

Wondering if this will always be free?  See why free is better.

Main Menu

Post count disabled, yet showing in PMs

Started by Brtt, July 20, 2012, 11:34:45 AM

Previous topic - Next topic

Brtt

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 ?

Brtt

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;
}

Brtt

So, is that post count disabling tool the new Fight Club ?

You know, "You do NOT talk about the Post Count"... ^^

kat

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. :)

NanoSector

Weird though, as the if K@ posted indicates that the field should be hidden when the post count is disabled...
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

kat

Weird, innit?

I've flagged this up, in Bug Reports, to see if anyone has anything to go about. ;)

NanoSector

Yeah, it gives the reverse effect... It indicates that the disable switch is not set, while it is...
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

kat


Brtt

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 ?

NanoSector

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.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Brtt

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 !

kat

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();

Advertisement: