Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoerpe committed Dec 29, 2020
0 parents commit 2bbc870
Show file tree
Hide file tree
Showing 14 changed files with 541 additions and 0 deletions.
1 change: 1 addition & 0 deletions admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
25 changes: 25 additions & 0 deletions admin/language/en-GB.com_myrealpin.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
; Joomla! Project
; Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

COM_MYREALPIN="myRealPin"
COM_MYREALPIN_FIELD_ADD_DESC="By default, http:// will be added unless it detects http:// or https:// in the URL you provide. This allows you to switch off this functionality."
COM_MYREALPIN_FIELD_ADD_LABEL="Auto Add"
COM_MYREALPIN_FIELD_SHOW_HEADER_LABEL="Show Header"
COM_MYREALPIN_FIELD_SHOW_HEADER_DESC="Show pinboard header."
COM_MYREALPIN_FIELD_FRAME_DESC="Show frame border which wrap the iframe."
COM_MYREALPIN_FIELD_FRAME_LABEL="Frame Border"
COM_MYREALPIN_FIELD_HEIGHT_DESC="Height of the iframe window in pixels."
COM_MYREALPIN_FIELD_HEIGHT_LABEL="Height"
COM_MYREALPIN_FIELD_HEIGHTAUTO_DESC="If height is set to auto, the height will automatically be set to the size of the external page. This will only work for pages on your own domain. If you see a JavaScript error, make sure this parameter is disabled. This will break XHTML compatibility for this page."
COM_MYREALPIN_FIELD_HEIGHTAUTO_LABEL="Auto Height"
COM_MYREALPIN_FIELD_LABEL_SCROLLBARSPARAMS="Scroll Bar Parameters"
COM_MYREALPIN_FIELD_SCROLLBARS_DESC="Show or hide the horizontal &amp; vertical scrollbars. If you choose 'Auto', make sure the Auto advanced parameter is set."
COM_MYREALPIN_FIELD_SCROLLBARS_LABEL="Scroll Bars"
COM_MYREALPIN_FIELD_URL_DESC="URL to your pinboard"
COM_MYREALPIN_FIELD_URL_LABEL="URL"
COM_MYREALPIN_FIELD_VALUE_AUTO="Auto"
COM_MYREALPIN_FIELD_WIDTH_DESC="Width of the iframe window. You may enter an absolute figure in pixels or a relative figure by adding a %."
COM_MYREALPIN_XML_DESCRIPTION="Displays an iframe to wrap your pinboard!"
COM_MYREALPIN_ERROR="Configuration incomplete, please check the documentation below!"
10 changes: 10 additions & 0 deletions admin/language/en-GB.com_myrealpin.sys.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
; Joomla! Project
; Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

