This is the first module which provides integration for the third-party service, RAMP.

Module integrates with:
RAMP search api
RAMP related content api.

This module also integrates with and relies heavily on Views and Ctools/Panels to give users complete control over search page elements. The idea for this module is to provide the base integration with RAMP service. Once we test and stabilize the initial version release, we can start to incorporate other features from RAMP service.

Note: This modules uses a custom views backend to pull and handle data via RAMP API.

Included:
RAMP base module
RAMP search module
RAMP related content module

Ramp Requirements:
ctools
views
views_data_export

RAMP search requirements:
imagecache_external
better_exposed_filters

This module is intended to work with Drupal 7.x

Sandbox: https://drupal.org/sandbox/plinthify/1884568

Git link: http://git.drupal.org/sandbox/plinthify/1884568.git

You must have an account with RAMP service to use this module (need RAMP api key).

CommentFileSizeAuthor
#18 coder-results.txt16.69 KBklausi
demologo.png86.63 KBRP121-dupe

Comments

zterry95’s picture

ramp.info

files[] = plugins/ramp-mrss-body.tpl.php
files[] = plugins/ramp-mrss-footer.tpl.php
files[] = plugins/ramp-mrss-header.tpl.php
files[] = plugins/ramp.tpl.php

these lines are not need in fact.

zterry95’s picture

ramp.module
LINE:109

'export feed icon' => 'sites/all/modules/views_data_export/images/xml.png',

the icon path should be dynamic.

Image that if we install views_data_export in different directory...

Properly, should like below:

'export feed icon' => drupal_get_path('module','views_data_export') . '/images/xml.png',

zterry95’s picture

also it is suggested that move below function from ramp.module to ramp.views.inc

function ramp_views_plugins_alter(&$plugins)

zterry95’s picture

function ramp_node_presave($node) {
  $node->nid = (int)$node->nid;
  $duplicate = db_query("SELECT * FROM {ramp} WHERE nid = :nid", array(':nid' => $node->nid))->fetchAssoc();
  if (empty($duplicate)) {
      db_insert('ramp')
        ->fields(array(
            'nid' => $node->nid,
            'type' => $node->type,
            'r_index' => $node->index,
      ))->execute();
  }
  else {
    db_update('ramp')
      ->fields(array(
        'r_index' => $node->index,
    ))->condition('nid', $node->nid, '=')
      ->execute();
  }
}

actually, you don't need to write so many code for this condition.
try db_merge, it is more interesting:)

an example here,
http://drupalcode.org/project/recently_read.git/blob/refs/heads/7.x-3.x:...

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and 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.

sreynen’s picture

Title: RAMP » [D7] RAMP
RP121-dupe’s picture

Thanks zterry, I've made the updates with the exception of the db_merge function. I had some problems trying to implement previously, so I'll need to test further before making the change again.

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://ventral.org/pareview/httpgitdrupalorgsandboxplinthify1884568git

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

RP121-dupe’s picture

I've reviewed and cleaned up formatting. Can we continue to review?

sreynen’s picture

Status: Needs work » Needs review

RP121, make sure you change the status, so people know it's ready for review.

RP121-dupe’s picture

Thanks, sreynen. Will do.

robdubparker’s picture

Any other feedback here?

robdubparker’s picture

I want to make sure this is still being reviewed. Any errors that are reported by the automated review tools are associated with views class names not using camel case. To my knowledge this isn't something I can change.

robdubparker’s picture

Priority: Normal » Major
jrviorato’s picture

Priority: Major » Normal
Status: Needs review » Needs work

Hi rp121,

Comments

It is an very interesting module, but it is really hard to review without an API key (and they do not look easy to get) making impossible to see how your module works.

On the other hand, I don't understand what exactly your ramp_search sub module does, but it seems that it index some part of your content and also add some search auto-complementation forms. So, I think your module can benefit from search.api module, have you consider it?

Manual Review

You need to include to your project applications the url to your project page (i.e https://drupal.org/sandbox/plinthify/1884568).

On views_handler_filter_term_node_tid.inc, line 90 you call taxonomy_vocabulary_machine_name_load() so, you need to add taxonomy module as a requirement on the corresponding .info file. Or else, you will have a fatal error.

On ramp_search.admin.inc line 19, you have '#default_value' => RAMP_DEFAULT_API_URL, instead of #default_value' => variable_get('ramp_api_url', RAMP_DEFAULT_API_URL),.

robdubparker’s picture

Status: Needs work » Needs review

Thanks for the feedback jrviorato. I have made the code changes you've requested and committed to latest working copy.

As for using search api... I'm certainly in favor of leveraging any module that can limit functional redundancy, however, when looking into search api I noticed that it says it only works for Drupal entities. One of the pieces to this RAMP module is that it can pull content from other areas outside of your Drupal instance, which is an approach that some companies use. The RAMP service uses various feeds from a handful of sources (sometimes from multiple systems) and aggregates them into search results, among other things.

I'll see if I can grab a demo api key for users to test with and add it to the module description.

klausi’s picture

Assigned: Unassigned » klausi

I'll look at this now in the Project applications sprint

klausi’s picture

Assigned: klausi » Unassigned
Status: Needs review » Needs work
Issue tags: +PAreview: security
StatusFileSize
new16.69 KB

Sorry for the delay, but you have not listed any reviews of other project applications in your issue summary as strongly recommended in the application documentation.

Review of the 7.x-1.x branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. You can ignore the warnigns about Views integration classes nd some undefined variables after extract() in the automated review, but the other stuff ist relevant.
  2. Project page is too short, what are you still planning? This should be finished before promoting to a full project, see https://drupal.org/node/997024
  3. Remove the 7.x branch, so that it is not confused with 7.x-1.x
  4. ramp_rss_schema(): wrong doc block, this is not hook_schema()?
  5. xmlSchema.inc: wrong doc block, what is this?
  6. ramp_node_presave(): use db_merge() instead?
  7. "'#default_value' => variable_get('ramp_api_key', ''),": all variables defined by a module need to be removed in hook_uninstall().
  8. ramp_views_data(): contains a lot of example documentation which has nothing to do with your specific code. Please remove and adapt it.
  9. ramp.views.inc: @file doc block is wrong. Please fix all your @file doc blocks.
  10. ramp_related_request(): if you make an API call yoiu have to use drupal_http_request(), as remote file inclusion will be disabled for security reasons on most Drupal installations.
  11. ramp_related_content_contents(): this looks vulnerable to XSS exploits, where is the untrusted third party data sanitized before printing it in the template? Make sure to read https://drupal.org/node/28984 again. And please don't remove the security tag, we keep that for statistics and to show examples of security problems.
PA robot’s picture

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

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

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

PA robot’s picture

Issue summary: View changes

added sandbox link