Right now, users who are not allowed to seee the ranking page (as well as guests) are still presented with the link to the ranking page. Shouldn't this link be removed if one can't see the page anyway?
Gamification by ReFlar
- Edited
Pollux That would be great, only problem is that the link to the ranking page is loaded before the user data, so we can't check if the user is allowed to see the link, before it is loaded. I'll see if there is any way around it. If not, I could make it so it pops up the login modal when they try to click it.
Pollux That would be great, only problem is that the link to the ranking page is loaded before the user data, so we can't check if the user is allowed to see the link, before it is loaded. I'll see if there is any way around it. If not, I could make it so it pops up the login modal when they try to click it.
What about adding a class to the body element (like haveRankingAccess
) after loading the user data which as a result makes the link to the ranking page element visible?
body:not(.haveRankingAccess) .item-rankings {display: none}
- Edited
Kyrne there are two ways pages are displayed.
- On direct access or page refresh. This is done using a controller in PHP. You can restrict access from there.
- On browsing to it via the SPA. This is handled in the Page component, that component knows about the logged in user with
app.session.user
.
- Edited
Kyrne
Yeah maybe that is the correct term.
Example:
Must have a rank of Bronze or 8 points to be able to view Rankings
(a new member would not have the option to view Rankings util that member has created a few posts or replied to a few posts)
Not sure how that could be done.
My suggestion is mostly about not allowing new members to up-vote until they had achieved some sort of points or reputation. (The blue notification in above image)
So apparently my implementation of floodgate doesn't work. I'll fix this ASAP.
- Edited
Triple post
2.0.0-rc.2
Report any issues you find here.
- Real working spam protection for votes
- Huge refactorings to the vote system
- Votes register to the database faster
- Less system overhead
Please run php flarum migrate
in Flarum's root dir after installing this update.
Work hard. Code harder.
Kyrne Thank your sir, this is my favorite extension, works perfectly.
2.0.0-rc.4
Report any issues you find here.
- Further optimizations
- Votes register to the database even faster
- Even less system overhead
- Shrank the
SaveVotesToDatabase
file by ~30 lines
- Votes are now disabled on locked posts
- The points button to show who voted is now properly disabled for users without permission
- Post authors can now see who gave them which vote in the notification.
- Combined
DownvoteBlueprint
andUpvoteBlueprint
intoVoteBlueprint
- Combined
DownvoteNotification
andUpvoteNotification
intoVoteNotification
- Combined
PostWasDownvoted
andPostWasUpvoted
intoPostWasVoted
- Now includes$type
It’s not a bug – it’s an undocumented feature.
When are you planning to release 2.0 "officially"? ?
- Edited
matteocontrini I have a few more features I want to add, optimize a few more things. There will likely be 1 more rc before release. RC 1 and 2 probably should have been beta.
- Edited