Link to the mod (https://custom.simplemachines.org/index.php?mod=4274)
✓ Best Answer
(https://img.shields.io/github/release/SychO9/smf-best-answer.svg?style=flat-square) (https://img.shields.io/badge/SMF-2.1-blue.svg?style=flat-square&color=ed6033) (https://img.shields.io/badge/license-MIT-green.svg?style=flat-square&color=green) (https://img.shields.io/badge/donate-buy%20me%20a%20coffee-%23ffde39?style=flat-square) (https://www.buymeacoffee.com/sycho)
SMF2.1 mod to mark a reply as best answer.
Requires PHP7.3+
(https://user-images.githubusercontent.com/20267363/96333331-2004f500-1061-11eb-8018-7e07af4427a3.png)
Installation
Download the latest release package and upload in the package manager of your forum.
Updating
Delete the mod and install a new release package.
License
The MIT License.
Suggestion: put a PHP version test inside database.php and don't allow it to install if PHP 7.2 or lower is present.
Good call
Very nice lookin mod. Would be good on SMFH.
Very nice mod but I have issues. I don't have the button to mark best answer and also I have these errors in admin panel which suddenly have raised for 2000 in a couple of minutes on 2.1RC3:
FIRST ERROR:
Type of error: Undefined
8: Undefined index: id_best_msg
/home/XXXX/public_html/Sources/BestAnswer/Actions.php (Line 43)
SECOND ERROR:
Type of error: Undefined
8: Undefined index: id_board
/home/XXXX/public_html/Sources/BestAnswer/Policy.php (Line 36)
Have you made any custom modifications to the source code ?
What mods do you have installed ?
What's your php version ?
No, I have only changed the css, using the main theme but with different colors changed by myself.
This is the php ver.
(https://i.postimg.cc/PxJZbC8n/Screenshot-194.jpg)
so no other mods ?
Sorry, here is the list:
Optimus 2.9 [04.06.20]
Scrolling Buttons 0.6
Login Menu Button 1.0
BBC Message Boxes 1.0
Light Portal 1.2
Social Login 4.0.0
Login Security 1.0.4
SMF Post Prefix 3.2.1
FA Board Icons 1.3
Avatars Display Integration 1.2
Quick Spoiler 1.2.6
Welcome Topic Mod
Simple Audio Video Embedder 5.1.4
Forum Width Setting 1.2
Personalized BBC 1.94.1
Auto Twitter Embed 2.0
Thank you, I am assuming one of those mods is perhaps overwriting a certain array given to a hook instead of mutating it, resulting in the errors mentioned. I will have to take a look in each and everyone of them, so for now just uninstall this mod.
Or maybe it has nothing to do with other mods and it's just a specific scenario where this mod fails. Either way I'll have to investigate it.
@pocttopus please try the 0.1.3 package, I think the issue was with the mod not properly appending to the array, conflicting with other mods.
It Works!
Thanks @Sycho.
This is awesome. ;)
Now it's updated to 0.1.5?
What's new @SychO? O:)
You can always checkout the changelog here: https://github.com/SychO9/smf-best-answer/releases
I guess I will re-install it, lol. I just finished doing that like 5 minutes ago. :)
Great idea for a mod!
Getting an error:
Trying to access array offset on value of type null
what line of what file ?
Line 28 of BestAnswer.template.php
Should be fixed in the new 0.1.6 package, please test :)
I will do that now, thank you sir.
That's got it. Thanks for the quick response. :)
Awesome, thank you :)
I have an issue with this mod again. I tried to mark a post as best answer, but when I do it gives me a white page....no errors at all in the logs. If I uninstall the mod the white page goes away and the topic behaves normal. I have edited the css on the site but I do not think that would effect it.
Is there nothing on your server error log ? What php version are you using ? Can you post a link to the topic ?
Cool mod, if I may suggest, the mod description could be a bit more descriptive though. For a while there, I was wondering how this actually functions, permissions and all -
Simple to set up, if you know how, but takes a minute to figure out if you just randomly happened across this package like me :P
The board settings are easy, as the install redirects to them - but after that, there's no indication that there's a permission setting added too ;)
Quote from: SychO on November 15, 2020, 02:44:22 AM
Is there nothing on your server error log ? What php version are you using ? Can you post a link to the topic ?
No errors anywhere. I will check cpanel after I re-install it. I was going through old topics and trying to pick the answer to some of them. I got a few marked as best answer but when I tried one of them it went to a white screen. I will check again here soon.
seems like certain topics with specific criteria fail, I can't think of why since I haven't been able to reproduce this.
Quote from: Aleksi "Lex" Kilpinen on November 15, 2020, 03:27:55 AM
Cool mod, if I may suggest, the mod description could be a bit more descriptive though. For a while there, I was wondering how this actually functions, permissions and all -
Simple to set up, if you know how, but takes a minute to figure out if you just randomly happened across this package like me :P
The board settings are easy, as the install redirects to them - but after that, there's no indication that there's a permission setting added too ;)
Yea could use improvement.
Quote from: SychO on November 15, 2020, 09:22:34 AM
seems like certain topics with specific criteria fail, I can't think of why since I haven't been able to reproduce this.
I have no idea what was in that topic. If I find it again maybe it'll shed some light on the matter. I'll see in a bit. I have to go out soon.
Any love for a 2.0 version?
Quote from: SilverKnight on December 31, 2020, 01:45:21 AM
Any love for a 2.0 version?
Certainly not from me.
But you can try this one, which seems to be compatible with 2.0 (have never tested it myself though): https://custom.simplemachines.org/mods/index.php?mod=3803
SychO,
It's nice that you created such a mod. :)
Let 2.1 finally be released. 8)
Any chance of a 2.0 version?
I already answered that question
Hi,
Thanks
@SychO Turkish translation.
@SychO Can you tell me where I can find these two settings? I don't see them in Permissions.
$txt['permissionname_mark_best_answer_any'] = 'Own topics';
$txt['permissionname_mark_best_answer_own'] = 'Any topics';
Go to either membergroup permissions or board permissions. Select a membergroup and it should be the fourth from the bottom:
Screenshot 2022-10-23 at 05-33-17 Modify Group.png
@Steve I ask because I translated this mod into my language and I don't see those two words right there in the permissions.
I see what you mean.
I believe they were added just for good measure in case the permission ever describes just 'any', or just 'own'. But that's on SMF.
Thanks for the clarification.
The attachment link is not working.
At the moment it shows an invalid attachment id error.
Was this MOD removed?
2025-03-16 21_17_55-Customization Site — Mozilla Firefox.png
https://github.com/SychO9/smf-best-answer/releases