By Net-Config on Saturday, 07 July 2018
Posted in General Issues
Replies 6
Likes 0
Views 504
Votes 0
Hi team,

As I was checking the various configuration options as a new user of EasyDiscuss, I got frustrated with the Badges and regretfully deleted them. I did that because I want to show the Badges on the front-end in a specific sort order, just as one normally can using the "ordering function" in Joomla itself.

Since "ordering" badges does not seem to be an option, I decided to delete (should have just Unpublished....arrrh) and create Badges myself so that the ID order would determine how they would show on the front-end.

I basically want Badges to follow a logical progression, such as: Badge 1 is for "posts" , B2 is for Replies, B3 is for Views, etc. In other words, a progression sequence that follows how users interact with the forum content, and not the sort order of the badges that come with the default installation.

HOWEVER, when I created the new Badges, I still cannot control the sort order on the front-end. So if I can't really control it, then I would rather have the ORIGINAL Badges back and just just a few select ones that I am most interested in, to keep it simple for users, but still have the motivator of Badges as a feature.

I had installed 4.1.2 two days ago, updated on the backend to 4.1.3, ran into the ACL Create Tag problem and fixed that by (re)installing 4.1.3 over itself.

I THOUGHT this would re-add the original Badges that I had deleted, but it did not.

Is there a way to reinstall just these Badges without recreating them from scratch manually.

Sorry for the long post, but I wanted to clear about the issue!

Thanks,
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here.

It seems like currently doesn't have a functionality to discover back those default badge in Easydiscuss.

If your existing user haven't get any badges yet, you can delete all the data from your database under this table `#__discuss_badges`.

Then replace following SQL #__ to your table prefix then execute this following SQL query on your database.

[gist type="php"]
INSERT INTO `#__discuss_badges` (`id`, `rule_id`, `title`, `alias`, `description`, `avatar`, `created`, `published`, `rule_limit`, `achieve_type`, `badge_achieve_rule`, `badge_remove_rule`, `points_threshold`) VALUES
(1, 1, 'Motivator', 'motivator', 'Voted replies 100 times.', 'motivator.png', '2018-01-07 13:22:39', 1, 100, 'frequency', NULL, NULL, 0),
(2, 2, 'Hole-in-One', 'hole-in-one', 'Accepted 50 replies as answers.', 'hole-in-one.png', '2018-01-07 13:22:39', 1, 50, 'frequency', NULL, NULL, 0),
(3, 3, 'Smile Seeker', 'busybody', 'Liked 100 discussions.', 'busybody.png', '2018-01-07 13:22:39', 1, 100, 'frequency', NULL, NULL, 0),
(4, 4, 'Love Fool', 'love-fool', 'Liked 100 replies.', 'love-fool.png', '2018-01-07 13:22:39', 1, 100, 'frequency', NULL, NULL, 0),
(5, 5, 'Vanity Monster', 'vanity-monster', 'Updated 5 avatars in profile.', 'vanity-monster.png', '2018-01-07 13:22:39', 1, 5, 'frequency', NULL, NULL, 0),
(6, 6, 'Sherlock Holmes', 'sherlock-holmes', 'Started 10 discussions.', 'sherlock-holmes.png', '2018-01-07 13:22:39', 1, 10, 'frequency', NULL, NULL, 0),
(7, 7, 'The Voice', 'the-voice', 'Posted 100 replies.', 'the-voice.png', '2018-01-07 13:22:39', 1, 100, 'frequency', NULL, NULL, 0),
(8, 8, 'Bookworm', 'bookworm', 'Read 50 discussions.', 'bookworm.png', '2018-01-07 13:22:39', 1, 50, 'frequency', NULL, NULL, 0),
(9, 9, 'Peacemaker', 'peacemaker', 'Updated 50 discussions to resolved.', 'peacemaker.png', '2018-01-07 13:22:39', 1, 50, 'frequency', NULL, NULL, 0),
(10, 10, 'Attention!', 'attention', 'Updated profile 50 times.', 'attention.png', '2018-01-07 13:22:39', 1, 50, 'frequency', NULL, NULL, 0),
(11, 11, 'Firestarter', 'firestarter', 'Posted 100 comments.', 'firestarter.png', '2018-01-07 13:22:39', 1, 100, 'frequency', NULL, NULL, 0),
(12, 22, 'Notable Answerer', 'notable-answerer', 'User likes your replies 100 times.', 'reply-like.png', '2018-01-07 13:22:39', 1, 100, 'frequency', NULL, NULL, 0),
(13, 24, 'Well-Known Questionnaire', 'well-known-questionnaire', 'User likes your dicussions 50 times.', 'discuss-like.png', '2018-01-07 13:22:39', 1, 50, 'frequency', NULL, NULL, 0);

[/gist]

It will retrieve back the default badges data.

By the way, may i know which frontpage badges you referring?
·
Sunday, 08 July 2018 10:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

I will try that as soon as I can and much thanks.

In the comment I made about the front end, I should have written:

HOWEVER, when I created the new Badges, I still cannot control how the sort order shows on the front-end.

Just like the ordering function with articles and categories in Joomla, I would appreciate the option on the backend to control the sort order of badges and how they display when someone looks at the Badges Overview on the frontend.

I'll provide an update on the re-creation of the Badges themselves.

Thanks for your weekend support!

Regards
·
Sunday, 08 July 2018 12:20
·
0 Likes
·
0 Votes
·
0 Comments
·
You're most welcome.

Oh, it seems like currently that is not possible to sort order at this point of time.
·
Sunday, 08 July 2018 13:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

Thanks for the SQL code. It took me just a few minutes of google to see how to use PHPAdmin, go to the table, copy the SQL code and execute it, after removing the 2 entries I had created.

The default Badges were quickly restored, so all is well.

You should check however the Filter function the Badges tab on the backend.

When I un-publish various Badges, and then use the fllter to show only Published ones, I still see all of them.

Not a big deal, but wanted to mention it so you can check it.

Overall, I am very pleased that the SQL code you provided solved my problem and avoided me having to reinstall the whole package from scratch.

I was looking for a forum software solution that is "sturdy", so than when I have thousands of posts and something goes wrong, that it can be solved "behind the scenes". You just showed that with this issue today, so I think that is a great sign!

Thanks,
·
Sunday, 08 July 2018 13:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Oh, it seems like that is bug, can you try download my attached file and replace into this JoomlaFolder/administrator/components/com_easydiscuss/models/badges.php , this should fix that filter publish/unpublished from backend.
·
Sunday, 08 July 2018 14:35
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post