diff --git a/addons/plugins/EsoDes/README.md b/addons/plugins/EsoDes/README.md new file mode 100644 index 0000000..1c23089 --- /dev/null +++ b/addons/plugins/EsoDes/README.md @@ -0,0 +1,29 @@ +# EsoTalk Description Pluigin +Adds a description next to Forum Title. + +## Installation + +Upload plugin to addons/plugin folder. + +Navigate to the the admin/plugins page and activate the Forum Description plugin. + +## Copy the following css code to `base.css` + + +/* Description */ +.item-description{ + font-size: 14px; + color: #888888; + margin:0; display:inline; + float: left !important; + padding-top: 11px; + top: 12px; + position: absolute !important; + margin-left: -10px; + overflow: hidden; + +} + + + +# Done \ No newline at end of file diff --git a/addons/plugins/EsoDes/icon.png b/addons/plugins/EsoDes/icon.png new file mode 100644 index 0000000..4784892 Binary files /dev/null and b/addons/plugins/EsoDes/icon.png differ diff --git a/addons/plugins/EsoDes/index.html b/addons/plugins/EsoDes/index.html new file mode 100644 index 0000000..e69de29 diff --git a/addons/plugins/EsoDes/plugin.php b/addons/plugins/EsoDes/plugin.php new file mode 100644 index 0000000..a92b231 --- /dev/null +++ b/addons/plugins/EsoDes/plugin.php @@ -0,0 +1,65 @@ + "论坛描述", + "description" => "允许管理员添加论坛描述到论坛logo之后", + "version" => "0.1", + "author" => "Mustafa Bozkurt", + "authorEmail" => "info@paylasbunu.com", + "authorURL" => "http://paylasbunu.com", + "license" => "MIT", + "dependencies" => array( + "esoTalk" => "1.0.0g5" + ) +); + + +class ETPlugin_EsoDes extends ETPlugin { + + public function init() + { + ET::define("message.forumDesHelp", "You can customize view of the description via CSS."); + } + + public function handler_init($sender, $menu = 0) + { + if ($forumDes = C("EsoDes.forumDes")) { + $sender->addToMenu("main", "description", "$forumDes"); + $sender->addCSSFile($this->Resource("description.css")); + + } + } + + + + // Construct and process the settings form. + public function settings($sender) + { + // Set up the settings form. + $form = ETFactory::make("form"); + $form->action = URL("admin/plugins/settings/EsoDes"); + $form->setValue("forumDes", C("EsoDes.forumDes")); + + // If the form was submitted... + if ($form->validPostBack()) { + + // Construct an array of config options to write. + $config = array(); + $config["EsoDes.forumDes"] = $form->getValue("forumDes"); + + // Write the config file. + ET::writeConfig($config); + + $sender->message(T("message.changesSaved"), "success autoDismiss"); + $sender->redirect(URL("admin/plugins")); + + } + + $sender->data("EsoDesSettingsForm", $form); + return $this->view("settings"); + } + +} diff --git a/addons/plugins/EsoDes/resources/description.css b/addons/plugins/EsoDes/resources/description.css new file mode 100644 index 0000000..967ad5b --- /dev/null +++ b/addons/plugins/EsoDes/resources/description.css @@ -0,0 +1,12 @@ +.item-description{ + font-size: 14px; + color: #888888; + margin:0; display:inline; + float: left !important; + padding-top: 11px; + top: 12px; + position: absolute !important; + margin-left: -10px; + overflow: hidden; + +} diff --git a/addons/plugins/EsoDes/views/settings.php b/addons/plugins/EsoDes/views/settings.php new file mode 100644 index 0000000..2a48f5d --- /dev/null +++ b/addons/plugins/EsoDes/views/settings.php @@ -0,0 +1,28 @@ + +open(); ?> + +