Hello,

I really like the functionality of the Node Import page, but I haven't found a way to let normal users use this page to create an amazon_node. Anyone have any ideas?

Comments

Prometheus6’s picture

Status: Active » Closed (works as designed)

You really want to do that?

Frankly, I think you're nuts, but if you want to hack it in, search for this

    $items[] = array('path' => 'admin/content/amazon_import/import',
                     'title' => t('Import'),
                     'type' => MENU_DEFAULT_LOCAL_TASK,
                     'callback' => 'amazon_import_page');

and change to something like this

    $items[] = array('path' => 'amazon_importt',
                     'title' => t('Import'),
                     'type' => MENU_DEFAULT_LOCAL_TASK,
                     'callback' => 'amazon_import_page');
DayShallCome’s picture

Prometheus,

:)

I think the UI of the amazon_import is much better than that of the standard single amazon_node creation (which requires users to find the ASIN on their own). I'm going to alter things somewhat, though, based on permissions. For instance, if a user is not an administrator, than they will only be able to import one book at a time. Further, I'm going to make a workflow,

http://www.librarything.com/ has inspired me to do this - the UI for entering a book is extremely simple, much like amazon_import.

Prometheus6’s picture

Okay, that makes sense.

That import page only creates nodes of type 'amazon_node', which really don't allow you to modify anything. If you want folks to use nodes of type 'amazon,' you'd be better off with a dynamic multipage form. You can create a dynamic form by swiping and modifying the array the form for q=search/amazon (sorry, I don't keep function names in my head) to use as the first page and use the current node/add/amazon form as the second.

This instead of the hackery I suggested when I thought you were nuts.

DayShallCome’s picture

Hmm, nice suggestion. I like it, thanks.

However, I'm having problems limiting the node import code to only 1 input (no multiple inputs). I thought that the checkboxes were rendered in parallel, but it looks like they are rendered for each book iteratively. Thus, simply using radios instead of checkboxes doesn't work. Can you think of an easy solution to only allow 1 book to be imported at a time?

DayShallCome’s picture

Category: bug » support
Status: Closed (works as designed) » Active
Prometheus6’s picture

Change the check boxes to radio buttons.

Prometheus6’s picture

Sorry, mental short circuit.

I'm understanding you want a search form that lets you jump straight to creating a review (amazon node type) of a selected item. Is that the case?

DayShallCome’s picture

My workflow is actualy going to be a little different... I'm not using Amazon data type, but instead am only using Amazon_node data type from the Amazon module. Then I am using the NodeComments module to allow for responses, reviews, discussion, etc.

What I need to do is allow a way to let users import books from amazon (amazon_nodes) using the graphical/search interface of amazon_import. However, I only want them to be able to import 1 book at a time (no multiple imports). I thought simply changing the Select boxes to Radios would allow this limit, but it turns out that this doesn't fix anything.

Any ides to limit the number of amazon imports to 1 at a time?