[3.2][RC] Dice rolls

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
BlackGirl
Registered User
Posts: 32
Joined: Thu Feb 24, 2011 9:52 pm

Re: [3.2][RC] Dice rolls

Post by BlackGirl » Thu Jul 04, 2019 6:56 pm

mrgoldy wrote: ↑
Thu Jul 04, 2019 10:56 am
That's an excellent catch, thank you for reporting it!

So, I recreated the issue on my localhost and started searching and found the issue.
I was able to come up with a fix that works for me, but could you verify this fix for me?

Once again thank you for reporting it! :mrgreen:
3Di wrote: ↑
Thu Jul 04, 2019 12:19 pm
Thanks for feedback indeed. :)
Thanks to you for your work<3
The issue is now fixed.

User avatar
3Di
Former Team Member
Posts: 13901
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][RC] Dice rolls

Post by 3Di » Fri Jul 05, 2019 2:04 pm

And everybody lived happily ever after. Thx for reporting it. ;)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

lightonice
Registered User
Posts: 4
Joined: Tue Jul 09, 2019 2:41 am

Re: [3.2][RC] Dice rolls

Post by lightonice » Tue Jul 09, 2019 2:45 am

Thanks so much for making this mod! I've been struggling to get it to work on my 3.2.5 forum, however. The new version fixed the old problem, and begat a new one. I apologize if I'm just blind and haven't seen the setting for htis, but for some reason, only administrators can use the dice mod on my forum. I've enabled it in all my forums that need it, but for whatever reason, only admin can see the tab below the post page and use it. It wasn't doing this on the previous version that just wasn't linking rolls! Sorry if this is an easy answer somewhere, but I'm puzzled as to why its not showing up on regular user accounts with standard access to my board.

User avatar
3Di
Former Team Member
Posts: 13901
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][RC] Dice rolls

Post by 3Di » Tue Jul 09, 2019 11:37 am

Of the old MOD "Dicemod v0.8.8b" we kept only 2 skins, not a single line of that one has been used, everything has been rewritten from ground zero. An additional skin created in SVG has been added.
That's not that old buggy MOD but a new Extension. ;)

It uses forum permissions in this case namely ROLE_FORUM_STANDARD, if your forums are using another role to let the standard users use them then you should add those permissions to those specific roles.

If the above mentioned role doesn't exist in your board that's another issue you should solve with the support, since standard roles shouldn't be deleted.

User permissions are under the ROLE_USER_STANDARD but just to manage the extension's UCP, use the test notation page and change dice skin.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

lightonice
Registered User
Posts: 4
Joined: Tue Jul 09, 2019 2:41 am

Re: [3.2][RC] Dice rolls

Post by lightonice » Tue Jul 09, 2019 1:40 pm

Yes! Thank you for directing me to the right place; however, any changes I make to role permissions don't seem to make a difference. I'm not sure if this is a problem with my board (might very well be). My standard role is there, it says 'can roll dice' but doesn't give me the tab to do so on a standard user unless I turn on mod functions for the dice for all my users (which is what I've done to solve the issue.)

(This may be an issue with my forum setup, but on the off chance its not, thought I'd drop this here).

Thanks for your reply!

User avatar
3Di
Former Team Member
Posts: 13901
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][RC] Dice rolls

Post by 3Di » Tue Jul 09, 2019 1:56 pm

You shouldn't give Moderators' permissions that way, makes no sense. :ugeek:

Here is how the forum permissions for standard users look like after a fresh installation, if that's not your case you got some issues somewhere.

Image
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

lightonice
Registered User
Posts: 4
Joined: Tue Jul 09, 2019 2:41 am

Re: [3.2][RC] Dice rolls

Post by lightonice » Tue Jul 09, 2019 2:07 pm

Nope, I don't get a select type menu, nor does it have the role - it gives me a list of all my forums and I can fiddle with permissions for each forum, but not the role across the board. And doing so does not change whether I can roll dice unless the mod options are turned on. Huh. I must have a strange board somehow.

Welp, time to look into that. :) Thanks for the help!

User avatar
3Di
Former Team Member
Posts: 13901
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][RC] Dice rolls

Post by 3Di » Tue Jul 09, 2019 2:44 pm

Let me investigate further more though, I will keep you posted.

Edit:
lightonice wrote: ↑
Tue Jul 09, 2019 2:45 am
... for some reason, only administrators can use the dice mod on my forum. I've enabled it in all my forums that need it, but for whatever reason, only admin can see the tab below the post page and use it..... I'm puzzled as to why its not showing up on regular user accounts with standard access to my board.
Bug confirmed, I installed a fresh phpBB 3.2.7 with the Dice v2.1.1 available here from The Studio.

Thanks for reporting it! :)

Currently working on the fix, that's not permissions since those are all ok.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

User avatar
3Di
Former Team Member
Posts: 13901
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][RC] Dice rolls

Post by 3Di » Tue Jul 09, 2019 3:45 pm

Seems like I introduced the issue in this version by mistake. :(

https://github.com/phpBB-Studio/DiceRolls/issues/4
https://github.com/phpBB-Studio/DiceRolls/pull/5/files

OPEN ./ext/phpbbstudio/dice/core/functions_common.php

FIND at line 130

Code: Select all

	public function dice_author($user_id)
	{
		return ($this->user->data['user_id'] === $user_id);
	}
REPLACE WITH

Code: Select all

	public function dice_author($user_id)
	{
		return ((int) $this->user->data['user_id'] === (int) $user_id);
	}
That should do, please confirm. Thanks.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

lightonice
Registered User
Posts: 4
Joined: Tue Jul 09, 2019 2:41 am

Re: [3.2][RC] Dice rolls

Post by lightonice » Tue Jul 09, 2019 8:40 pm

It doesn't seem to have fixed it for me, but I may be editting the php incorrectly?

User avatar
3Di
Former Team Member
Posts: 13901
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][RC] Dice rolls

Post by 3Di » Wed Jul 10, 2019 11:44 am

lightonice wrote: ↑
Tue Jul 09, 2019 8:40 pm
It doesn't seem to have fixed it for me, but I may be editting the php incorrectly?
If you corrected the file as I indicated and put back the permissions and roles as you can see in the screenshots above you should have no more problems.

Eventually disable, delete the data and re-enable the extension. Obviously having fixed the file well beforehand.

A new version will be ready soon, I have to correct some false permissions.
A normal user should not have permission to delete or modify existing rolls as default.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

User avatar
3Di
Former Team Member
Posts: 13901
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][RC] Dice rolls

Post by 3Di » Wed Jul 10, 2019 3:09 pm

New version 2.1.2 - see first post. ;)
v2.1.2
- FIX Faulty regex returning null instead of the actual message.
- FIX Rolls' TAB not showing up on regular user accounts upon installation.
-
- The following to prevent cheats:
- ENHANCEMENT - User should not have permission to delete or modify existing rolls as default.
-
- The followings to keep consistency with the core code:
- ENHANCEMENT - Posts containing rolls can be safely soft-deleted and restored.
- ENHANCEMENT - Deleting posts doesn't affect quoted rolls.
- ENHANCEMENT - Editing rolls doesn't affect quoted ones.
- ENHANCEMENT - Deleting forum content doesn't affect rolls quoted elsewhere, ie.: other forums.
- ENHANCEMENT - Deleting topics doesn't affect rolls quoted elsewhere, ie.: other topics.
-
- Code housekeeping

Update:
  • disable and NOT delete data
  • delete old files and upload the new ones
  • enable it again.



Image
Last edited by 3Di on Sun Jul 14, 2019 8:24 am, edited 1 time in total.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

locust shell
Registered User
Posts: 2
Joined: Fri Apr 26, 2019 1:11 am

Re: [3.2][RC] Dice rolls

Post by locust shell » Sat Jul 13, 2019 7:49 pm

Just popping back in to say thanks again for all the work on this! I finally took a bit of time to play around with the latest version. Haven't found anything else funky thus far, though I will keep looking! You've even fixed some things it hadn't occurred to me could be fixed, like adding the ability to restore rolls on soft-deleted posts--if I combine that with disabling users' ability to permanently delete their posts, it solves the issue of users being able to underhandedly discard "bad" rolls by throwing out the whole post, which was worrying me a bit. (My kludgy idea for a solution had been to confine all rolls to one "Dice" forum where no deletion was allowed, but that was... kludgy.)

One reason I was excited about this extension is the ability to do the custom dice from FFG's new L5R game, which aren't yet supported on any other dice roller site I've found--if you'd like a copy of the L5R dice pack I threw together, I'd be happy to PM it over.

User avatar
3Di
Former Team Member
Posts: 13901
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][RC] Dice rolls

Post by 3Di » Sat Jul 13, 2019 7:59 pm

Thanks for feedback, and yes it remains just one last thing to implement:
Rolls which aren't placed INLINE can't be quoted, working on this.
locust shell wrote: ↑
Sat Jul 13, 2019 7:49 pm
One reason I was excited about this extension is the ability to do the custom dice from FFG's new L5R game, which aren't yet supported on any other dice roller site I've found--if you'd like a copy of the L5R dice pack I threw together, I'd be happy to PM it over.
Sure, please do it. :) Appreciated.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

Post Reply

Return to β€œExtensions in Development”