Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/theyoungdesigners_com/modules/themeStore/ |
Upload File : |
<?php
namespace modules\themeStore;
class main extends \moduleMain {
use \modules\config\traits {
\modules\config\traits::__construct as __ConstructConfig;
}
use \modules\output\traits {
\modules\output\traits::__construct as __ConstructOutput;
}
public function __construct() {
$this->__ConstructConfig();
$this->__ConstructOutput();
}
public function Activate() {
}
public function Button(&$result, $text, $logoclass = 'fa-envelope-o', $colorclass = 'cc-gray', $outline = FALSE) {
if ($result == '') {
if ($logoclass != '') {
if (!preg_match('~\b(fa|fab|fas|far)\b~', $logoclass)) {
$logoclass = 'fa ' . $logoclass;
}
$result = <<<BLOCK
<span class="themeButton $colorclass"><i class="fa-icon $logoclass"></i><span class="btn-text logo">$text</span></span>
BLOCK;
} else {
$result = <<<BLOCK
<span class="themeButton $colorclass"><span class="btn-text">$text</span></span>
BLOCK;
}
}
}
public function __favicon(&$html) {
$base = $this->StaticUriModule(__DIR__);
$html = "<link type=\"image/svg\" rel=\"icon\" href=\"{$base}/bowling-ball-solid.svg\"><!-- from fontawesome -->";
}
// load html, css, javascript for the theme
public function Load() {
$base = $this->StaticUriModule(__DIR__);
Hook_add('html.button', [$this, 'Button']);
hook_add('html.favicon', [ $this, '__favicon' ], 10);
hook_add('page.footer', [ $this, '__footer' ], 90); // default footer, if nothing else is generated
// themes are loaded last - too late to install hooks
$ext = $this->getJsExtension();
// $id = $this->IncludeFile("$base/jquery-3.2.1.min.js", 'jquery');
// if (!$config->debug) $id->Integrity('sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=')->CrossOrigin('anonymous');
// $id->tag('jquery');
$this->IncludeFile("$base/handlebars.min.js")
->Version('4.0.6');
$this->IncludeFile("$base/jquery-ui.css")
->Version('1.12.1');
$this->IncludeFile("$base/jquery-ui.min.js", 'jquery-ui')
->Version('1.12.1')
->depends('jquery');
// https://cdnjs.com/libraries/font-awesome/5.12.0-1
$this->IncludeFile("$base/fontawesome.all.min.css", 'awesome')
->Version('5.12.0-1');
$id = $this->IncludeFile('');
$javascript = <<<'BLOCK'
$(function() { // add class to body when scrolling
$(document).on('scroll', debounce(function(e) {
let $container = $('html').first();
window.scrollY > 0 ? $container.addClass('fixed') : $container.removeClass('fixed');
}, 100));
});
BLOCK;
$id->JavascriptCommand($javascript, 0);
}
public function run($data) {
$navigation = [];
header('Content-type: text/html; charset=utf-8');
echo $this->render($navigation, $data);
}
// all items are on a single line, with separators
private function GenerateSingleLineMenu_html($menu, $icononly = FALSE) {
$output = '';
foreach((array)$menu as $menu_item) {
if ($icononly) {
$line = $menu_item['icon'];
} else {
$line = $menu_item['caption'];
}
$class = $menu_item['class'] ?? '';
$hint = $menu_item['hint'] ?? '';
$rel = $menu_item['rel'] ?? '';
if ($hint != '' && ($menu_item['href'] ?? '') == '/account')
continue;
if ($hint != '') $hint = ' title="' . htmlspecialchars($hint) . '"';
if ($rel != '') $hint .= " rel=\"$rel\"";
if (!empty($menu_item['href']) && $menu_item['href'] != 'false') { // != '' && $menu_item['href'] !== FALSE
if ($class != '') {
$line = "<a class=\"$class\" href=\"{$menu_item['href']}\"$hint>$line</a>";
} else {
$line = "<a href=\"{$menu_item['href']}\"$hint>$line</a>";
}
} elseif ($class != '' || $hint != '') {
$line = "<span class=\"$class\"$hint>$line</span>";
}
$output .= '<span class="menuitem-single">' . $line . '</span>';
}
return $output;
}
private function retrieveMenu($menuname) {
$info = hook_execute('menu.' . $menuname, []);
// sort by display order?
return $info;
}
public function getCompany() {
$settings = $this->SettingGet('config.module_info', NULL);
return $settings['companyname'] ?? 'Acme Corporation';
}
public function __footer(&$html) {
if (empty($html)) {
$menu = $this->RetrieveMenu('menu3'); // Footer - SingleLine Menu
$menu3 = $this->GenerateSingleLineMenu_html($menu);
$footer = <<<BLOCK
<div class="body-container footer">
<div class="footer-container">
<div class="main-col footer-line-1">
<span class="t2">{$menu3}</span>
</div>
</div>
</div>
BLOCK;
$html = "<div class=\"body-container footer\">{$footer}</div>";
}
}
private function render($navigation, $page_data) {
$base = $this->StaticUriModule(__DIR__);
$ext = $this->getJsExtension();
hook_execute('html.prepare', $this, $page_data);
// any files included here are at the end of the list
$this->IncludeFile("/static/jquery.jeditable.css");
$this->IncludeFile("/static/jquery.jeditable$ext")->depends('jquery');
$this->IncludeFile($base . '/template.css');
$title = $this->Title();
if ($title !== NULL) {
$dtitle = '<title>' . htmlspecialchars($title) . "</title>\n";
} else {
$dtitle = '';
}
$menu1 = $new_nav = '';
$menu = $this->RetrieveMenu('menu2'); // profile menu
$menu2 = $this->GenerateSingleLineMenu_html($menu, TRUE);
$body = $this->body();
if ($body === null) $body = '';
$body = $this->hook_apply_late($body);
$inc = hook_execute('html.head', '');
$favicon = $this->favIcon();
$header_item_1 = $this->OutputGet('header_item_1', '<div class="pai_logo hdr-image"></div>');
$header_item_2 = $this->OutputGet('header_item_2', '');
$page_class = $this->OutputGet('page_class', '');
$companyname = htmlspecialchars($this->getCompany());
$tagline = $this->settings['tagline'] ?? '';
$tagline2 = $this->settings['tagline2'] ?? '';
$pageheader = hook_exists('page.header') ? hook_execute('page.header', '') : ''; // content header. eg carousel
$pagefooter = hook_exists('page.footer') ? hook_execute('page.footer', '') : ''; // visible footer on the page
$htmlfooter = hook_exists('html.footer') ? hook_execute('html.footer', '') : ''; // javascript just before closing </body>
$html = <<<BLOCK
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
{$favicon}{$dtitle}{$inc}
</head>
<body>
<div class="page-outer">
<div class="page-inner $page_class">
<div class="header-container">
<div class="page-center">
<div class="header-line-1"><div class="nav-container-0">{$menu1}</div><div class="nav-container-1">$new_nav</div></div>
<div id="headergraphic" class="header main-col">
<div class="setup_logo"><div class="logo-tyd"></div></div>
<div class="header-title">{$companyname}</div>
<div class="header-tag">{$tagline}</div>
<div class="header-tag2">{$tagline2}</div>
<div class="nav-container-2">{$menu2}</div>
</div>
{$header_item_2}
</div>
</div>
</div>
{$pageheader}
<div class="page-inner $page_class">
<div class="page-center">
<div class="page-container">
<div class="body-container">
<article class="body main-col font8">$body
</article>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
{$pagefooter}
</div>
<div class="popup-dialog" style="display:none"></div>
{$htmlfooter}
</body>
</html>
BLOCK;
return $html;
}
}