-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
skywalker512
committed
Jul 8, 2018
1 parent
376f3ef
commit 2dc99c0
Showing
6 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
// Copyright 2015 Mustafa Bozkurt | ||
|
||
if (!defined("IN_ESOTALK")) exit; | ||
|
||
ET::$pluginInfo["EsoDes"] = array( | ||
"name" => "论坛描述", | ||
"description" => "允许管理员添加论坛描述到论坛logo之后", | ||
"version" => "0.1", | ||
"author" => "Mustafa Bozkurt", | ||
"authorEmail" => "[email protected]", | ||
"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"); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
// Copyright 2015 Mustafa Bozkurt | ||
|
||
if (!defined("IN_ESOTALK")) exit; | ||
|
||
$form = $data["EsoDesSettingsForm"]; | ||
?> | ||
<?php echo $form->open(); ?> | ||
|
||
<div class='section'> | ||
|
||
<ul class='form'> | ||
|
||
<li> | ||
<label><?php echo T("Forum Description"); ?></label> | ||
<?php echo $form->input("forumDes", "text"); ?> | ||
<small><?php echo T("message.forumDesHelp"); ?></small> | ||
</li> | ||
|
||
</ul> | ||
|
||
</div> | ||
|
||
<div class='buttons'> | ||
<?php echo $form->saveButton(); ?> | ||
</div> | ||
|
||
<?php echo $form->close(); ?> |