I presume I would simply enter each one of these into a new line in the ACP section for dice definitions?hanelyp wrote: 'ef' => '@["","","","","","","","O","O","O","OO","OO"]',
'ea' => '@[".","ⵜ","ⵜ","ⵜⵜ","⚚","⚚","ⵜ⚚","⚚⚚"]',
'ep' => '@[".","ⵜ","ⵜ","ⵜⵜ","ⵜⵜ","ⵜ⚚","ⵜ⚚","ⵜ⚚","⚚","⚚⚚","⚚⚚","ⴲ"]',
'eb' => '@[".",".","ⵜ","⚚","⚚⚚","ⵜ⚚"]',
'ed' => '@[".","☠","☠","☠","☠☠","☠/","/","⁄⁄"]',
'ec' => '@[".","/","/","//","//","☠/","☠/","☠","☠","☠☠","☠☠","ⵁ"]',
'es' => '@[".",".","☠","☠","/","/"]',
Likewise, for images, would I add these to the same definitions section (using your similies as an example):hanelyp wrote:The code can handle custom dice, and some moderately fancy stuff. Conversion of text symbols into images is also possible.
Code: Select all
'sm' => 'smilie [smtag]'
'smilie' => '"<img src="./images/smilies/icon_>.gif">"'
'smtag' => '["e_biggrin","e_sad","evil","lol","cool","e_smile","e_wink","mad","e_geek","mrgreen"]'
Unless you define something fancy in the dice defs (see smiley dice below) this extension displays text output. The smiley dice below show a way to do that using phpbb included images. The [dice] bbcode should have a button in the post editor.Shepskii wrote:This looks like an excellent extension, one that I am very keen to see working so I've been trying to install it on my test forum but have run into some trouble.
The extension is installed and the ACP options are all visible but the [dice][/dice] bbcode doesn't appear to work in posts, it just displays as plain text. I was assuming the bbcode is part of the extension but I may be wrong - do I need to manually specify the new [dice] bbcode? Or perhaps I have overlooked something stupid/obvious.
Enter those in the ACP. ACP definitions override defaults in fancydice.php, which was written for more general use.Assuming I can get the basics down, some questions on the more fancy stuff...
I presume I would simply enter each one of these into a new line in the ACP section for dice definitions?hanelyp wrote: 'ef' => '@["","","","","","","","O","O","O","OO","OO"]',
'ea' => '@[".","ⵜ","ⵜ","ⵜⵜ","⚚","⚚","ⵜ⚚","⚚⚚"]',
'ep' => '@[".","ⵜ","ⵜ","ⵜⵜ","ⵜⵜ","ⵜ⚚","ⵜ⚚","ⵜ⚚","⚚","⚚⚚","⚚⚚","ⴲ"]',
'eb' => '@[".",".","ⵜ","⚚","⚚⚚","ⵜ⚚"]',
'ed' => '@[".","☠","☠","☠","☠☠","☠/","/","⁄⁄"]',
'ec' => '@[".","/","/","//","//","☠/","☠/","☠","☠","☠☠","☠☠","ⵁ"]',
'es' => '@[".",".","☠","☠","/","/"]',
Again, add that to the ACP if you want to use the sm dice. The same syntax can support your own images for other dice.Likewise, for images, would I add these to the same definitions section (using your similies as an example):hanelyp wrote:The code can handle custom dice, and some moderately fancy stuff. Conversion of text symbols into images is also possible.
Or should this be added to fancydice.php directly?Code: Select all
'sm' => 'smilie [smtag]' 'smilie' => '"<img src="./images/smilies/icon_>.gif">"' 'smtag' => '["e_biggrin","e_sad","evil","lol","cool","e_smile","e_wink","mad","e_geek","mrgreen"]'
I should have clarified sorry, when I said plain text I meant that the post displayed:hanelyp wrote:Unless you define something fancy in the dice defs (see smiley dice below) this extension displays text output. The smiley dice below show a way to do that using phpbb included images. The [dice] bbcode should have a button in the post editor.
Instead of the formatted text as per the sample images.[dice]2d20[/dice]
Something is definitely not working right with that install. If you go into the bbcode ACP and make sure that [dice] is defined, then use the "Reset [dice] BBcode definition" option on the fancydice ACP that should clear up the problem if the bbcode record didn't get created.Shepskii wrote:I should have clarified sorry, when I said plain text I meant that the post displayed:
Instead of the formatted text as per the sample images.[dice]2d20[/dice]
And the bbcode is not appearing in the post editor so it would appear I have not installed things correctly or there is some other problem.
Could be, I don't know that extension. Try again after validating the bbcode record. Note that this extension does processing at edit time that isn't happening.I have the Advanced BBcode extension installed - could this be conflicting? I've disabled it for now but the [dice] bbcode is still not showing in the post editor.
There is no code to remove dice definitions with extension uninstall.I've also noticed that when I try a fresh install (disable, delete data, delete files via FTP, reinstall etc.), the custom definitions reappear in the ACP on the newly installed extension whereas I would have expected to have to re-enter them.
Aha! I recreated the [dice] bbcode and reset the definition as you suggested and all looks to be working now. I'll look at updating the custom definitions to use images for the Star Wars dice next and I look forward to future developments! Thanks againhanelyp wrote:Something is definitely not working right with that install. If you go into the bbcode ACP and make sure that [dice] is defined, then use the "Reset [dice] BBcode definition" option on the fancydice ACP that should clear up the problem if the bbcode record didn't get created.Shepskii wrote:I should have clarified sorry, when I said plain text I meant that the post displayed:
Instead of the formatted text as per the sample images.[dice]2d20[/dice]
And the bbcode is not appearing in the post editor so it would appear I have not installed things correctly or there is some other problem.
Could be, I don't know that extension. Try again after validating the bbcode record. Note that this extension does processing at edit time that isn't happening.I have the Advanced BBcode extension installed - could this be conflicting? I've disabled it for now but the [dice] bbcode is still not showing in the post editor.
There is no code to remove dice definitions with extension uninstall.I've also noticed that when I try a fresh install (disable, delete data, delete files via FTP, reinstall etc.), the custom definitions reappear in the ACP on the newly installed extension whereas I would have expected to have to re-enter them.
Code: Select all
[dice seed=361108916317 secure=7ac094e7]3d6[/dice]
If you can run testfancydice.php from the command line and note if the bug is still present that may also be useful.3d6 => 3, 1, 3 => 7 invalid
Code: Select all
[dice seed=361108916317 secure=7ac094e7]3d6[/dice]