CVS edit link for nachinius

This module embeds information (documents) from scribd.com into Drupal. I called EMSCRIBD.

The module takes advantage of EMFIELD functionality and hooks. I asked the maintainer of EMFIELD, aaron, if he wanted the module as a new provider, but he refused due to a lot of providers are inside the scope of emfield and he can't handle more. He suggest me to provide it as an extra module. Using the capacity the emfield, this module integrates well with views and with whatever other resources emfield are used for.

EMSCRIBD has a lot of formatters for the scribd documents: thumbnails, thumbnails linked to the original documents, tags, embed code (so to display the document inside drupal).

A nice use of EMSCRIBD module is found at www.hillandknowlton.com. In streams, resources, a slideshows and documents are scribd documents presented using panels, and views, in a very beatiful way. Click in any of the documents (the formatter used was thumbnails with links), redirects to the corresponding embeded document inside the drupal site.

Comments

nachinius’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new4.69 KB
avpaderno’s picture

Issue tags: +Module review
avpaderno’s picture

Status: Needs review » Needs work
  1.       'label' => t('Embedded Scribd Document'),
    

    Strings used in user interface should have the first word in capital case, and the other words in lower case (with the exception of proper nouns, adjectives derived from proper nouns, and acronyms).

  2. /**
     * Implementation of hook_widget_settings (CCK)
     **/
    function emscribd_widget_settings($op, $widget) {
      switch($op) {
      case 'form':
      case 'validate':
      case 'save':
      }
    }
    
  3. See the Drupal coding standards to understand how a module code should be written. In particular, see how constants should be written.
nachinius’s picture

1. Ok, done.

2. Erased.

3. Yes, I read it, and I thought I was following it pretty well. If you can point it better what I am missing, would be helpful.
Anyhow, I corrected the spaces for between parenthesis, and binary operators.
The constants (in providers/scribd.inc), as far I can see, are correctly named, i.e, capital letters, and prefixed by module's name.
I appreciate your time.

nachinius’s picture

StatusFileSize
new4.62 KB

Small mods specified in prev comment.

nachinius’s picture

Status: Needs work » Needs review
avpaderno’s picture

Drupal consider constants also NULL, TRUE, and FALSE.

nachinius’s picture

StatusFileSize
new4.61 KB

Done. Changed all occurrences in php-code of TRUE, NULL, and FALSE to uppercase letter. (The exception is in the embed html code, line 280 of emscribd.module).
Thanks again for your time.

avpaderno’s picture

Status: Needs review » Needs work
      if (@count($info['fields'])) {
        foreach ($info['fields'] as $field_name => $field) {
          if (in_array($field['type'], array('emscribd'))) {
            $fields[$field_name] = isset($field['widget']['label']) ? $field['widget']['label'] : $field_name;
          }
        }
      }

The errors suppressor operator should be used when it is really necessary; there isn't the need to use it in such case.

Strings used in user interface should have the first word in capital case, and the other words in lower case (with the exception of proper nouns, adjectives derived from proper nouns, and acronyms).

nachinius’s picture

Status: Needs work » Needs review
StatusFileSize
new1.4 KB

Ok. I suppressed the @, and corrected some capitals in the interface. The others left, I considered there are proper nouns.
Thanks for your time again. Happy year!
I am attaching a patch, I hope this is ok.

avpaderno’s picture

Status: Needs review » Needs work

I am attaching a patch, I hope this is ok.

We review the code globally. Would who review the code be supposed to take the old file, patch it, and then review it?
Considering that to create the patch you first modified the original file(s), I think that it would be kind for who review the code to upload the full archive.

nachinius’s picture

Status: Needs work » Needs review
StatusFileSize
new4.6 KB

Would who review the code be supposed to take the old file, patch it, and then review it?

Actually, I was thinking this may be easier for the fast ping-pong interaction, until we get an stage where presenting the full
code is ok. Do you understand what I mean? It is not because I am not kind, I was trying to be kind.
I thought that you already have the code it, and instead of untar and unzip, you could patch. You can see in a glance if the changes were want you wanted.
But, if this is not the policy is ok, if this is not convenient to you, it is also ok.
Anyways, please find the tar.gz.
My apologize if this have upset you.
Thank you again for your time.

avpaderno’s picture

I was not upset. I was trying to give a reason of why we don't review patches; I think that explaining the reason why something is done in a way is better than simply saying no, we don't proceed so.

It's me who needs to apologize, if I seemed upset.

nachinius’s picture

I absolutely agree with the importance of explaining the reasons. Specially, since we are in a community.
Thanks again for your time.

nachinius’s picture

ping

avpaderno’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -Module review

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

Component: Miscellaneous » new project application
Assigned: Unassigned » avpaderno
Issue summary: View changes