Creates a field that a user can add a published gdoc link.

If the user adds this field to a node which has a url and body component, if the url field is filled out then the module scrapes the google doc strips out unnecessary html and inserts it into the body field.

This is different to other modules as it does not use the google api it just looks at a published page and scrapes the html from the page.

Future features are as follows

  • Options for which elements to strip out
  • Outh to scrape docs that aren't publicly published

https://drupal.org/sandbox/danharper/2264665

This is my first module be nice :)

CommentFileSizeAuthor
#9 hook_requirements-2284633-8.patch1.71 KBbrice_gato

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxdanharper2264665git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

brice_gato’s picture

- Provide READEME file

- Here, what hook exactly you wanted to use? (hook_node_presave($node) or hook_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items))

/**
 * Implements hook_node_presave().
 */
function gdoc_field_field_presave(&$items) {
  $doc_field = str_replace('pubimage', $items[0]['url'] . 'image', gdoc_field_doc_out($items[0]['url']));
  $items[0]['html'] = $doc_field;
}

- Do not forget to move from your master branch to something like 7.x-1.x

danharper’s picture

Repo has been updated.

  • Correct branch name added
  • Properly used hook names
  • Coding standards tidied up
  • Readme added

http://pareview.sh/pareview/httpgitdrupalorgsandboxdanharper2264665git

Cheers Dan

brice_gato’s picture

You made your changes on master!
Spread your corrections on 7.x-1.x-dev
On branch 7.x-1.x :

  • In gdoc_field.install line 4 replace field_example with gdoc_field
  • In gdoc_field.module: Change gdoc_field_field_presave fucntion and rename comment hook_node_presave into hook_field_presave
  • In gdoc_field.module: function gdoc_field_doc_out remove $google_docs = $file and change $output = file_get_contents($google_docs) by $output = file_get_contents($file).
    I'm afraid that what you did in gdoc_field_doc_out can become obsolete very quickly, ie points on styles

After your corrections do not forget to change the status of your issue to "Needs review".

danharper’s picture

Status: Needs work » Needs review

I have updated as suggested.

I will change the gdoc_field_doc_out() function to us curl rather than file_get_contents();

Thanks for all the help it's amazingly useful :)

Dan

churel’s picture

Status: Needs review » Needs work

Hello,
I only see this issue :
You are using curl without declaring it on a hook_requirements (see exemple here https://drupal.org/node/1529166)

danharper’s picture

Status: Needs work » Needs review

Added the hook_requirements() into the install file.

brice_gato’s picture

Status: Needs review » Needs work

I made some changes on the hook_requirements. Here attached the patch (hook_requirements-2284633-8.patch) to be applied.

brice_gato’s picture

StatusFileSize
new1.71 KB
danharper’s picture

Status: Needs work » Needs review

Committed patch with correct git attribution

brice_gato’s picture

Status: Needs review » Needs work

Change your default branch from master to 7.x-1.x
http://drupal.org/node/1659588

danharper’s picture

Status: Needs work » Needs review

Default branch has been changed.

brice_gato’s picture

Status: Needs review » Reviewed & tested by the community

Your module looks good for me.

danharper’s picture

Status: Reviewed & tested by the community » Needs work

Think there may be a name clash, I was sure it was available when I started it so will need to change it.

danharper’s picture

Status: Needs work » Reviewed & tested by the community

Renamed module so it has a namespace gdocfield instead of gdoc_field

danharper’s picture

Title: D7 gdoc_field » D7 gdocfield
brice_gato’s picture

Status: Reviewed & tested by the community » Needs work

You have to change namespaces of your files, functions and hooks.

danharper’s picture

Hadn't committed properly, have re done it now.

danharper’s picture

Status: Needs work » Needs review
danny.meldrum’s picture

Status: Needs review » Reviewed & tested by the community

Tested and working

danharper’s picture

Anything else I need to do to get this promoted?

Cheers Dan

gisle’s picture

@danharper, just just have to be patient!

If you look at the RTBC queue, you'll notice that the time it takes from RTBC-status to actual approval by one code review administrators may be significant.

Currently, the there are projects that got there RTBC-status more than six months ago that are not yet promoted.

AFAIK, that is how things are, and there is nothing one can do to speed up the process.

danharper’s picture

Thanks for the info

Dan

danharper’s picture

Title: D7 gdocfield » [D7] gdocfield
kscheirer’s picture

Status: Reviewed & tested by the community » Fixed

You might be able to use drupal_convert_to_utf8 instead of mb_convert_encoding().

Thanks for your contribution, danharper!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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

danharper’s picture

Hi All,

I still don't seem to have the tab to promote my module.

Cheers Dan

klausi’s picture

You created your sandbox as drupal.org infrastructure project instead of module. You need to create a new sandbox as module and push your commits there, then you will be able to promote it.