first commit

This commit is contained in:
alazhar
2020-01-02 22:20:31 +07:00
commit 10eb3340ad
5753 changed files with 631345 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_wrapper
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Content Component Controller
*
* @package Joomla.Site
* @subpackage com_wrapper
* @since 1.5
*/
class WrapperController extends JControllerLegacy
{
/**
* Method to display a view.
*
* @param boolean If true, the view output will be cached
* @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JControllerLegacy This object to support chaining.
* @since 1.5
*/
public function display($cachable = false, $urlparams = false)
{
$cachable = true;
// Set the default view name and format from the Request.
$vName = $this->input->get('view', 'wrapper');
$this->input->set('view', $vName);
return parent::display($cachable, array('Itemid' => 'INT'));
}
}

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
</metadata>

View File

@ -0,0 +1,39 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_wrapper
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* @param array
* @return array
*/
function WrapperBuildRoute(&$query)
{
$segments = array();
if (isset($query['view']))
{
unset($query['view']);
}
return $segments;
}
/**
* @param array
* @return array
*/
function WrapperParseRoute($segments)
{
$vars = array();
$vars['view'] = 'wrapper';
return $vars;
}

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view title="COM_WRAPPER">
<message><![CDATA[COM_WRAPPER_XML_DESCRIPTION]]></message>
</view>
</metadata>

View File

@ -0,0 +1,48 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_wrapper
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<script type="text/javascript">
function iFrameHeight()
{
var h = 0;
if (!document.all)
{
h = document.getElementById('blockrandom').contentDocument.height;
document.getElementById('blockrandom').style.height = h + 60 + 'px';
} else if (document.all)
{
h = document.frames('blockrandom').document.body.scrollHeight;
document.all.blockrandom.style.height = h + 20 + 'px';
}
}
</script>
<div class="contentpane<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php if ($this->escape($this->params->get('page_heading'))) :?>
<?php echo $this->escape($this->params->get('page_heading')); ?>
<?php else : ?>
<?php echo $this->escape($this->params->get('page_title')); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<iframe <?php echo $this->wrapper->load; ?>
id="blockrandom"
name="iframe"
src="<?php echo $this->escape($this->wrapper->url); ?>"
width="<?php echo $this->escape($this->params->get('width')); ?>"
height="<?php echo $this->escape($this->params->get('height')); ?>"
scrolling="<?php echo $this->escape($this->params->get('scrolling')); ?>"
frameborder="<?php echo $this->escape($this->params->get('frameborder', 1)); ?>"
class="wrapper<?php echo $this->pageclass_sfx; ?>">
<?php echo JText::_('COM_WRAPPER_NO_IFRAMES'); ?>
</iframe>
</div>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_WRAPPER_WRAPPER_VIEW_DEFAULT_TITLE" option="COM_WRAPPER_WRAPPER_VIEW_DEFAULT_OPTION">
<help
key="JHELP_MENUS_MENU_ITEM_WRAPPER"
/>
<message>
<![CDATA[COM_WRAPPER_WRAPPER_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<fieldset name="request" label="COM_MENUS_BASIC_FIELDSET_LABEL">
<field name="url" type="text"
description="COM_WRAPPER_FIELD_URL_DESC"
label="COM_WRAPPER_FIELD_URL_LABEL"
size="30"
required="true"
/>
</fieldset>
<!-- Add fields to the parameters object for the layout. -->
<!-- Scroll. -->
<fieldset name="basic" label="COM_WRAPPER_FIELD_LABEL_SCROLLBARSPARAMS">
<field name="scrolling" type="list"
default="auto"
description="COM_WRAPPER_FIELD_SCROLLBARS_DESC"
label="COM_WRAPPER_FIELD_SCROLLBARS_LABEL"
>
<option value="no">JNO</option>
<option value="yes">JYES</option>
<option value="auto">COM_WRAPPER_FIELD_VALUE_AUTO</option>
</field>
<field name="width" type="text"
default="100%"
description="COM_WRAPPER_FIELD_WIDTH_DESC"
label="JGLOBAL_WIDTH"
size="5"
/>
<field name="height" type="text"
default="500"
description="COM_WRAPPER_FIELD_HEIGHT_DESC"
label="COM_WRAPPER_FIELD_HEIGHT_LABEL"
size="5"
/>
</fieldset>
<!-- Advanced options. -->
<fieldset name="advanced">
<field name="height_auto" type="radio"
default="0"
class="btn-group"
description="COM_WRAPPER_FIELD_HEIGHTAUTO_DESC"
label="COM_WRAPPER_FIELD_HEIGHTAUTO_LABEL"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field name="add_scheme"
type="radio"
class="btn-group"
default="1"
description="COM_WRAPPER_FIELD_ADD_DESC"
label="COM_WRAPPER_FIELD_ADD_LABEL"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field name="frameborder"
type="radio"
class="btn-group"
default="1"
label="COM_WRAPPER_FIELD_FRAME_LABEL"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,101 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_wrapper
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* @package Joomla.Site
* @subpackage com_wrapper
* @since 1.5
*/
class WrapperViewWrapper extends JViewLegacy
{
/**
* @since 1.5
*/
public function display($tpl = null)
{
$app = JFactory::getApplication();
$params = $app->getParams();
// because the application sets a default page title, we need to get it
// right from the menu item itself
$title = $params->get('page_title', '');
if (empty($title))
{
$title = $app->getCfg('sitename');
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 1)
{
$title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 2)
{
$title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
}
$this->document->setTitle($title);
if ($params->get('menu-meta_description'))
{
$this->document->setDescription($params->get('menu-meta_description'));
}
if ($params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $params->get('menu-meta_keywords'));
}
if ($params->get('robots'))
{
$this->document->setMetadata('robots', $params->get('robots'));
}
$wrapper = new stdClass;
// auto height control
if ($params->def('height_auto'))
{
$wrapper->load = 'onload="iFrameHeight()"';
}
else
{
$wrapper->load = '';
}
$url = $params->def('url', '');
if ($params->def('add_scheme', 1))
{
// adds 'http://' if none is set
if (substr($url, 0, 1) == '/')
{
// relative url in component. use server http_host.
$wrapper->url = 'http://'. $_SERVER['HTTP_HOST'] . $url;
}
elseif (!strstr($url, 'http') && !strstr($url, 'https'))
{
$wrapper->url = 'http://'. $url;
}
else {
$wrapper->url = $url;
}
}
else
{
$wrapper->url = $url;
}
//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
$this->params = &$params;
$this->wrapper = &$wrapper;
parent::display($tpl);
}
}

View File

@ -0,0 +1,14 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_wrapper
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$controller = JControllerLegacy::getInstance('Wrapper');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.1" method="upgrade">
<name>com_wrapper</name>
<author>Joomla! Project</author>
<creationDate>April 2006</creationDate>
<copyright>(C) 2005 - 2013 Open Source Matters. All rights reserved.
</copyright>
<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.0.0</version>
<description>COM_WRAPPER_XML_DESCRIPTION</description>
<files folder="site">
<filename>controller.php</filename>
<filename>index.html</filename>
<filename>metadata.xml</filename>
<filename>router.php</filename>
<filename>wrapper.php</filename>
<folder>views</folder>
</files>
<languages folder="site">
<language tag="en-GB">language/en-GB.com_wrapper.ini</language>
</languages>
<administration>
<files folder="admin">
<filename>index.html</filename>
</files>
<languages folder="admin">
<language tag="en-GB">language/en-GB.com_wrapper.ini</language>
<language tag="en-GB">language/en-GB.com_wrapper.sys.ini</language>
</languages>
</administration>
</extension>