Для того чтобы создать в ELGG новый плагин (модуль), первым делом, необходимо создать правильную структуру директорий. Помочь в этом может разработаный Оскаром Кастро (Oscar Castro) простой bash-скрипт
#!/bin/bash #name: pluginSkeleton #Author: @Kareste #Installation: Put file in mod/ #usage ./pluginSkeleton if [ $# -eq 0 ]; then echo "Plugin Name is Missing" else echo mkdir -p "$1/actions/$1/" | bash -x echo mkdir -p "$1/classes/" | bash -x echo mkdir -p "$1/graphics/" | bash -x echo mkdir -p "$1/js/" | bash -x echo mkdir -p "$1/languages/" | bash -x echo mkdir -p "$1/lib/" | bash -x echo mkdir -p "$1/pages/$1/" | bash -x echo mkdir -p "$1/vendors/" | bash -x echo mkdir -p "$1/views/default/$1/" | bash -x echo mkdir -p "$1/views/default/forms/" | bash -x echo mkdir -p "$1/views/default/js/" | bash -x echo mkdir -p "$1/views/default/object/$1" | bash -x echo mkdir -p "$1/views/default/plugins/$1/" | bash -x echo mkdir -p "$1/views/default/widgets/$1_widget/" | bash -x echo touch "$1/start.php" | bash -x echo touch "$1/manifest.xml" | bash -x echo -e "nntExample ManifestntElggnt1.0ntThis is a simple example of a manifest file. In this example, there are not screenshots, dependencies, or additional information about the plugin.ntnttelgg_versionntt2011010401ntn" >> "$1/manifest.xml" fi
Источник: http://community.elgg.org/pg/pages/view/723878/plugin-skeleton-script-bash
Автор: Sergiy Kamolov