CVS edit link for Bastlynn

I would like to offer an integrated Dice Roller module for Drupal 5, Drupal 6 and eventually Drupal 7 as well. Dice rollers are one of the most requested features on role playing sites. This module will provide feature and convenience for forum based play. This module will also eliminate the risk of players tampering with roll results by integrating the roller with node and comment posts.

I've looked through the existing modules and found nothing similar. A copy of the existing code can be found here: http://www.unpretentiousmonkey.com/files/Dice_Roller.zip

Comments

Bastlynn’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new9.86 KB

Corrected version found in post #2 - this version has a typo due to name changes to avoid conflict with dICE module.

Bastlynn’s picture

StatusFileSize
new9.89 KB

Corrected for naming related typo in modules.

avpaderno’s picture

Bastlynn’s picture

I'm not sure how long the review process takes, is there a next step that I've missed that I need to take?

avpaderno’s picture

Issue tags: -Drupal 5.x

Let's keep the Drupal 6 version for the review.

  1. 
        if( (!$teaser && $op == 'insert') || (!$teaser && $op == 'update') ) {
            if($node->dice_rolls['roll_command'] > 0){
                $did = _dice_roller_parse_roll( $node->dice_rolls['roll_command'], $node->dice_rolls['roll_notes'] );
                _dice_roller_set_origin($did, $node->nid, 'n');
            }
        }
    
        if(!$teaser && $op == 'delete') {
            _dice_roller_delete_roll($node->nid, 'n');
        }
    
        if(!$teaser && $op == 'view') {
            $node->content['body']['#value'] .= _dice_roller_get_roll($node->nid, 'n');
        }
    

    See the Drupal coding standards to understand how a module code should be written. I will not report other code that is not compliant with.

  2.     if(strlen($pid)==0){
            return '';
            exit;
        }
    

    If the function is returning to the caller, then exit is not executed.

  3.         '#description' => t($help_text),
    

    The first argument for t() needs to be a literal string; differently, the script that extracts the strings to translate is not able to extract the string.

  4. The help text you used is the same reported in http://invisiblecastle.com/roller, which says portions of the text are copyrighted from The OpenRPG Project; you are using the same portions of text without reporting the copyright holder.
avpaderno’s picture

Status: Needs review » Needs work

I forgot to change the status.

Bastlynn’s picture

Thanks - I'll get the copyright sorted out and get started on the formatting. :)
Thanks for the catch with the t()

avpaderno’s picture

Rather than repeating text that is available from a third-party site, it would be better to put a link to the page which gives the description you copied in the module. Actually, if somebody doesn't know what he should write (or the functions he can use), it is more probable he should not be using the module. :-)

Bastlynn’s picture

I wanted to include the help as an opportunity to teach my average user how to use it. I honestly can't expect them to know just on looking at it how to make it work, it's just not an interface that has gotten that much exposure yet amongst the target audience. I didn't know how to make it work myself the first time I ran into this type of dice roller, but luckily the help was right there so I could learn it quickly. I just don't feel right holding the average user up to standards of insight that I couldn't be held to myself.

As for linking to the text vs. including it, I do have a reason to not just link to it off site. It's there locally for ease of use and to prevent loading delays and other problems. I don't like relying on someone else's website being up for my help file to be available. If their version changes and they suddenly have new features or their site goes down - then I need to go in to add new features or make a locally hosted help file, push out a new update, and hope anyone using the module picks up the update and installs it promptly. It's more work and hassle for myself and others in the long run that just keeping a local help up to date with any new features.

Make sense?

avpaderno’s picture

It makes sense.
Still, the text should be changed. I don't think function names used by some kind of scripting language can be copyrighted, but the rest of the text can be; it just a question of saying the same thing without to use the same words used by the other web site.

Bastlynn’s picture

Oh, I'm completely cool with that. :)

That's the approach I was planning to take after getting a chance to look at what OpenRPG is copyrighted under, if it's CC or something else that will require a change in wording.

Steel Rat’s picture

There are no installation instructions for this module, and no configuration option. What is one supposed to do with it once it's installed?

Thanks

Steel Rat’s picture

Ok, I see the Roll Dice option in my comment form. So I tried it out on my D5 RP site, and got the following error when trying 1d20+5 as the roll.

Fatal error: Call to undefined function _dice_roller_set_origin() in /home/hdrpgco/public_html/drupal/modules/Dice_Roller/dice_roller.module on line 119

One thing I noticed when I tried to install this, there was a conflict since the Drupal 5 and 6 versions are in the same folder structure. I had to delete the D6 version to get it to install, which it then did without error. So maybe something got hosed on the first install attempt?

Bastlynn’s picture

@Steel Rat - did you make sure to pick up the second zip or the first one? The first had a known typo. Also - the zips for the two version will be submitted separately in the future to prevent accidental double installs.

Steel Rat’s picture

I grabbed the one in comment #2

avpaderno’s picture

@Bastlynn: We review just a module per applicant; as you noticed, I am reviewing the Drupal 6 version of the module.
It would be better to give to the archive the same structure the archive generated from the packaging archive running on Drupal.org would have.

avpaderno’s picture

Status: Needs work » Closed (won't fix)

There have not been replies from the OP in the past 7 days. I am marking this report as won't fix.

Bastlynn’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new5.83 KB

My apologies for the long quiet there. I needed to go back and refresh some basic syntax understanding and then the holidays hit me.

This is the next round of code (let me know if it would be better for me to open a new application thread instead of resurrecting this one).

This code was run through Coder module for syntax which should eliminate most of the problems noted.

avpaderno’s picture

Status: Needs review » Closed (won't fix)

Hello, and thanks for your reply. You need to re-apply for a CVS account as your application has been already rejected.

Steel Rat’s picture

Is that for D5 or 6?

Bastlynn’s picture

The most recent one is for D6. If you really need it for your D5 site let me know and I'll bring the old 5 version up to snuff for you.