Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4239
Latest: 3dickulus
New This Month: 4
New This Week: 1
New Today: 0
Stats
Total Posts: 43126
Total Topics: 7500
Most Online Today: 83
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 29
Total: 29

Author Topic: Few Issues  (Read 11202 times)

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Few Issues
« on: June 02, 2012, 05:12:53 pm »
Hello again,

Issue 1

I have a mod that automatically gives new users a "default avatar".

http://custom.simplemachines.org/mods/index.php?mod=975

As a result, all new members are automatically earning the "Avatar Award". How could I prevent these new users from getting this award if they haven't actually changed their default avatar?

Issue 2

When brand new members make a post (not a new topic), they are earning the "Topic Starter" award for some reason. Is this supposed to happen? How do I correct it?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16378
    • View Profile
Re: Few Issues
« Reply #1 on: June 02, 2012, 05:34:36 pm »
New update posted
For #1
You would have to add a check to avatar badge check in
Sources/badgawards.php if the avatar equals the default avatar then ignore the award

Code: [Select]

$badgeAction = 'avatar';
if ($memberContext[$memberID]['avatar']['image'] != '' && !in_array($badgeAction,$currentBadges))
{
$badgeID = GetBadgeIDByAction($badgeAction);
AddBadgeToMember($memberID,$badgeID,false);
$currentBadges[] = $badgeAction;
$newBadges[]  = $badgeAction;

}
I put what I think may work in comments around that block in the update.


#2. Fixed in latest update
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Few Issues
« Reply #2 on: June 02, 2012, 05:59:33 pm »
New update posted
For #1
You would have to add a check to avatar badge check in
Sources/badgawards.php if the avatar equals the default avatar then ignore the award

Code: [Select]

$badgeAction = 'avatar';
if ($memberContext[$memberID]['avatar']['image'] != '' && !in_array($badgeAction,$currentBadges))
{
$badgeID = GetBadgeIDByAction($badgeAction);
AddBadgeToMember($memberID,$badgeID,false);
$currentBadges[] = $badgeAction;
$newBadges[]  = $badgeAction;

}
I put what I think may work in comments around that block in the update.

How would I do it? All members start with http://biology-forums.com/avatars/Default_Avatar.png as their default avatar.

Also, where do I download the latest update? All I see is Presales under Badge Awards

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16378
    • View Profile
Re: Few Issues
« Reply #3 on: June 02, 2012, 06:00:31 pm »
Enter your license key under
http://www.smfhacks.com/index.php?action=license
And that should give you access to the badges downloads forum.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Few Issues
« Reply #4 on: June 02, 2012, 06:07:57 pm »
Enter your license key under
http://www.smfhacks.com/index.php?action=license
And that should give you access to the badges downloads forum.

Did so already, as you can tell, my website is in showcase :) Just not showing.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16378
    • View Profile
Re: Few Issues
« Reply #5 on: June 02, 2012, 06:16:31 pm »
Enter your license key under
http://www.smfhacks.com/index.php?action=license
And that should give you access to the badges downloads forum.

Did so already, as you can tell, my website is in showcase :) Just not showing.
Fixed added you to the Badge Awards custom group try to the downloads forums again.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Few Issues
« Reply #6 on: June 02, 2012, 06:35:38 pm »
New update posted
For #1
You would have to add a check to avatar badge check in
Sources/badgawards.php if the avatar equals the default avatar then ignore the award

Code: [Select]

$badgeAction = 'avatar';
if ($memberContext[$memberID]['avatar']['image'] != '' && !in_array($badgeAction,$currentBadges))
{
$badgeID = GetBadgeIDByAction($badgeAction);
AddBadgeToMember($memberID,$badgeID,false);
$currentBadges[] = $badgeAction;
$newBadges[]  = $badgeAction;

}
I put what I think may work in comments around that block in the update.

So, will this work?

