• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
TPU: Users can view their own warnings

TPU: Users can view their own warnings 1.0.1

No permission to download

RoldanLT

Well-known member
#5
I just check the user group permissions and this addon is the same as enabling the option below, so without this addon viewing warning still works.

By the way, this option should be check / set to allow also for this to work.

upload_2013-11-24_20-33-45.png
 

Chris D

XenForo developer
Staff member
#6
If you enabled that permission for your registered members, you would be allowing all your registered members to be able to see all of your other members warnings.

This add-on allows people to see their OWN warnings only.
 

RoldanLT

Well-known member
#7
If you enabled that permission for your registered members, you would be allowing all your registered members to be able to see all of your other members warnings.

This add-on allows people to see their OWN warnings only.
Yes I get it now, but if the permission is not set to allow, clicking on the "view" link on the right side will give the user a permission error.
 

W1zzard

Well-known member
#8
Yes I get it now, but if the permission is not set to allow, clicking on the "view" link on the right side will give the user a permission error.
Yes, the addon just lets them view the table (where the "View" links are located on the right) .

Do you think it's important for users to be able to access the warning details?
 

RoldanLT

Well-known member
#9
Yes, the addon just lets them view the table (where the "View" links are located on the right) .

Do you think it's important for users to be able to access the warning details?
No, but it's better if that link is hidden for normal members as it is not working for them.
 

DeltaHF

Well-known member
#10
Thanks, @W1zzard! This is an essential add-on and should be part of the XF core. I'm not sure how much you want to expand this, but I think it would be great if a link to the profile tab (i.e. "Warnings Received") appeared in the "Your Account" section on the account page, as that's probably where most members will go looking for it.

@RoldanLT You can hide the "View" link to regular users by editing the member_warnings template and wrapping the relevant column in template conditionals, like below. This will ensure that only moderators see the link.

HTML:
<xen:if is="{$visitor.is_moderator}">
  <th class="warningView">&nbsp;</th>
</xen:if>
HTML:
<xen:if is="{$visitor.is_moderator}">
  <td class="warningView dataOptions"><a href="{xen:link warnings, $warning}" class="OverlayTrigger secondaryContent">{xen:phrase view}</a></td>
</xen:if>
 

DeltaHF

Well-known member
#15
Working great here, thanks for the super-fast update, W1zzard.

@WirralTalk I think you read that wrong. "if warning count > 0" means "if the number of warnings is received is greater than 0", so a user won't see any of the warning information if they don't actually have any warnings.
 

imthebest

Well-known member
#20
No error message but it's just not working. Do I need to set a specific usergroup permission or something like that so members can see the "Warnings" tab on their profile? Because at least out of the box this isn't working.