COM_MYREALPIN="myRealPin"
COM_MYREALPIN_XML_DESCRIPTION="Displays an iframe to wrap your pinboard!"
COM_MYREALPIN_VIEW_DEFAULT_DESC="Displays pinboard in an iframe."
COM_MYREALPIN_VIEW_DEFAULT_OPTION="Default"
COM_MYREALPIN_VIEW_DEFAULT_TITLE="myRealPin"
34 changes: 34 additions & 0 deletions myrealpin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.1" method="upgrade">
<name>com_myrealpin</name>
<author>frumania</author>
<creationDate>January 2021</creationDate>
<copyright>(C) 2021. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<updateservers>
<server type="extension" priority="1" name="MyRealPin Updates">https://raw.githubusercontent.com/frumania/myrealpin_joomla/master/update.xml</server>
</updateservers>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://myrealpin.com</authorUrl>
<version>1.0.0</version>
<description>COM_MYREALPIN_XML_DESCRIPTION</description>
<files folder="site">
<filename>controller.php</filename>
<filename>router.php</filename>
<filename>index.html</filename>
<filename>myrealpin.php</filename>
<folder>views</folder>
</files>
<languages folder="site">
<language tag="en-GB">language/en-GB.com_myrealpin.ini</language>
</languages>
<administration>
<files folder="admin">
<filename>index.html</filename>
</files>
<languages folder="admin">
<language tag="en-GB">language/en-GB.com_myrealpin.ini</language>
<language tag="en-GB">language/en-GB.com_myrealpin.sys.ini</language>
</languages>
</administration>
</extension>
39 changes: 39 additions & 0 deletions site/controller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_myrealpin
*
* @copyright Copyright (C) 2005 - 2020 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
*
* @since 1.5
*/
class myrealpinController extends JControllerLegacy
{
/**
* Method to display a view.
*
* @param boolean $cachable If true, the view output will be cached
* @param array $urlparams 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 = array())
{
$cachable = true;

// Set the default view name and format from the Request.
$vName = $this->input->get('view', 'myrealpin');
$this->input->set('view', $vName);

return parent::display($cachable, array('Itemid' => 'INT'));
}
}
1 change: 1 addition & 0 deletions site/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
25 changes: 25 additions & 0 deletions site/language/en-GB.com_myrealpin.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
; Joomla! Project
; Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

COM_MYREALPIN="myRealPin"
COM_MYREALPIN_FIELD_ADD_DESC="By default, http:// will be added unless it detects http:// or https:// in the URL you provide. This allows you to switch off this functionality."
COM_MYREALPIN_FIELD_ADD_LABEL="Auto Add"
COM_MYREALPIN_FIELD_SHOW_HEADER_LABEL="Show Header"
COM_MYREALPIN_FIELD_SHOW_HEADER_DESC="Show pinboard header."
COM_MYREALPIN_FIELD_FRAME_DESC="Show frame border which wrap the iframe."
COM_MYREALPIN_FIELD_FRAME_LABEL="Frame Border"
COM_MYREALPIN_FIELD_HEIGHT_DESC="Height of the iframe window in pixels."
COM_MYREALPIN_FIELD_HEIGHT_LABEL="Height"
COM_MYREALPIN_FIELD_HEIGHTAUTO_DESC="If height is set to auto, the height will automatically be set to the size of the external page. This will only work for pages on your own domain. If you see a JavaScript error, make sure this parameter is disabled. This will break XHTML compatibility for this page."
COM_MYREALPIN_FIELD_HEIGHTAUTO_LABEL="Auto Height"
COM_MYREALPIN_FIELD_LABEL_SCROLLBARSPARAMS="Scroll Bar Parameters"
COM_MYREALPIN_FIELD_SCROLLBARS_DESC="Show or hide the horizontal &amp; vertical scrollbars. If you choose 'Auto', make sure the Auto advanced parameter is set."
COM_MYREALPIN_FIELD_SCROLLBARS_LABEL="Scroll Bars"
COM_MYREALPIN_FIELD_URL_DESC="URL to your pinboard"
COM_MYREALPIN_FIELD_URL_LABEL="URL"
COM_MYREALPIN_FIELD_VALUE_AUTO="Auto"
COM_MYREALPIN_FIELD_WIDTH_DESC="Width of the iframe window. You may enter an absolute figure in pixels or a relative figure by adding a %."
COM_MYREALPIN_XML_DESCRIPTION="Displays an iframe to wrap your pinboard!"
COM_MYREALPIN_ERROR="Configuration incomplete, please check the documentation below!"
14 changes: 14 additions & 0 deletions site/myrealpin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_myrealpin
*
* @copyright Copyright (C) 2005 - 2020 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('myrealpin');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
89 changes: 89 additions & 0 deletions site/router.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_myrealpin
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

/**
* Routing class from com_wrapper
*
* @since 3.3
*/
class myrealpinRouter extends JComponentRouterBase
{
/**
* Build the route for the com_myrealpin component
*
* @param array &$query An array of URL arguments
*
* @return array The URL arguments to use to assemble the subsequent URL.
*
* @since 3.3
*/
public function build(&$query)
{
if (isset($query['view']))
{
unset($query['view']);
}

return array();
}

/**
* Parse the segments of a URL.
*
* @param array &$segments The segments of the URL to parse.
*
* @return array The URL attributes to be used by the application.
*
* @since 3.3
*/
public function parse(&$segments)
{
return array('view' => 'myrealpin');
}
}

/**
* myrealpin router functions
*
* These functions are proxys for the new router interface
* for old SEF extensions.
*
* @param array &$query An array of URL arguments
*
* @return array The URL arguments to use to assemble the subsequent URL.
*
* @deprecated 4.0 Use Class based routers instead
*/
function myrealpinBuildRoute(&$query)
{
$router = new myrealpinRouter;

return $router->build($query);
}

/**
* myrealpin router functions
*
* These functions are proxys for the new router interface
* for old SEF extensions.
*
* @param array $segments The segments of the URL to parse.
*
* @return array The URL attributes to be used by the application.
*
* @deprecated 4.0 Use Class based routers instead
*/
function myrealpinParseRoute($segments)
{
$router = new myrealpinRouter;

return $router->parse($segments);
}
43 changes: 43 additions & 0 deletions site/views/myrealpin/tmpl/default.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_myrealpin
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

//JHtml::_('script', 'com_wrapper/iframe-height.min.js', array('version' => 'auto', 'relative' => true));

?>
<div class="contentpane<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<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>
</div>
<?php endif; ?>
<iframe <?php echo $this->myrealpin->load; ?>
id="myrealpin"
name="iframe"
src="<?php echo $this->escape($this->myrealpin->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)); ?>"
<?php if ($this->escape($this->params->get('page_heading'))) : ?>
title="<?php echo $this->escape($this->params->get('page_heading')); ?>"
<?php else : ?>
title="<?php echo $this->escape($this->params->get('page_title')); ?>"
<?php endif; ?>
class="myrealpin wrapper<?php echo $this->pageclass_sfx; ?>">
<?php echo JText::_('COM_MYREALPIN_NO_IFRAMES'); ?>
</iframe>
</div>
Loading

0 comments on commit 2bbc870

Please sign in to comment.