Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4269
Latest: Gatux
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 43594
Total Topics: 7568
Most Online Today: 55
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 39
Total: 39

Author Topic: Few Issues  (Read 12940 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: 16585
    • 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: 16585
    • 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: 16585
    • 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: 16585
    • 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: 16585
    • 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: 16585
    • 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: 16585
    • 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
3594 Views
Last post March 05, 2017, 08:40:49 pm
by SMFHacks
6 Replies
5425 Views
Last post November 03, 2018, 12:00:12 am
by SMFHacks
8 Replies
4516 Views
Last post November 06, 2019, 09:58:33 pm
by SMFHacks
6 Replies
1444 Views
Last post May 12, 2022, 11:50:04 am
by PapaFrizArcade
1 Replies
1354 Views
Last post May 30, 2022, 06:24:03 pm
by SMFHacks

+- Recent Topics

December 2024 Sale! by SMFHacks
December 02, 2024, 10:30:38 pm

Denying members some admin settings by rickk
November 17, 2024, 12:02:55 pm

Weird setup by SMFHacks
November 07, 2024, 06:37:41 am

Restoring a deleted photo by Monocero
November 01, 2024, 04:23:56 am

Gallery Pro reinstalation by Lirorobert
October 14, 2024, 01:43:43 am

Move picture from main gallery to user gallery by SMFHacks
October 11, 2024, 09:11:00 pm

quoting part of message by Lirorobert
October 04, 2024, 03:21:40 pm

Does SMF Gallery support by SMFHacks
October 02, 2024, 06:14:26 am

Item count on Gallery Tab shows double by SMFHacks
September 26, 2024, 12:59:20 pm

Forum post missing when image over 4000x pixels is uploaded to gallery by Michel68
September 24, 2024, 01:37:17 pm

Powered by EzPortal