Code: [Select]
$badgeAction = 'avatar';
if ($memberContext[$memberID]['avatar']['image'] != '' && !in_array($badgeAction,$currentBadges))
{

if  ($modSettings['attachmentDefaultavatar'] != $memberID]['avatar']['image'])
{
$badgeID = GetBadgeIDByAction($badgeAction);
AddBadgeToMember($memberID,$badgeID,false);
$currentBadges[] = $badgeAction;
$newBadges[]  = $badgeAction;
}
}

I'm assuming this checks if a default avatar is there...

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16378
    • View Profile
Re: Few Issues
« Reply #7 on: June 02, 2012, 06:37:22 pm »
Yeah hopefully untested though.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Few Issues
« Reply #8 on: June 02, 2012, 06:43:48 pm »
Yeah hopefully untested though.

When I removed the //

It didn't work, error...

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16378
    • View Profile
Re: Few Issues
« Reply #9 on: June 02, 2012, 06:48:36 pm »
Oops should be
Code: [Select]
if  ($modSettings['attachmentDefaultavatar'] != $memberContext[$memberID]['avatar']['image'])
{
$badgeID = GetBadgeIDByAction($badgeAction);
AddBadgeToMember($memberID,$badgeID,false);
$currentBadges[] = $badgeAction;
$newBadges[]  = $badgeAction;
}

Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Few Issues
« Reply #10 on: June 02, 2012, 06:50:42 pm »
Here's another issue, even after disabling the "Level x" awards, in the email sent, it still sayings you've earned the "Level 1" award. I don't think it's disabling the awards correctly.

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Few Issues
« Reply #11 on: June 02, 2012, 06:54:59 pm »
Oops should be
Code: [Select]
if  ($modSettings['attachmentDefaultavatar'] != $memberContext[$memberID]['avatar']['image'])
{
$badgeID = GetBadgeIDByAction($badgeAction);
AddBadgeToMember($memberID,$badgeID,false);
$currentBadges[] = $badgeAction;
$newBadges[]  = $badgeAction;
}


That didn't work...

Also, when brand new members make their first post, they no longer get an award...

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16378
    • View Profile
Re: Few Issues
« Reply #12 on: June 02, 2012, 06:56:10 pm »
In the pm/email or are they just be awarded to the users.
Are level awards disabled completely?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Few Issues
« Reply #13 on: June 02, 2012, 06:58:49 pm »
Quote
Are level awards disabled completely?

I disabled them from the settings in admin, unclicked enable.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16378
    • View Profile
Re: Few Issues
« Reply #14 on: June 02, 2012, 07:15:17 pm »
Just posted update to fix the enabled issue. Changes were just to the badgeawards.php file.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
Newsletter Pro email issues

Started by guest3817 Support

2 Replies
2639 Views
Last post March 05, 2017, 08:40:49 pm
by SMFHacks
6 Replies
4171 Views
Last post November 03, 2018, 12:00:12 am
by SMFHacks
8 Replies
2723 Views
Last post November 06, 2019, 09:58:33 pm
by SMFHacks
6 Replies
843 Views
Last post May 12, 2022, 11:50:04 am
by PapaFrizArcade
1 Replies
635 Views
Last post May 30, 2022, 06:24:03 pm
by SMFHacks

+- Recent Topics

“Insert from Gallery” by apothocary
November 21, 2023, 07:25:28 am

SMFHacks Black Friday Sale 2023! by SMFHacks
November 19, 2023, 12:05:51 pm

File Count by SMFHacks
November 11, 2023, 11:46:46 am

Theme Changer by SMFHacks
November 09, 2023, 04:30:05 pm

Pretty Urls extras by SMFHacks
November 08, 2023, 05:23:14 pm

Member group access to emojis by SMFHacks
October 22, 2023, 07:24:12 am

Miscellaneous errors - don't know why by SMFHacks
October 13, 2023, 09:28:50 am

Follow / Follower Mod? by Nicole
October 06, 2023, 07:37:20 am

Mods supporting custom themes? by SMFHacks
October 02, 2023, 04:20:18 pm

Version 6.1.6 issues by SMFHacks
September 30, 2023, 07:54:52 am

Powered by EzPortal