Is it possible to use a script to enter data using Drupal?

I plan to host the store inventory on the Drupal website and I wonder if it is possible to create a script (perhaps in python / php?) To automatically enter data into Drupal using CCK? Thanks in advance!

+3
source share
5 answers

There are several Drupal modules dedicated to various external (bulk) import scenarios - check this overview for options / comparisons.

If you have very specific needs, you can write your own module using the existing links and tips provided by googletorps (+1) for guidance on how to make the actual insert, ignoring generalizations.

+2
source

The fastest and easiest thing is to make the material with a small Drupal module that you do for this case, instead of sending a lot of messages to the server and wasting resources on loading the node and what not.

Anyway, what you need for this is very similar to what the mac answers here :

file_field, cck, , node. , , node.

db , , , drupal, Drupal api. API- drupal , db_set_active()

+2

.

, :

, :

  • POST:, googletorp, .
  • script:, ( / ) API- drupal, , , , node. - PHP , (. index.php xmlrpc.php, , ), : , , .

, :

  • ! googletorp, , CCK .
  • , ... , !;)

, , , - . :

  • : , , . , . , , .. ..
  • XML:. , PHP- SimpleXML Xpath + PHP , . . , ... . , , , ( , , ...) , -, , , - .
  • Webservice: , , . , "" -, , : ", , " - " , 127, , ?" - " ... : 127 3 !". . Drupal -, webservice , : .

!

+2

CCK , POST (), , , .

0

MySQL, Migrate . :

... provides a flexible structure for transferring content to Drupal from other sources (for example, when converting a website from another CMS to Drupal). Native support for creating basic Drupal objects, such as nodes, users, files, conditions and comments, is included - it can be easily expanded to transfer other types of content. Content is imported and rolled back using the associated web interface (Migrate UI module) or includes Drush commands (highly recommended).

0
source

Source: https://habr.com/ru/post/1724106/


All Articles