* @author Christian Weiske * @author Eric Dane * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ /** * SemanticScuttle HTML templating system. * This templating system is really, really simple and based * on including php files while proving a set of * variables in the template scope. * When rendering templates, they are directly echoed to the * browser. There is no in-built way to capture their output. * * @category Bookmarking * @package SemanticScuttle * @author Benjamin Huynh-Kim-Bang * @author Christian Weiske * @author Eric Dane * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ class SemanticScuttle_Model_Template { /** * Array of variables to be available in template * scope. * * @var array */ protected $vars = array(); /** * File name of template */ protected $file = ''; /** * Template service instance * * @var SemanticScuttle_Service_Template */ protected $ts; /** * Create a new template instance * * @param string $file Template filename, * full path * @param array $vars Template variables * @param SemanticScuttle_Service_Template $ts Template service */ public function __construct( $file, $vars = null, SemanticScuttle_Service_Template $ts = null ) { $this->vars = $vars; $this->file = $file; $this->ts = $ts; } /** * Sets variables and includes the template file, * causing it to be rendered. * * @return void */ public function parse() { if (isset($this->vars)) { extract($this->vars); } include $this->file; } /** * Loads another template * * @param string $file Filename of template, relative * to template directory * * @return SemanticScuttle_Service_Template Template object */ public function includeTemplate($file) { return $this->ts->loadTemplate($file, $this->vars); } } ?>tr> 2021-02-20Updates scripts: 2435cb2 Feat: anarchronofileSilvio Rhatto 2021-02-20Updates scripts: c88ec35 Fix: export-firefox-bookmarks: support for a single ...Silvio Rhatto 2021-02-20Updates scripts: 294bcbb Feat: adds catcodeSilvio Rhatto 2021-02-20Updates scripts: 70ad3f0 Feat: tombopen: check for git-annexSilvio Rhatto 2021-02-20Updates scripts: 45bce1a Feat: adds tombopenSilvio Rhatto 2021-02-20Updates scripts: 85ef0c7 Feat: adds urlmdSilvio Rhatto 2021-02-19Updates scripts: 4df464e Fix: urlinfo verbositySilvio Rhatto 2021-02-19Updates scripts: b06f58a Feat: keyringer-export-pads: support for a single padSilvio Rhatto 2021-02-19Updates scripts: aae2381 Fix: export-firefox-bookmarksSilvio Rhatto 2021-02-19Updates scripts: d2d1268 Feat: adds urlssaveSilvio Rhatto 2021-02-19Updates scripts: 835d41f Feats: enhance urlinfo and creates urlsaveSilvio Rhatto 2021-02-14Updates scripts: fd636e5 Feat: urlinfo scriptSilvio Rhatto 2021-02-13Updates scripts: 0f985c6 Adds gallery wrapperSilvio Rhatto 2021-02-12Updates scripts: 2f12b37 Fix: scuttle improvementsSilvio Rhatto 2021-02-10Updates scripts: 9c79018 Fix: scuttle: use urlencode from curlSilvio Rhatto 2021-02-10Updates scripts: 167f0bf Scuttle: fix title fetchingSilvio Rhatto 2021-01-27Updates scripts: d7515f6 Fix: scuttle: torifySilvio Rhatto 2020-12-06Updates scripts: e704891 Fix: show: restrict filelist to some file extensionsSilvio Rhatto 2020-12-04Updates scripts: 81a0049 Feat: dict wrapperSilvio Rhatto 2020-11-10Updates scripts: e55f604 Feat: improve show scriptSilvio Rhatto 2020-11-03Updates scripts: 13876e9 Fix: use --refreshSilvio Rhatto 2020-11-02Updates scripts: 4d4d59e Feat: show: do not refresh file list automaticallySilvio Rhatto 2020-11-02Updates scripts: 98d4204 Feat: show: fixes (6)Silvio Rhatto 2020-11-02Updates scripts: 04451c1 Feat: show: fixes (5)Silvio Rhatto 2020-11-02Updates scripts: 1e5b4c7 Feat: show: fixes (4)Silvio Rhatto 2020-11-02Updates scripts: d64f0bf Feat: show: fixes (2)Silvio Rhatto 2020-11-02Updates scripts: 328610e Feat: show: fixesSilvio Rhatto 2020-11-02Updates scripts: 5c1c193 Feat: show: automatically update the filelistSilvio Rhatto 2020-11-02Updates scripts: aac6cc1 Show: use a filelistSilvio Rhatto 2020-10-01Updates scripts: 3d03267 Initial version of export-firefox-bookmarksSilvio Rhatto 2020-09-03Updates scripts: 9bd4c3a Feat: add basic show scriptSilvio Rhatto 2020-08-16Updates scripts: 8d7d159 Adds export-koreader-noteSilvio Rhatto 2020-08-01Updates scripts: 01b544d Support for subcollections with spaces at sync-to-koboSilvio Rhatto 2020-07-24Updates scripts: 9a4954b Adds export-padSilvio Rhatto 2020-06-28Updates scripts: 3311f24 VNC: instructionsSilvio Rhatto 2020-06-23Updates scripts: 7a6b5da Status alias at timew-shellSilvio Rhatto 2020-06-21Updates scripts: c7eda33 Delete files at sync-to-koboSilvio Rhatto 2020-06-21Updates scripts: 52da8aa Exclude sdr folders at sync-to-koboSilvio Rhatto 2020-06-19Updates scripts: 8d37d42 Adds status command to timew-shellSilvio Rhatto 2020-05-10Updates scripts: 5af1413 Rename receive/send from/to kobo as sync-from-kobo a...Silvio Rhatto 2020-05-09Updates scripts: 25526ea Adds send-to-koboSilvio Rhatto 2019-10-22Updates scripts: 2610a49 Adds timew-shellSilvio Rhatto 2019-08-12Updates scripts: 653356d Adds xls extensions into dangling-archiveSilvio Rhatto 2019-08-06Updates scripts: 28ffe99 Fixes for android-restoreSilvio Rhatto 2019-06-02Updates scripts: d9b125e Adds doi2bibSilvio Rhatto 2019-04-03Updates scripts: c3bb7c5 Video support at dangling-archiveSilvio Rhatto 2019-03-18Updates scripts: 5d2fb4e Updates dangling-archiveSilvio Rhatto 2019-03-17Updates scripts: ae55bf6 Dangling archive: more patterns and noise supportSilvio Rhatto 2019-03-11Updates scripts: 1253a53 VNC: support for a default serverSilvio Rhatto