Keyword

RadioWave Template For J4!

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181399 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Part 2:

// Custom global RSS/Atom feeds
if ($this->params->get('nutpFeedLink1') && $this->params->get('nutpFeedLink1Title')) {
$document->addHeadLink($this->params->get('nutpFeedLink1'), 'alternate', 'rel', array('type' => 'application/rss+xml', 'title' => $this->params->get('nutpFeedLink1Title')));
}
if ($this->params->get('nutpFeedLink2') && $this->params->get('nutpFeedLink2Title')) {
$document->addHeadLink($this->params->get('nutpFeedLink2'), 'alternate', 'rel', array('type' => 'application/rss+xml', 'title' => $this->params->get('nutpFeedLink2Title')));
}
if ($this->params->get('nutpFeedLink3') && $this->params->get('nutpFeedLink3Title')) {
$document->addHeadLink($this->params->get('nutpFeedLink3'), 'alternate', 'rel', array('type' => 'application/rss+xml', 'title' => $this->params->get('nutpFeedLink3Title')));
}

// Open Graph
if ($isFrontpage) {
$ogMetaTags = '
<!-- Open Graph -->
<meta property="og:title" content="' . $this->params->get('nutpOpenGraphTitle', $sitename) . '" />
<meta property="og:description" content="' . $this->params->get('nutpOpenGraphDescription', $app->getCfg('MetaDesc')) . '" />
<meta property="og:url" content="' . $this->params->get('nutpOpenGraphURL', $siteurl) . '" />
<meta property="og:type" content="website" />
<meta property="og:image" content="' . $siteurl . $this->params->get('nutpOpenGraphImage', 'templates/' . $this->template . '/includes/images/facebook/facebook.jpg') . '" />
<meta property="fb:app_id" content="' . $this->params->get('nutpFacebookAppID', '') . '" />
';
$document->setMetaData('twitter:card', 'summary');
if ($this->params->get('nutpSocialTwitter')) {
$document->setMetaData('twitter:creator', '@' . $this->params->get('nutpSocialTwitter'));
}
$document->setMetaData('twitter:title', $this->params->get('nutpOpenGraphTitle', $sitename));
$document->setMetaData('twitter:description', $this->params->get('nutpOpenGraphDescription', $app->getCfg('MetaDesc')));
$document->setMetaData('twitter:image', $siteurl . $this->params->get('nutpOpenGraphImage', 'templates/' . $this->template . '/images/defaults/facebook.jpg'));
}
// Apple Touch Icons
$document->addHeadLink($this->params->get('nutpIconIOS57x57', $templatePath . '/includes/images/ios/icon.png'), 'apple-touch-icon', 'rel');
$document->addHeadLink($this->params->get('nutpIconIOS72x72', $templatePath . '/includes/images/ios/icon-72.png'), 'apple-touch-icon', 'rel', array('sizes' => '72x72'));
$document->addHeadLink($this->params->get('nutpIconIOS114x114', $templatePath . '/includes/images/ios/[email protected]'), 'apple-touch-icon', 'rel', array('sizes' => '114x114'));
$document->addHeadLink($this->params->get('nutpIconIOS144x144', $templatePath . '/includes/images/ios/[email protected]'), 'apple-touch-icon', 'rel', array('sizes' => '144x144'));

// Remove the canonical meta tag in Joomla! 3.x
if (version_compare(JVERSION, '3.0', 'ge') !== false && $this->params->get('nutpRemoveCanonicalMeta', 0)) {
foreach ($document->_links as $key => $link) {
if ($link == 'canonical') {
unset($document->_links[$key]);
}
}
}

// Force load Bootstrap
if (version_compare(JVERSION, '3.0', 'ge') !== false && $this->params->get('nutpForceLoadBootstrap', 0)) {
JHtml::_('bootstrap.framework');
}

/*
Set the <body> class
*/
$nuBodyClass = '';
if ($isFrontpage) {
$nuBodyClass .= ' isFrontpage';
}
if ($view) {
$nuBodyClass .= ' viewIs' . ucfirst($view);
}
if ($layout) {
$nuBodyClass .= ' layoutIs' . ucfirst($layout);
}
if ($page) {
$nuBodyClass .= ' pageIs' . ucfirst($page);
}
if ($task) {
$nuBodyClass .= ' taskIs' . ucfirst($task);
}
if ($id) {
$nuBodyClass .= ' idIs' . ucfirst($id);
}
if ($itemid) {
$nuBodyClass .= ' itemIdIs' . ucfirst($itemid);
}
if ($tmpl) {
$nuBodyClass .= ' tmplIs' . ucfirst($tmpl);
}
if ($tmpl == 'component') {
$nuBodyClass .= ' contentpane component componentWrapper componentContainer';
}
if ($tmpl == 'raw') {
$nuBodyClass .= ' rawWrapper';
}
$nuBodyClass = trim($nuBodyClass);

/*
Special Template Positions
*/
$nuHeadTop = ($this->params->get('nutpHeadTop')) ? $this->params->get('nutpHeadTop') . "\n" : '';
if (version_compare(JVERSION, '3.0', 'ge') === false) {
$nuHeadTop .= $topMetaTags;
}

$nuHeadBottom = $this->params->get('nutpHeadBottom');
$nuHeadBottom .= (isset($ogMetaTags)) ? $ogMetaTags : '';
$nuHeadBottom .= '
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<![endif]-->
';
if ($this->params->get('nutpGAID')) {
$nuHeadBottom .= '
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'UA-' . $this->params->get('nutpGAID') . '\']);';
if ($this->params->get('nutpGADomain')) {
$nuHeadBottom .= '
_gaq.push([\'_setDomainName\', \'.' . $this->params->get('nutpGADomain') . '\']);';
}
$nuHeadBottom .= '
_gaq.push([\'_trackPageview\']);

(function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
';
}
$nuHeadBottom = ($nuHeadBottom) ? $nuHeadBottom . "\n" : '';

$nuBodyId = $option;

$nuBodyTop = ($this->params->get('nutpBodyTop')) ? $this->params->get('nutpBodyTop') . "\n" : '';

$nuBodyBottom = ($this->params->get('nutpBodyBottom')) ? $this->params->get('nutpBodyBottom') . "\n" : '';
/*
JS Handling
*/
if (!in_array($tmpl, array('error', 'raw'))) {
// Load Mootools (commented by default)
//JHtml::_('behavior.framework');

// Load jQuery
JHtml::_('jquery.framework');

// Template JS. Do not load in front-end editing.
if (!($option == 'com_k2' && $view == 'item' && ($task == 'add' || $task == 'edit'))) {
$document->addScript(JURI::base(true) . '/templates/' . $this->template . '/js/behaviour.js' . TIMESTAMP);
}

Please Log in or Create an account to join the conversation.

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181400 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Part 3:

// Custom JS
if ($this->params->get('nutpLoadCustomJS', 1)) {
$document->addScript(JURI::base(true) . '/templates/' . $this->template . '/js/custom.js' . TIMESTAMP);
}
}

/*
CSS Handling [CAN EDIT]
*/
// Google Web Fonts
$nutpGoogleWebFonts = $this->params->get('nutpGoogleWebFonts');

if (!is_object($nutpGoogleWebFonts)) {
$nutpGoogleWebFonts = new stdClass;
}

$nutpGoogleWebFonts->urls = array();
$fontsData = array();

// Read fonts from cache. If cache file is not available download from CDN and create it.
$folderPath = JPATH_SITE . '/templates/' . $app->getTemplate() . '/includes/elements/cache/';
$files = JFolder::files($folderPath, '\.json$');

if (!empty($files) && in_array('gwf.json', $files)) {
// A gwf.json fájl megtalálható a megadott mappában
$fontsData = json_decode(file_get_contents($folderPath . 'gwf.json'));
} else {
$form = JForm::getInstance('template.settings', JPATH_SITE . '/templates/' . $app->getTemplate() . '/templateDetails.xml', array('control' => 'jform'), false, '/extension/config');
$field = $form->getField('nutpGoogleWebFonts', 'params');
$fontsData = json_decode(file_get_contents($field->getFile('cdn.joomlaworks.org/gwf/gwf.php')));
}

// Build the URLs array
foreach ($files as $file) {
$fileContent = file_get_contents($folderPath . $file);
$jsonData = json_decode($fileContent);

if ($jsonData && isset($jsonData->family, $jsonData->url)) {
$nutpGoogleWebFonts->urls[$jsonData->family] = $jsonData->url;
}
}
// No value saved in the database, so getName the XML to get the defaults
if ($nutpGoogleWebFonts && !isset($nutpGoogleWebFonts->fonts)) {
jimport('joomla.form.form');
$form = JForm::getInstance('template.settings', JPATH_SITE . '/templates/' . $app->getTemplate() . '/templateDetails.xml', array('control' => 'jform'), false, '/extension/config');
$defaultFonts = $form->getFieldAttribute('nutpGoogleWebFonts', 'default', null, 'params');
if ($defaultFonts) {
$nutpGoogleWebFonts->fonts = explode(',', $defaultFonts);
}
}

// Build the font URL
if ($nutpGoogleWebFonts && isset($nutpGoogleWebFonts->fonts) && is_array($nutpGoogleWebFonts->fonts)) {
$googleWebFonts = array();
$nutpGoogleWebFonts->urls = (array) $nutpGoogleWebFonts->urls;
foreach ($nutpGoogleWebFonts->fonts as $font) {
if ($font) {
// Get URL vars
$fontURL = $nutpGoogleWebFonts->urls[$font];
$fontURLParts = parse_url($fontURL);
parse_str($fontURLParts, $vars);
$googleWebFonts[] = $vars;
}
}
$googleWebFonts = '//fonts.googleapis.com/css?family=' . implode('|', $googleWebFonts) . '&amp;subset=latin,latin-ext,cyrillic,cyrillic-ext,greek,greek-ext,khmer,vietnamese';
}

// Template CSS
switch ($tmpl) {
case 'index':
if (isset($googleWebFonts)) {
$document->addStyleSheet($googleWebFonts);
}
$document->addStyleSheet($siterelpath . '/templates/' . $this->template . '/css/template.css' . TIMESTAMP);
break;
case 'component':
if (isset($googleWebFonts)) {
$document->addStyleSheet($googleWebFonts);
}
$document->addStyleSheet(JURI::base(true) . '/templates/' . $this->template . '/css/component.css' . TIMESTAMP);
break;
case 'raw':
// No CSS for the raw.php sub-template
break;
default:
if (isset($googleWebFonts)) {
$document->addStyleSheet($googleWebFonts);
}
$document->addStyleSheet(JURI::base(true) . '/templates/' . $this->template . '/css/template.css' . TIMESTAMP);
}

Please Log in or Create an account to join the conversation.

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181401 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Part 4:
// Variations
include_once(dirname(__FILE__) . '/variations.php');

// Custom CSS
if ($this->params->get('nutpLoadCustomCSS', 1)) {
$document->addStyleSheet(JURI::base(true) . '/templates/' . $this->template . '/css/custom.css' . TIMESTAMP);
}

Please Log in or Create an account to join the conversation.

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181402 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Part 5:

/*
Social Links/Icons
*/
$socialProviders = array(
"siteSocialFacebook" => "www.facebook.com/",
"siteSocialTwitter" => "twitter.com/",
"siteSocialGooglePlus" => "plus.google.com/",
"siteSocialFoursquare" => "foursquare.com/",
"siteSocialYouTube" => "www.youtube.com/",

Please Log in or Create an account to join the conversation.

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181403 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Part 6:

"siteSocialVimeo" => "vimeo.com/",
"siteSocialDailymotion" => "www.dailymotion.com/",
"siteSocialSoundCloud" => "soundcloud.com/",
"siteSocialMixCloud" => "www.mixcloud.com/",

Please Log in or Create an account to join the conversation.

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181404 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Part 7:

"siteSocialPinterest" => "pinterest.com/",
"siteSocial500px" => "500px.com/",
"siteSocialDribbble" => "dribbble.com/",
"siteSocialBehance" => "www.behance.net/",
"siteSocialGithub" => "github.com/"
);

Please Log in or Create an account to join the conversation.

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181405 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Part 8:

$social = array();
foreach ($socialProviders as $socialProviderParam => $socialProviderURL) {
if ($this->params->get($socialProviderParam) != '') {
$socialObject = new JObject;
$socialObject->name = str_replace('siteSocial', '', $socialProviderParam);
$socialObject->url = $socialProviderURL . $this->params->get($socialProviderParam);
$socialObject->class = strtolower($socialObject->name);
$social[] = $socialObject;
}
}
/* Usage: loop through the $social array of objects */

/*
Meta Tag Processing
*/
// Sort meta tags (for the purists)
// ksort($document->_metaTags);

/*
Template Constants
*/
if (!defined('NU_HEAD_TOP')) {
define('NU_HEAD_TOP', $nuHeadTop);
}
if (!defined('NU_HEAD_BOTTOM')) {
define('NU_HEAD_BOTTOM', $nuHeadBottom);
}
if (!defined('NU_BODY_ID')) {
define('NU_BODY_ID', $nuBodyId);
}
if (!defined('NU_BODY_CLASS')) {
define('NU_BODY_CLASS', $nuBodyClass);
}
if (!defined('NU_BODY_TOP')) {
define('NU_BODY_TOP', $nuBodyTop);
}
if (!defined('NU_BODY_BOTTOM')) {
define('NU_BODY_BOTTOM', $nuBodyBottom);
}
if (!defined('NU_COPYRIGHTS')) {
define('NU_COPYRIGHTS', $copyrightMessage);
}
if (!defined('NU_CREDITS')) {
define('NU_CREDITS', $creditsMessage);
}
if (!defined('NU_CDN')) {
define('NU_CDN', 'cdn.joomlaworks.org');
}

/*
Hiba Naplózás
*/
if (isset($app) && $app instanceof Joomla\CMS\Application\CMSApplication) {
$error = $app->get('error');
if ($error) {
$errorDetails = json_encode($error->toArray(), JSON_PRETTY_PRINT);
error_log('JoomlaWorks Template Error: ' . $errorDetails);
}
}

Please Log in or Create an account to join the conversation.

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181406 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Sorry for spreading the codes, but otherwise I couldn't send this big file.
If the error is not here, it may still be in variations.php, although I found fewer path calls there.
Thank you in advance for your help!
Best Regarts.: Robert

Please Log in or Create an account to join the conversation.

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181407 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
My persistence paid off!
I did it!
The error was when calling the /variations.php file, the /variations.php file should not be called there if it is not the includes/variations.php file.
And lo and behold, it works!
On Joomla4, Radio Wave!
It can be seen here, albeit with empty content:
hirdetnijo.eu/lrt/

Best regards.:

Please Log in or Create an account to join the conversation.

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 2 weeks ago #181422 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Dear Joomla is working!
I would like to ask why I don't get help when I ask for it?
As far as I know, this is a help-seeking and support forum, where on the subscriber4 page, however, I have never received anything specifically about what is available for Joomla/5, moreover, I managed to use this template as well, but Joomla4 does not work well. the Horizontal menus do not display well, because they do not open when I move the mouse over them, if they are not open by default.
Can something be done about this?
I am very happy to publish my work so far for you, but please help me to make the template work well, because I am already thinking that I will look for another template.
I have to switch from Joomla3 because of my server provider, because Joomla3.10.12 does not want the truth on the 8.2 php version. especially not with k2, because I run into serious problems with it also under joomla3.
Please help me!
Send me a message where I can send my template and I will send it to you so that we can fix it and make it functional under Joomla4/5.
I will help you in advance!
Best regards.: Robert

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum