| Server IP : 213.186.33.4 / Your IP : 216.73.216.59 Web Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : awebpaca ( 35430) PHP Version : 8.5.0 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/a/w/e/awebpaca/visitevirtuelle/plugins/system/ova/ |
Upload File : |
<?php
/**
* @version $Id$
* @author OvaTheme
* @package Joomla.Site
* @subpackage com_ovacomposer
* @copyright Copyright (C) 2013 OvaTheme. All rights reserved.
* @license License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.
*/
defined('_JEXEC') or die('Restricted access');
// Import Joomla core library
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
jimport('joomla.plugin.plugin');
// Require shortcode functions
require_once dirname(__FILE__) . "/shortcode.php";
// Require get data from content/k2
require_once dirname(__FILE__) . "/data.php";
class plgSystemOva extends JPlugin{
var $document = NULL;
var $baseurl = NULL;
public function __construct(&$subject, $config){
parent::__construct($subject, $config);
// config_shortcode($this->params);
$this->document = JFactory::getDocument();
$this->baseurl = str_replace("/administrator", "", JURI::base());
define('OVAPLUGIN',$this->baseurl. "plugins/system/ova/assets/");
}
// Function on after Router
public function onAfterRoute(){
if(JRequest::getVar('option')=='com_ovacomposer'){
$src = JPATH_PLUGINS . "/system/ova/ova_sc";
$lists = JFolder::files($src);
foreach($lists as $f){
if(JFile::getExt($f)=='php'){
require_once($src.'/'.$f);
}
}
}
}
// Add Before Render
public function onBeforeRender(){
$app = JFactory::getApplication();
// Check if is frontend
if($app->isSite()){
// Add for flickr
$this->document->addScript($this->baseurl . "plugins/system/ova/assets/js/jflickrfeed.min.js");
// Add for contact form
$this->document->addScript($this->baseurl . "plugins/system/ova/assets/js/jquery.validate.js");
// Add for slider
$this->document->addScript($this->baseurl . "plugins/system/ova/assets/js/owl.carousel.min.js");
$this->document->addStyleSheet($this->baseurl . "plugins/system/ova/assets/css/owl.carousel.css");
$this->document->addStyleSheet($this->baseurl . "plugins/system/ova/assets/css/owl.theme.css");
// Add for google map
$this->document->addScript($this->baseurl . "plugins/system/ova/assets/js/jquery.ui.map.min.js");
$this->document->addScript('http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places');
}else{
if(JRequest::getVar('option')=='com_ovacomposer' && JRequest::getVar('view')=='item' && JRequest::getVar('layout')=='edit'){
$this->document->addScript($this->baseurl . "plugins/system/ova/assets/js/common.js");
$this->document->addScript($this->baseurl . "plugins/system/ova/assets/js/create-element.js");
$this->document->addScript('http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places');
$this->document->addStyleSheet($this->baseurl . "plugins/system/ova/assets/css/ova-box.css");
$this->document->addStyleSheet($this->baseurl . "plugins/system/ova/assets/css/icon-admin.css");
$this->document->addScript($this->baseurl . "plugins/system/ova/assets/js/jquery.fancybox.pack.js");
$this->document->addScript($this->baseurl . "plugins/system/ova/assets/js/jquery-ui.min.js");
$this->document->addScript($this->baseurl . "plugins/system/ova/assets/js/jquery.geocomplete.min.js");
}
}
}
// Function on after render
public function onAfterRender(){
$runmode = $this->params->get('runmode', 0);
$app = JFactory::getApplication();
// Only enable shortcodes in fontend & work with buffer of page
if($app->isSite()){
if($runmode == 1) {
$page = JResponse::GetBody();
$page = do_shortcode($page);
JResponse::SetBody($page);
}
}
}
// Enable shortcodes in Articles content
public function onContentPrepare($context, &$article, &$params, $page=0){
$runmode = $this->params->get('runmode', 0);
if($runmode != 0) return;
$article->text = do_shortcode($article->text);
return true;
}
public function loadTemplate ($template){
if (!is_file ($template)) return '';
$buffer = ob_get_clean();
ob_start();
include ($template);
$content = ob_get_clean();
ob_start();
echo $buffer;
return $content;
}
}