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: 344
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 221
Total: 221

Author Topic: Couple of questions  (Read 9464 times)

0 Members and 1 Guest are viewing this topic.

Offline Garth

  • Member
  • *
  • Posts: 14
    • View Profile
Couple of questions
« on: September 10, 2012, 10:25:40 am »
Hi, this looks like a cool mod, just have a couple of noob questions before I buy!

1. Can you create an award given only when members reply to a specific topic?
2. My forum has close to 6000 members - if I activate awards that are based on post counts for instance, will all the relevant awards be given retroactively, and how server intensive would running this mod on a forum that size be?

Cheers!
« Last Edit: September 10, 2012, 10:43:58 am by Garth »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Couple of questions
« Reply #1 on: September 10, 2012, 11:51:38 am »
1. Nothing built in but I could help write a custom badge for you if you reply to that topic it would award a specific badge.

2. Yes we have the system setup on install auto rebadges members. It does it chunks I believe 50 members at a time so it doesn't use up a lot of resources.
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 Garth

  • Member
  • *
  • Posts: 14
    • View Profile
Re: Couple of questions
« Reply #2 on: September 13, 2012, 08:32:30 am »
Sold! ;D

Offline Garth

  • Member
  • *
  • Posts: 14
    • View Profile
Re: Couple of questions
« Reply #3 on: September 13, 2012, 03:22:22 pm »
Mod installed, could do with assistance with the specific topic badge - cheers! :)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Couple of questions
« Reply #4 on: September 13, 2012, 08:41:06 pm »
This code assumes SMF 2.0 and will award badges to any member that posts in that topic

Requires you to create a custom badge in the add badge area with the action called topicbadge7079


Open Sources/Subs-Post.php

Find
Code: [Select]
// They've posted, so they can make the view count go up one if they really want. (this is to keep views >= replies...)

Add after
Code: [Select]
// Badge Awards
global $sourcedir, $modSettings;
if (!empty($modSettings['badgeawards_enable']))
{

global $sourcedir;
require_once($sourcedir . '/badgeawards2.php');
if ($topicOptions['id'] == 7079)
{

Badges_AwardBadge($posterOptions['id'],'topicbadge7079');
}

}
// End Badge Awards
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 Garth

  • Member
  • *
  • Posts: 14
    • View Profile
Re: Couple of questions
« Reply #5 on: September 13, 2012, 09:32:39 pm »
That works just great, many thanks! ;D

Offline Garth

  • Member
  • *
  • Posts: 14
    • View Profile
Re: Couple of questions
« Reply #6 on: September 14, 2012, 07:34:07 pm »
Would any problems occur if I add a bunch of elseif statements to this custom badge so I can check for multiple topic ids and award a different badge for each one?

Like this:
Code: [Select]
// Badge Awards
global $sourcedir, $modSettings;
if (!empty($modSettings['badgeawards_enable']))
{

global $sourcedir;
require_once($sourcedir . '/badgeawards2.php');
if ($topicOptions['id'] == 7079)
{

Badges_AwardBadge($posterOptions['id'],'topicbadge7079');
}

elseif ($topicOptions['id'] == 9000)
{

Badges_AwardBadge($posterOptions['id'],'topicbadge9000');
}

elseif ($topicOptions['id'] == 9500)
{

Badges_AwardBadge($posterOptions['id'],'topicbadge9500');
}

elseif ($topicOptions['id'] == 9900)
{

Badges_AwardBadge($posterOptions['id'],'topicbadge9900');
}

}
// End Badge Awards

But with a lot more elseifs?

I expect there's a better way of doing that but I'm a bit of a noob!
« Last Edit: September 14, 2012, 07:49:03 pm by Garth »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Couple of questions
« Reply #7 on: September 14, 2012, 07:51:15 pm »
That will work fine!
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 Garth

  • Member
  • *
  • Posts: 14
    • View Profile
Re: Couple of questions
« Reply #8 on: September 14, 2012, 08:08:50 pm »
If I add about 50 of those would it still be OK or would it bog down the forum? Sorry for all the questions, I really appreciate your excellent support ;D

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Couple of questions
« Reply #9 on: September 14, 2012, 08:10:21 pm »
It would be ok since it only checks if that topic matches
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 Garth

  • Member
  • *
  • Posts: 14
    • View Profile
Re: Couple of questions
« Reply #10 on: September 14, 2012, 08:28:55 pm »
Awesome, thanks so much!

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
9893 Views
Last post September 02, 2007, 11:44:21 pm
by smalldonkey
0 Replies
3926 Views
Last post May 07, 2008, 11:12:59 am
by MrFurious
1 Replies
5361 Views
Last post April 26, 2011, 10:02:09 am
by SMFHacks
9 Replies
7690 Views
Last post June 04, 2013, 11:23:57 am
by amwebby
1 Replies
1751 Views
Last post October 30, 2018, 06:53:23 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