PHPIndex

This page lists files in the current directory. You can view content, get download/execute commands for Wget, Curl, or PowerShell, or filter the list using wildcards (e.g., `*.sh`).

i18n
configure.phtml
wget 'https://sme10.lists2.roe3.org/FreshRSS/lib/core-extensions/UserCSS/configure.phtml'
View Content
<?php
	declare(strict_types=1);
	/** @var UserCSSExtension $this */
?>
<form action="<?= _url('extension', 'configure', 'e', urlencode($this->getName())); ?>" method="post">
	<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
	<div class="form-group">
		<label class="group-name" for="css-rules"><?= _t('ext.user_css.write_css') ?></label>
		<div class="group-controls">
			<textarea name="css-rules" id="css-rules"><?= $this->css_rules ?></textarea>
		</div>
	</div>

	<div class="form-group form-actions">
		<div class="group-controls">
			<button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
			<button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
		</div>
	</div>
</form>
extension.php
wget 'https://sme10.lists2.roe3.org/FreshRSS/lib/core-extensions/UserCSS/extension.php'
View Content
<?php
declare(strict_types=1);

final class UserCSSExtension extends Minz_Extension {
	public string $css_rules = '';
	private const FILENAME = 'style.css';

	#[\Override]
	public function init(): void {
		parent::init();

		$this->registerTranslates();
		if ($this->hasFile(self::FILENAME)) {
			Minz_View::appendStyle($this->getFileUrl(self::FILENAME, 'css', false));
		}
	}

	#[\Override]
	public function handleConfigureAction(): void {
		parent::init();

		$this->registerTranslates();

		if (Minz_Request::isPost()) {
			$css_rules = html_entity_decode(Minz_Request::paramString('css-rules'));
			$this->saveFile(self::FILENAME, $css_rules);
		}

		$this->css_rules = '';
		if ($this->hasFile(self::FILENAME)) {
			$this->css_rules = htmlentities($this->getFile(self::FILENAME) ?? '');
		}
	}
}
metadata.json
wget 'https://sme10.lists2.roe3.org/FreshRSS/lib/core-extensions/UserCSS/metadata.json'
View Content
{
	"name": "User CSS",
	"author": "hkcomori, Marien Fressinaud",
	"description": "Give possibility to overwrite the CSS with a user-specific rules.",
	"version": "1.0.0",
	"entrypoint": "UserCSS",
	"type": "user"
}