2

I am looking for a way to create a node via just a URL. I know the prepopulate module and similar can auto populate a form for a user to submit, but I would like to avoid the form altogether.

After a node on Site A expires I would like to allow users to add information about the expired node into Site B via email. So Site A will send out an email like:

"Your listing has expired. Did you sell your product? If so, you can add that information to SITE B and view what others have paid for it. Just click the link below:

http://siteb.com/field_location/Provo,Utah/field_category/Antiques/field_price/56.76>/etc..."

When the user clicks on the link, it will create a node with those values.

My main concern is spam prevention and validation.

Is there any module that would help with this? Prepopulate, Rules Link (Rules), Services, etc...

It doesn't have to be complex. It's only for one content type with only a few fields.

Thanks

  • When selecting a solution for this be very conscious of en.wikipedia.org/wiki/Cross-site_request_forgery – rooby May 20 '15 at 0:53
  • Thank you for your input. Which is why I am concerned about validation. Maybe add a key field similar to cron_key to verify the user is able to do this. – Brandon May 20 '15 at 1:09
  • Actually, creating a RSS feed with Views on SITEA and using Feeds on SITEB might be the safest way to implement this. However, without Flags or some other method, users would be unable to approve/deny the transfer. – Brandon May 20 '15 at 1:38
  • According to me you just need to create a url (if it is fixed) in your custom module like $items['abc/%/%/%...']. and when you hit this url, you need to call a custom function in which you create a node programmatically. – harsh_behl_0007 May 20 '15 at 4:15
  • I'm assuming you'd require the user to auth on site B? As @harsh says, just create a wildcard URL via hook_menu in a custom module on site B and pass the path args to your callback function. I'm not sure why your URL has field_names in it, you can omit those - long links can be problematic in mail clients. I'm assuming you'd need some kind of UUID in there too, as syncing data across sites would require it. You may have to check_plain() your args in your callback. If all that's too complicated, look at the feeds module. – murraybiscuit May 20 '15 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.