Created
December 14, 2020 15:48
-
-
Save ipranjal/6f7be87046f5dc9a41f751cd52cb3662 to your computer and use it in GitHub Desktop.
Bash Script for generating Elgg plugin skeleton [2.x - 3.x]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#name: pluginSkeleton | |
#author: Pranjal Pandey | |
#Installation: Put file in root folder | |
#usage ./pluginSkeleton <pluginName> | |
if [ $# -eq 0 ]; then | |
echo "Plugin Name is Missing" | |
else | |
echo mkdir -p "mod/$1/actions/$1/" | bash -x | |
echo mkdir -p "mod/$1/classes/" | bash -x | |
echo mkdir -p "mod/$1/languages/" | bash -x | |
echo mkdir -p "mod/$1/vendors/" | bash -x | |
echo mkdir -p "mod/$1/views/default/$1/" | bash -x | |
echo mkdir -p "mod/$1/views/default/forms/$1/" | bash -x | |
echo mkdir -p "mod/$1/views/default/object/" | bash -x | |
echo mkdir -p "mod/$1/views/default/plugins/$1/" | bash -x | |
echo mkdir -p "mod/$1/views/default/resources/$1/" | bash -x | |
echo mkdir -p "mod/$1/views/default/widgets/$1_widget/" | bash -x | |
echo touch "mod/$1/start.php" | bash -x | |
echo touch "mod/$1/elgg-plugin.php" | bash -x | |
echo touch "mod/$1/manifest.xml" | bash -x | |
echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plugin_manifest xmlns=\"http://www.elgg.org/plugin_manifest/1.8\">\n\t<name>Example Plugin</name>\n\t<id>$1</id>\n\t<description>This is a simple example of a manifest file. </description>\n\t<author>your name</author>\n\t<version>1.0</version>\n\t<requires>\n\t\t<type>elgg_release</type>\n\t\t<version>3.3</version>\n\t</requires>\n</plugin_manifest>" >> "mod/$1/manifest.xml" | |
echo -e "<?php \n | |
return function () { | |
elgg_register_event_handler('init', 'system', '$1_init'); | |
};\n | |
function $1_init() | |
{\n | |
} | |
" >> "mod/$1/start.php" | |
fi |
hsgupta03
commented
Nov 7, 2021
via email
Hi, Mr. Pranjal
I am Dr. Hari Shankar Gupta, looking forward for your help for my elgg based project. Please provide me your contact number, so, that I can call you personally.
Thanks
With regards
Dr Hari Shankar Gupta
Mob. 9235899099, 9335046210
On Saturday, 19 December 2020 Pranjal Pandey ***@***.***> wrote:
@physcocode commented on this gist.
@hsgupta03 yes it is possible with using something like Agora , but right now I am running a little out of cash and focusing a bit on for profit projects :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Hi, Mr. Pranjal I am Dr. Hari Shankar Gupta, looking forward for your help for my elgg based project. Please provide me your contact number, so, that I can call you personally. Thanks With regards Dr Hari Shankar Gupta Mob. 9235899099, 9335046210 On Saturday, 19 December 2020 Pranjal Pandey @.***> wrote: @physcocode commented on this gist. @hsgupta03 yes it is possible with using something like Agora , but right now I am running a little out of cash and focusing a bit on for profit projects :) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
dropped you a message
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment