Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 221
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 213
Total: 214

Author Topic: Few Issues  (Read 12150 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: 16452
    • 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: 16452
    • 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: 16452
    • 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: 16452
    • 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: 16452
    • 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: 16452
    • 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: 16452
    • 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
3436 Views
Last post March 05, 2017, 08:40:49 pm
by SMFHacks
6 Replies
4997 Views
Last post November 03, 2018, 12:00:12 am
by SMFHacks
8 Replies
3938 Views
Last post November 06, 2019, 09:58:33 pm
by SMFHacks
6 Replies
1141 Views
Last post May 12, 2022, 11:50:04 am
by PapaFrizArcade
1 Replies
1147 Views
Last post May 30, 2022, 06:24:03 pm
by SMFHacks

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal