Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4220
Latest: agolac
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 42854
Total Topics: 7464
Most Online Today: 46
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 45
Total: 45

Author Topic: Few Issues  (Read 10690 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: 16257
    • 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: 16257
    • 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: 16257
    • 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: 16257
    • 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: 16257
    • 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: 16257
    • 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: 16257
    • 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
2420 Views
Last post March 05, 2017, 08:40:49 pm
by SMFHacks
6 Replies
3756 Views
Last post November 03, 2018, 12:00:12 am
by SMFHacks
8 Replies
2346 Views
Last post November 06, 2019, 09:58:33 pm
by SMFHacks
6 Replies
589 Views
Last post May 12, 2022, 11:50:04 am
by PapaFrizArcade
1 Replies
353 Views
Last post May 30, 2022, 06:24:03 pm
by SMFHacks

+- Recent Topics

Is the PayPal Sandbox still working? by Nicole
June 02, 2023, 06:51:18 am

Question on Completed Listing & Reserve Price by Nicole
June 01, 2023, 06:06:12 pm

[Mod]GDPR Helper by Nicole
May 29, 2023, 11:58:49 pm

RSS Feed Poster Database Error by SMFHacks
May 22, 2023, 06:26:18 pm

Errors With Older Version. by Ken.
May 09, 2023, 05:35:40 pm

Pretty Urls SEO Pro by SMFHacks
May 06, 2023, 03:30:11 pm

New Post Image Upload Error by Mike66
April 28, 2023, 07:30:28 am

Copyright Removal Key by SMFHacks
April 03, 2023, 02:44:28 pm

Converting from Aeva Media by sudhakar
April 02, 2023, 11:09:54 am

Using SMF's Built-in Search Algorithm by shuban
March 27, 2023, 09:15:10 am

Powered by EzPortal