SMFHacks.com

Badge Awards => Support => Topic started by: FrizzleFried on June 25, 2012, 12:46:27 pm

Title: DELETE BADGE Option Showing For Everyone
Post by: FrizzleFried on June 25, 2012, 12:46:27 pm
FYI - The DELETE BADGE option is showing for everyone... even when viewing other peoples badges.  Clicking on the delete link takes you to the ADMIN PASSWORD page...so regular members can't delete badges... but the delete link shouldn't be appearing (and the CSS looks wrong for it)

See attached...

Title: Re: DELETE BADGE Option Showing For Everyone
Post by: SMFHacks on June 25, 2012, 12:55:05 pm
Posted new version 1.0.9a to fix that issue for SMF 2.0
Title: Re: DELETE BADGE Option Showing For Everyone
Post by: FrizzleFried on June 25, 2012, 01:18:44 pm
So a guy can avoid having to re-download/re-install/re-install changes... etc...

Care to give the file name and edit to make to fix the issue by chance?

:D
Title: Re: DELETE BADGE Option Showing For Everyone
Post by: SMFHacks on June 25, 2012, 01:21:39 pm
Open themes/default/badgeawards2.template.php


Find Line 631
Code: [Select]
echo '<td><a href="' . $scripturl . '?action=admin;area=badgeawards;sa=delmembadge&id=' . $row['id_log'] . '">' . $txt['badge_delete'] . '</a></td>';
Change to
Code: [Select]
if ($user_info['is_admin'])
 echo '<td><a href="' . $scripturl . '?action=admin;area=badgeawards;sa=delmembadge&id=' . $row['id_log'] . '">' . $txt['badge_delete'] . '</a></td>';
Title: Re: DELETE BADGE Option Showing For Everyone
Post by: FrizzleFried on June 25, 2012, 01:58:47 pm
Fixed... thank you.