mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Allow all tags on articles
This commit is contained in:
parent
9bf63db499
commit
10f6b2f510
1 changed files with 48 additions and 47 deletions
|
@ -1,47 +1,48 @@
|
||||||
<?php
|
<?php
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||||
|
|
||||||
class Articles extends PluginAbstract {
|
class Articles extends PluginAbstract {
|
||||||
public function getTags() {
|
public function getTags() {
|
||||||
return array(
|
return array(
|
||||||
PluginTags::$FREE
|
PluginTags::$FREE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDescription() {
|
public function getDescription() {
|
||||||
global $global;
|
global $global;
|
||||||
$str = "Create rich text articles";
|
$str = "Create rich text articles";
|
||||||
$alert = "";
|
$alert = "";
|
||||||
$dir = $global['systemRootPath'] . 'vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer';
|
$dir = $global['systemRootPath'] . 'vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer';
|
||||||
if (!is_writable($dir)) {
|
if (!is_writable($dir)) {
|
||||||
$alert = "<div class='alert alert-danger'>Your directory must be writable<br><code>sudo chmod 777 {$dir}</code></div>";
|
$alert = "<div class='alert alert-danger'>Your directory must be writable<br><code>sudo chmod 777 {$dir}</code></div>";
|
||||||
}
|
}
|
||||||
return $str.$alert;
|
return $str.$alert;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName() {
|
public function getName() {
|
||||||
return "Articles";
|
return "Articles";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUUID() {
|
public function getUUID() {
|
||||||
return "articles-91db-4357-bb10-ee08b0913778";
|
return "articles-91db-4357-bb10-ee08b0913778";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmptyDataObject() {
|
public function getEmptyDataObject() {
|
||||||
global $global;
|
global $global;
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$obj->allowAttributes = false;
|
$obj->allowAttributes = false;
|
||||||
$obj->allowCSS = false;
|
$obj->allowCSS = false;
|
||||||
return $obj;
|
$obj->allowAllTags = false;
|
||||||
}
|
return $obj;
|
||||||
|
}
|
||||||
public function getPluginMenu() {
|
|
||||||
global $global;
|
public function getPluginMenu() {
|
||||||
$btn = '<a href="' . $global['webSiteRootURL'] . 'plugin/Articles/updateDescriptions.php" class="btn btn-default btn-xs btn-block" target="_blank">'.__('Update Old Descriptions').'</a>';
|
global $global;
|
||||||
$btn .= '<a href="' . $global['webSiteRootURL'] . 'plugin/Articles/updateDescriptionsRemoveTags.php" class="btn btn-default btn-xs btn-block" target="_blank">'.__('Revert Descriptions to NON-HTML').'</a>';
|
$btn = '<a href="' . $global['webSiteRootURL'] . 'plugin/Articles/updateDescriptions.php" class="btn btn-default btn-xs btn-block" target="_blank">'.__('Update Old Descriptions').'</a>';
|
||||||
return $btn;
|
$btn .= '<a href="' . $global['webSiteRootURL'] . 'plugin/Articles/updateDescriptionsRemoveTags.php" class="btn btn-default btn-xs btn-block" target="_blank">'.__('Revert Descriptions to NON-HTML').'</a>';
|
||||||
}
|
return $btn;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue