forked from pollen8/fabrik
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ooops, adding old document types back to git (pre 3.8 location)
- Loading branch information
1 parent
46169e9
commit 3cb9db6
Showing
21 changed files
with
2,252 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<html><body bgcolor="#FFFFFF"></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?php | ||
/** | ||
* @version $Id: atom.php 10381 2008-06-01 03:35:53Z pasamio $ | ||
* @package Joomla.Framework | ||
* @subpackage Document | ||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. | ||
* @license GNU/GPL, see LICENSE.php | ||
* Joomla! is free software. This version may have been modified pursuant | ||
* to the GNU General Public License, and as distributed it includes or | ||
* is derivative of works licensed under the GNU General Public License or | ||
* other free or open source software licenses. | ||
* See COPYRIGHT.php for copyright notices and details. | ||
*/ | ||
|
||
// Check to ensure this file is within the rest of the framework | ||
defined('JPATH_BASE') or die(); | ||
|
||
|
||
|
||
/** | ||
* JDocumentRenderer_Atom is a feed that implements the atom specification | ||
* | ||
* Please note that just by using this class you won't automatically | ||
* produce valid atom files. For example, you have to specify either an editor | ||
* for the feed or an author for every single feed item. | ||
* | ||
* @author Johan Janssens <[email protected]> | ||
* | ||
* @package Joomla.Framework | ||
* @subpackage Document | ||
* @see http://www.atomenabled.org/developers/syndication/atom-format-spec.php | ||
* @since 1.5 | ||
*/ | ||
|
||
class JDocumentRendererAtom extends JDocumentRenderer | ||
{ | ||
/** | ||
* Document mime type | ||
* | ||
* @var string | ||
* @access private | ||
*/ | ||
var $_mime = "application/atom+xml"; | ||
|
||
/** | ||
* Render the feed | ||
* | ||
* @access public | ||
* @return string | ||
*/ | ||
function render() | ||
{ | ||
$now =& JFactory::getDate(); | ||
$data =& $this->_doc; | ||
|
||
$feed = "<feed xmlns=\"http://www.w3.org/2005/Atom\" xml:base=\"".$data->getBase()."\""; | ||
if ($data->language!="") { | ||
$feed.= " xml:lang=\"".$data->language."\""; | ||
} | ||
$feed.= ">\n"; | ||
$feed.= " <title type=\"text\">".htmlspecialchars($data->title, ENT_COMPAT, 'UTF-8')."</title>\n"; | ||
$feed.= " <subtitle type=\"text\">".htmlspecialchars($data->description, ENT_COMPAT, 'UTF-8')."</subtitle>\n"; | ||
$feed.= " <link rel=\"alternate\" type=\"text/html\" href=\"".$data->link."\"/>\n"; | ||
$feed.= " <id>".$data->link."</id>\n"; | ||
$feed.= " <updated>".htmlspecialchars($now->toISO8601(), ENT_COMPAT, 'UTF-8')."</updated>\n"; | ||
if ($data->editor!="") { | ||
$feed.= " <author>\n"; | ||
$feed.= " <name>".$data->editor."</name>\n"; | ||
if ($data->editorEmail!="") { | ||
$feed.= " <email>".$data->editorEmail."</email>\n"; | ||
} | ||
$feed.= " </author>\n"; | ||
} | ||
$feed.= " <generator uri=\"http://joomla.org\" version=\"1.5\">".$data->getGenerator()."</generator>\n"; | ||
$feed.= "<link rel=\"self\" type=\"application/atom+xml\" href=\"". $data->syndicationURL . "\" />\n"; | ||
for ($i=0;$i<count($data->items);$i++) | ||
{ | ||
$feed.= " <entry>\n"; | ||
$feed.= " <title>".htmlspecialchars(strip_tags($data->items[$i]->title), ENT_COMPAT, 'UTF-8')."</title>\n"; | ||
$feed.= ' <link rel="alternate" type="text/html" href="'.$data->items[$i]->link."\"/>\n"; | ||
|
||
if ($data->items[$i]->date=="") { | ||
$data->items[$i]->date = $now->toUnix(); | ||
} | ||
$itemDate =& JFactory::getDate($data->items[$i]->date); | ||
$feed.= " <published>".htmlspecialchars($itemDate->toISO8601(), ENT_COMPAT, 'UTF-8')."</published>\n"; | ||
$feed.= " <updated>".htmlspecialchars($itemDate->toISO8601(),ENT_COMPAT, 'UTF-8')."</updated>\n"; | ||
$feed.= " <id>".htmlspecialchars($data->items[$i]->link, ENT_COMPAT, 'UTF-8')."</id>\n"; | ||
|
||
if ($data->items[$i]->author!="") | ||
{ | ||
$feed.= " <author>\n"; | ||
$feed.= " <name>".htmlspecialchars($data->items[$i]->author, ENT_COMPAT, 'UTF-8')."</name>\n"; | ||
$feed.= " </author>\n"; | ||
} | ||
if ($data->items[$i]->description!="") { | ||
$feed.= " <summary type=\"html\">".htmlspecialchars($data->items[$i]->description, ENT_COMPAT, 'UTF-8')."</summary>\n"; | ||
$feed.= " <content type=\"html\">".htmlspecialchars($data->items[$i]->description, ENT_COMPAT, 'UTF-8')."</content>\n"; | ||
} | ||
if ($data->items[$i]->enclosure != NULL) { | ||
$feed.=" <link rel=\"enclosure\" href=\"". $data->items[$i]->enclosure->url ."\" type=\"". $data->items[$i]->enclosure->type."\" length=\"". $data->items[$i]->enclosure->length . "\" />\n"; | ||
} | ||
$feed.= " </entry>\n"; | ||
} | ||
$feed.= "</feed>\n"; | ||
return $feed; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<html><body bgcolor="#FFFFFF"></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,237 @@ | ||
<?php | ||
/** | ||
* @version $Id: rss.php 10381 2008-06-01 03:35:53Z pasamio $ | ||
* @package Joomla.Framework | ||
* @subpackage Document | ||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. | ||
* @license GNU/GPL, see LICENSE.php | ||
* Joomla! is free software. This version may have been modified pursuant | ||
* to the GNU General Public License, and as distributed it includes or | ||
* is derivative of works licensed under the GNU General Public License or | ||
* other free or open source software licenses. | ||
* See COPYRIGHT.php for copyright notices and details. | ||
*/ | ||
|
||
// Check to ensure this file is within the rest of the framework | ||
defined('JPATH_BASE') or die(); | ||
|
||
|
||
/** | ||
* JDocumentRenderer_RSS is a feed that implements RSS 2.0 Specification | ||
* | ||
* @author Johan Janssens <[email protected]> | ||
* | ||
* @package Joomla.Framework | ||
* @subpackage Document | ||
* @see http://www.rssboard.org/rss-specification | ||
* @since 1.5 | ||
*/ | ||
|
||
class JDocumentRendererrss extends JDocumentRenderer | ||
{ | ||
/** | ||
* Renderer mime type | ||
* | ||
* @var string | ||
* @access private | ||
*/ | ||
var $_mime = "application/rss+xml"; | ||
|
||
/** | ||
* Renders a script and returns the results as a string | ||
* | ||
* @param string $name The name of the element to render | ||
* @param array $params Array of values | ||
* @param string $content Override the output of the renderer | ||
* | ||
* @return string The output of the script | ||
* | ||
* @since 11.1 | ||
*/ | ||
public function render($name, $params = null, $content = null) | ||
{ | ||
$now = JFactory::getDate(); | ||
$data = $this->_doc; | ||
$uri = JURI::getInstance(); | ||
$url = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port')); | ||
$feed = "<rss version=\"2.0\" "; | ||
//ADD in any special name spaces we have used in view.fabrikfeed.php | ||
$feed.= $data->_namespace; | ||
$feed.= ">\n"; | ||
$feed.= " <channel>\n"; | ||
$feed.= " <title>" . $data->title . "</title>\n"; | ||
$feed.= " <description>" . $data->description . "</description>\n"; | ||
$feed.= " <link>" . $url . $data->link . "</link>\n"; | ||
$feed.= " <lastBuildDate>" . htmlspecialchars($now->toRFC822(), ENT_COMPAT, 'UTF-8') . "</lastBuildDate>\n"; | ||
$feed.= " <generator>" . $data->getGenerator() . "</generator>\n"; | ||
|
||
if ($data->image != null) | ||
{ | ||
$feed.= " <image>\n"; | ||
$feed.= " <url>" . $data->image->url . "</url>\n"; | ||
$feed.= " <title>" . htmlspecialchars($data->image->title, ENT_COMPAT, 'UTF-8') . "</title>\n"; | ||
$feed.= " <link>" . $data->image->link . "</link>\n"; | ||
|
||
if ($data->image->width != "") | ||
{ | ||
$feed.= " <width>" . $data->image->width . "</width>\n"; | ||
} | ||
|
||
if ($data->image->height != "") | ||
{ | ||
$feed.= " <height>" . $data->image->height . "</height>\n"; | ||
} | ||
|
||
if ($data->image->description!="") | ||
{ | ||
$feed.= " <description><![CDATA[" . $data->image->description . "]]></description>\n"; | ||
} | ||
|
||
$feed.= " </image>\n"; | ||
} | ||
|
||
if ($data->language != "") | ||
{ | ||
$feed.= " <language>" . $data->language . "</language>\n"; | ||
} | ||
|
||
if ($data->copyright != "") | ||
{ | ||
$feed.= " <copyright>" . htmlspecialchars($data->copyright,ENT_COMPAT, 'UTF-8') . "</copyright>\n"; | ||
} | ||
|
||
if ($data->editor != "") | ||
{ | ||
$feed.= " <managingEditor>" . htmlspecialchars($data->editor, ENT_COMPAT, 'UTF-8') . "</managingEditor>\n"; | ||
} | ||
|
||
if ($data->webmaster != "") | ||
{ | ||
$feed.= " <webMaster>" . htmlspecialchars($data->webmaster, ENT_COMPAT, 'UTF-8') . "</webMaster>\n"; | ||
} | ||
|
||
if ($data->pubDate != "") { | ||
$pubDate = JFactory::getDate($data->pubDate); | ||
$feed.= " <pubDate>" . htmlspecialchars($pubDate->toRFC822(),ENT_COMPAT, 'UTF-8') . "</pubDate>\n"; | ||
} | ||
|
||
if ($data->category != "") | ||
{ | ||
$feed.= " <category>" . htmlspecialchars($data->category, ENT_COMPAT, 'UTF-8') . "</category>\n"; | ||
} | ||
|
||
if ($data->docs != "") | ||
{ | ||
$feed.= " <docs>" . htmlspecialchars($data->docs, ENT_COMPAT, 'UTF-8') . "</docs>\n"; | ||
} | ||
|
||
if ($data->ttl != "") | ||
{ | ||
$feed.= " <ttl>" . htmlspecialchars($data->ttl, ENT_COMPAT, 'UTF-8') . "</ttl>\n"; | ||
} | ||
|
||
if ($data->rating != "") | ||
{ | ||
$feed.= " <rating>" . htmlspecialchars($data->rating, ENT_COMPAT, 'UTF-8') . "</rating>\n"; | ||
} | ||
|
||
if ($data->skipHours != "") | ||
{ | ||
$feed.= " <skipHours>".htmlspecialchars($data->skipHours, ENT_COMPAT, 'UTF-8') . "</skipHours>\n"; | ||
} | ||
|
||
if ($data->skipDays != "") | ||
{ | ||
$feed.= " <skipDays>" . htmlspecialchars($data->skipDays, ENT_COMPAT, 'UTF-8') . "</skipDays>\n"; | ||
} | ||
|
||
for ($i = 0; $i < count($data->items); $i++) | ||
{ | ||
/** | ||
* Run text through html_entity_decode before htmlspecialchars, in case it contains non XML entities like é | ||
*/ | ||
|
||
$feed.= " <item>\n"; | ||
$feed.= " <title><![CDATA[" . htmlspecialchars(strip_tags(html_entity_decode($data->items[$i]->title, ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8') . "]]></title>\n"; | ||
$feed.= " <link>" . $url . $data->items[$i]->link . "</link>\n"; | ||
//$feed.= " <description><![CDATA[" . htmlspecialchars(html_entity_decode($this->_relToAbs($data->items[$i]->description), ENT_COMPAT, 'UTF-8'), ENT_COMPAT, 'UTF-8') . "]]></description>\n"; | ||
$feed.= " <description><![CDATA[" . html_entity_decode($this->_relToAbs($data->items[$i]->description), ENT_COMPAT, 'UTF-8') . "]]></description>\n"; | ||
|
||
if ($data->items[$i]->author != "") | ||
{ | ||
$feed.= " <author>" . htmlspecialchars($data->items[$i]->author, ENT_COMPAT, 'UTF-8') . "</author>\n"; | ||
} | ||
|
||
/* | ||
// on hold | ||
if ($data->items[$i]->source!="") { | ||
$data.= " <source>".htmlspecialchars($data->items[$i]->source, ENT_COMPAT, 'UTF-8')."</source>\n"; | ||
} | ||
*/ | ||
|
||
if ($data->items[$i]->category != "") | ||
{ | ||
$feed.= " <category>" . htmlspecialchars($data->items[$i]->category, ENT_COMPAT, 'UTF-8') . "</category>\n"; | ||
} | ||
|
||
if ($data->items[$i]->comments != "") | ||
{ | ||
$feed.= " <comments>" . htmlspecialchars($data->items[$i]->comments, ENT_COMPAT, 'UTF-8') . "</comments>\n"; | ||
} | ||
|
||
if ($data->items[$i]->date != "") | ||
{ | ||
$itemDate = JFactory::getDate($data->items[$i]->date); | ||
$feed.= " <pubDate>" . htmlspecialchars($itemDate->toRFC822(), ENT_COMPAT, 'UTF-8') . "</pubDate>\n"; | ||
} | ||
|
||
if ($data->items[$i]->guid!="") | ||
{ | ||
$feed.= " <guid>" . htmlspecialchars($data->items[$i]->guid, ENT_COMPAT, 'UTF-8') . "</guid>\n"; | ||
} | ||
|
||
if ($data->items[$i]->enclosure != NULL) | ||
{ | ||
$feed.= " <enclosure url=\""; | ||
$feed.= $data->items[$i]->enclosure->url; | ||
$feed.= "\" length=\""; | ||
$feed.= $data->items[$i]->enclosure->length; | ||
$feed.= "\" type=\""; | ||
$feed.= $data->items[$i]->enclosure->type; | ||
$feed.= "\"/>\n"; | ||
} | ||
|
||
// ADD in some funky new | ||
foreach ($data->_itemTags as $tagName) | ||
{ | ||
// $$$ hugh - trying to fix :'s in object names | ||
if (isset($data->items[$i]->{$tagName})) | ||
{ | ||
$val = $data->items[$i]->{$tagName}; | ||
$feed.=" $val\n"; | ||
} | ||
} | ||
|
||
$feed.= " </item>\n"; | ||
} | ||
|
||
$feed.= " </channel>\n"; | ||
$feed.= "</rss>\n"; | ||
|
||
return $feed; | ||
} | ||
|
||
/** | ||
* Convert links in a text from relative to absolute | ||
* | ||
* @access public | ||
* @return string | ||
*/ | ||
function _relToAbs($text) | ||
{ | ||
$base = JURI::base(); | ||
$text = preg_replace("/(href|src)=\"(?!http|ftp|https)([^\"]*)\"/", "$1=\"$base\$2\"", $text); | ||
|
||
return $text; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<html><body bgcolor="#FFFFFF"></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Framework | ||
* @subpackage Document | ||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. | ||
* @license GNU/GPL, see LICENSE.php | ||
* Joomla! is free software. This version may have been modified pursuant | ||
* to the GNU General Public License, and as distributed it includes or | ||
* is derivative of works licensed under the GNU General Public License or | ||
* other free or open source software licenses. | ||
* See COPYRIGHT.php for copyright notices and details. | ||
*/ | ||
|
||
// Check to ensure this file is within the rest of the framework | ||
defined('JPATH_BASE') or die(); | ||
|
||
file_exists(JPATH_LIBRARIES . '/joomla/document/html/html.php') && require_once JPATH_LIBRARIES . '/joomla/document/html/html.php'; | ||
|
||
/** | ||
* Documentpartial class, used by Fabrik to load popups, avoiding re-including jQuery in head | ||
* | ||
* @package Joomla.Framework | ||
* @subpackage Document | ||
* @since 1.5 | ||
*/ | ||
class JDocumentpartial extends JDocumentHTML | ||
{ | ||
|
||
/** | ||
* Class constructor | ||
* | ||
* @access protected | ||
* @param array $options Associative array of options | ||
*/ | ||
function __construct($options = array()) | ||
{ | ||
parent::__construct($options); | ||
|
||
//set document type | ||
$this->_type = 'partial'; | ||
} | ||
} |
Oops, something went wrong.