Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

User information not always showing in posts.

Aloittaja khamseen, marraskuu 18, 2008, 08:32:27 IP

« edellinen - seuraava »

khamseen

Just upgraded to SMF 2.0 Beta 4 and I've noticed quite a lot of my members don't have all their information shown on their posts. Things like Rep Bar and Location, PM buttons etc are missing all they have is their Email button.

I've attached a screenshot of a member who does have it showing and a member who doesn't so you can better see what it is.
"In hope we find despair and in despair we find truth." - Myself

Oldiesmann

Are you sure the second post isn't from a guest or a user who deleted their account? That's the only time you'd just see an email link with no profile or IM links...
Michael Eshom
Christian Metal Fans

khamseen

Nope it's registered members that it's doing it with.
"In hope we find despair and in despair we find truth." - Myself

Nathaniel

Odd, can you please post your '/Themes/{themename}/Display.template.php' file as an attachment? So that we can have look at it.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

khamseen

I think we've narrowed it down to the Mood Bobel system causing it. We've found that if people have a mood set, then it displays all info alright, but if they don't it's acting like they are a guest and only displaying their Username, Membergroup and an email link.

I've included two attatchments, one "b4mddisplay.template.php" which is the file as it is causing the problem.

The second file "display.template.php" is a file I've been playing with to try and sort the problem. In this file I've moved the bobel display to be the last thing displayed on a post. Now it displays peoples info all the time, but if they don't have a mood set it still displays a second email button acting like they are a guest.

I am hopeful you will be able to see how to get around this problem. The creator of the mod told me to add a } to the end of the mood display coding, but when I do that I get a Syntax error with unexpected T_elseif (I think that was the error I got).

If you search "mood" in the php file it takes you straight to the area that I think is causing the problem.
"In hope we find despair and in despair we find truth." - Myself

Antechinus

Try this file.

By the way, I hate mood bobels.  :D

khamseen

Hey that works brilliantly, thanks very much indeed.

Also, I'm not a great fan of them myself but they add a bit of colour and the members like them ;D
"In hope we find despair and in despair we find truth." - Myself

khamseen

I really hate to bump topics but this is directly related to this so it seemed more practical than having to explain all the problems again.

I have changed from using the Reputation system to the Karma Description Mod and because of the modifications to the display.template for my theme I am unable to get things to display correctly.

When I try to remove the Reputation system from display and replace it with the standard Karma it crashes the forums when people try to look at threads. Could someone please help me with my display.template file?

The file I've attached has the reputation code:


// Is karma display enabled?
if ($modSettings['karmaMode'] != '0'){
echo '
<li class="margintop">', $txt['karma_power'], ': ', $message['member']['karma']['power'], '</li>
<li class="margintop repbars">
';
foreach($message['member']['karma']['bars'] as $karma_bar)
echo '<img src="', $settings['images_url'], '/karma_', $karma_bar['type'], '.gif" title="', $message['member']['name'], ' ', $karma_bar['desc'], '" alt="', $message['member']['name'], ' ', $karma_bar['desc'], '" />';
echo '
</li>';
}


And according to the file I need to replace it with the original which is:



// Is karma display enabled?  Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
<li class="margintop">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
elseif ($modSettings['karmaMode'] == '2')
echo '
<li class="margintop">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<li>
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
</li>';


When I do that though it causes the crash, I'm not very good at understanding how this works yet but I suspect it may have something to do with mine reading with <br /> instead of <li> could someone please help me with this?

Thank you in advance.
"In hope we find despair and in despair we find truth." - Myself

greyknight17

Is this issue resolved now? I'm not sure what the first part of the code you posted is for, but it looks like you have to replace the following:

// Is karma display enabled?
if ($modSettings['karmaMode'] != '0'){
echo '
<br />

', $txt['karma_power'], ': ', $message['member']['karma']['power'], '<br />
<span class="repbars">
';
foreach($message['member']['karma']['bars'] as $karma_bar)
echo '<img src="', $settings['images_url'], '/karma_', $karma_bar['type'], '.gif" title="', $message['member']['name'], ' ', $karma_bar['desc'], '" alt="', $message['member']['name'], ' ', $karma_bar['desc'], '" />';
echo '
</span>
<br />';


With the second code section that you posted.

khamseen

Hey, the problem hasn't been solved yet. The first piece of coding I put there is what is currently in my display.template and the second is what the "original" karma coding was. However when I replaced that it crashes out.

I believe what you've posted is for Reputation, which is actually what I'm trying to remove in favour of the Karma Description Mod.
"In hope we find despair and in despair we find truth." - Myself

Rumbaar

Can you try and upgrade to RC1, the one by one add the mod code to the new template files.  Are you sure all those mods are fully compatible with BETA 4, at the time?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Advertisement: