FileField

Drupal 7 Field API - Setup a new content type on install and add fields

Mi, 27.04.2011 - 17:21 -- admin

Adding customs Fields on Drupal module installation: Backup from davsblog.me (http://davsblog.me/drupal-7-field-api-setup-a-new-content-type-o). They delete the example, it helped me to understand the function of adding custom Field during Drupal module installation. See also an example at this page: Drupal 7 Adding Custom Content Type with Custom Fields (Field API)

Drupal Node mit Dateianhang über PHP Skript erstellen

Sa, 10.04.2010 - 12:53 -- admin

Ich habe mich mittlerweile etwas mit der Module Entwicklung in Drupal beschäftigt. Irgendwann wollte ich dann direkt aus einem PHP Script neue Nodes erstellen und editieren und Dateien anhängen. Dazu sucht man sich natürlich ein paar bereits fertige Module raus und guckt: "Wie machen die das denn?". So findet man schnell die Funktionen node_save und node_load. Was ich allerdings so direkt nicht finden konnte, waren relativ einfache Funktionen um Dateien an einen Node anzuhängen. Hier brechen sich die meisten einen ab, in dem direkt die Datenbank manipuliert wird.

FileField abonnieren