Moved plugins location

This commit is contained in:
saintly2k 2023-05-30 00:12:25 +02:00
parent 4bafec8ee5
commit ceba1000e3
8 changed files with 0 additions and 139 deletions

View File

@ -1,14 +0,0 @@
<?php
/* ************************************************************ *
* Name: Get Rel *
* Author: Saintly *
* Website: https://h33t.moe *
* Last Updated: 13.02.2023 *
* ------------------------------------------------------------ *
* This plugin is used to get if rel isset per get request and *
* if it is "rel", it assigns it to smarty. *
* ************************************************************ */
if (isset($_GET["rel"]) && !empty($_GET["rel"]))
$smarty->assign("rel", clean($_GET["rel"]));

View File

@ -1 +0,0 @@
Keep this, GitHub!

View File

@ -1,17 +0,0 @@
<?php
/* ************************************************************ *
* Name: Daisy Theme *
* Author: Saintly *
* Website: https://h33t.moe *
* Last Updated: 28.01.2023 *
* ------------------------------------------------------------ *
* This plugin gets the cookie "{prefix}_daisytheme" and pushes *
* it to Smarty as a variable. *
* ************************************************************ */
$daisytheme = cat($_COOKIE[cat($config["title"]) . "_daisytheme"] ?? "light");
if (isset($smarty)) {
$smarty->assign("daisytheme", $daisytheme);
unset($daisytheme);
}

View File

@ -1,20 +0,0 @@
<?php
/* ************************************************************ *
* Name: Logo Image *
* Author: Saintly *
* Website: https://h33t.moe *
* Last Updated: 28.01.2023 *
* ------------------------------------------------------------ *
* This plugin checks if the logo in the theme folder exists *
* and pushes it to Smarty. If it doesn't exist, it will assign *
* and empty value to "logoImage". *
* ************************************************************ */
$usertheme = getUserTheme($logged, $user["theme"] ?? "");
$logoImage = file_exists(ps(__DIR__ . "/../../../public/assets/{$usertheme}/logo.png")) ? "assets/{$usertheme}/logo.png" : "";
if (isset($smarty)) {
$smarty->assign("logoImage", $logoImage);
unset($logoImage);
unset($usertheme);
}

View File

@ -1,25 +0,0 @@
<?php
/* ************************************************************ *
* Name: Read Chapters *
* Author: Saintly *
* Website: https://h33t.moe *
* Last Updated: 24.02.2023 *
* ------------------------------------------------------------ *
* Gets all read chapters from Database and puts the into an *
* array which gets pushed to Smarty. *
* ************************************************************ */
if ($logged) {
$readChapters = $db["readChapters"]->findBy(["user", "==", $user["id"]]);
$_readChapters = array();
foreach ($readChapters as $key => $ch) {
array_push($_readChapters, $ch["chapter"]);
}
if (isset($smarty))
$smarty->assign("readChapters", $_readChapters);
unset($ch);
unset($_readChapters);
unset($readChapters);
}

View File

@ -1,32 +0,0 @@
<?php
/* ************************************************************ *
* Name: Simple Alert *
* Author: Saintly *
* Website: https://h33t.moe *
* Last Updated: 28.01.2023 *
* ------------------------------------------------------------ *
* This plugin gets the latest Alert and assigns it to Smarty. *
* ************************************************************ */
/*
// Alert structure:
$data = array(
"type" => "info", // "", "info", "success", "warning", "error"
"content" => "Welcome to {$config["title"]}! To use all the functions such as commenting or Bookmarking, please create a free acount!",
"timestamp" => now()
);
// Database Insert
$db["alerts"]->insert($data);
*/
$topAlert = $db["alerts"]->findAll(["id" => "DESC"], 1);
if (!empty($topAlert)) $topAlert = $topAlert[0];
$readAlert = !empty($topAlert) ? ($logged ? (!empty($db["alertReads"]->findOneBy([["user", "=", $user["id"]], "AND", ["alert", "=", $topAlert["id"]]])) ? true : false) : false) : false;
if (isset($smarty)) {
$smarty->assign("topAlert", $topAlert);
$smarty->assign("readAlert", $readAlert);
unset($topAlert);
unset($readAlert);
}

View File

@ -1,4 +0,0 @@
<?php
if (!file_exists(ps(__DIR__ . "/../../secrets/started.txt"))) die("started.txt is missing. did you install the software properly?");
$started = file_get_contents(ps(__DIR__ . "/../../secrets/started.txt"));

View File

@ -1,26 +0,0 @@
<?php
/* ************************************************************ *
* Name: User Langs *
* Author: Saintly *
* Website: https://h33t.moe *
* Last Updated: 28.01.2023 *
* ------------------------------------------------------------ *
* This Plugin is used to get all the languages and put *
* them into an array and push that to Smarty. *
* ************************************************************ */
$userlangs = glob(ps(__DIR__ . "/../../langs/*.php"));
$_userlangs = array();
foreach ($userlangs as $userlang) {
unset($lang);
require_once $userlang;
$lang["info"]["code"] = substr(basename($userlang), 0, -4);
array_push($_userlangs, $lang["info"]);
}
if (isset($smarty)) {
$smarty->assign("userlangs", $_userlangs);
unset($lang);
// unset($userlangs);
unset($_userlangs);
}