diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/admin.ninjarsssyndicator.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/admin.ninjarsssyndicator.php
new file mode 100644
index 00000000..3e117e33
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/admin.ninjarsssyndicator.php
@@ -0,0 +1,30 @@
+authorize( 'com_ninjarsssyndicator', 'manage' )) {
+ $mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH') );
+}
+*/
+// Require the base controller
+require_once (JPATH_COMPONENT.DS.'controllers'.DS.'defaultcontroller.php');
+
+// Require specific controller if requested
+if($controller = JRequest::getVar('controller')) {
+ require_once (JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php');
+}
+//die('shit');
+// Create the controller
+$classname = 'NinjaRssSyndicatorController'.$controller;
+$controller = new $classname( );
+
+// Perform the Request task
+$controller->execute( JRequest::getVar('task'));
+
+// Redirect if set by the controller
+$controller->redirect();
+
+?>
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/nficon.png b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/nficon.png
new file mode 100644
index 00000000..88dac3d5
Binary files /dev/null and b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/nficon.png differ
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/ninja-rss-syndicator.jpg b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/ninja-rss-syndicator.jpg
new file mode 100644
index 00000000..719b9855
Binary files /dev/null and b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/ninja-rss-syndicator.jpg differ
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/ninja-rss.jpg b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/ninja-rss.jpg
new file mode 100644
index 00000000..53be9ae9
Binary files /dev/null and b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/ninja-rss.jpg differ
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/sel.gif b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/sel.gif
new file mode 100644
index 00000000..542801d1
Binary files /dev/null and b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/images/sel.gif differ
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/js/picker.js b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/js/picker.js
new file mode 100644
index 00000000..1d1f5f70
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/js/picker.js
@@ -0,0 +1,138 @@
+// Title: Tigra Color Picker
+// URL: http://www.softcomplex.com/products/tigra_color_picker/
+// Version: 1.1
+// Date: 06/26/2003 (mm/dd/yyyy)
+// Note: Permission given to use this script in ANY kind of applications if
+// header lines are left unchanged.
+// Note: Script consists of two files: picker.js and picker.html
+//Oct 18 2008: changed line 18: mosUrl+'/picker.html' ==> mosUrl+'assets/picker.html'
+
+var TCP = new TColorPicker();
+
+function TCPopup(field, palette) {
+ this.field = field;
+ this.initPalette = !palette || palette > 2 ? 0 : palette;
+ var w = 194, h = 206,
+ move = screen ?
+ ',left=' + ((screen.width - w) >> 1) + ',top=' + ((screen.height - h) >> 1) : '',
+ o_colWindow = window.open(mosUrl+'assets/picker.html', null, "help=no,status=no,scrollbars=no,resizable=no" + move + ",width=" + w + ",height=" + h + ",dependent=yes", true);
+ o_colWindow.opener = window;
+ o_colWindow.focus();
+}
+
+function TCBuildCell (R, G, B, w, h) {
+ return ' ';
+}
+
+function TCSelect(c) {
+ this.field.value = '#' + c.toUpperCase();
+ this.win.close();
+}
+
+function TCPaint(c, b_noPref) {
+ c = (b_noPref ? '' : '#') + c.toUpperCase();
+ if (this.o_samp)
+ this.o_samp.innerHTML = '' + c +' ' + c + ' '
+ if(this.doc.layers)
+ this.sample.bgColor = c;
+ else {
+ if (this.sample.backgroundColor != null) this.sample.backgroundColor = c;
+ else if (this.sample.background != null) this.sample.background = c;
+ }
+}
+
+function TCGenerateSafe() {
+ var s = '';
+ for (j = 0; j < 12; j ++) {
+ s += "";
+ for (k = 0; k < 3; k ++)
+ for (i = 0; i <= 5; i ++)
+ s += this.bldCell(k * 51 + (j % 2) * 51 * 3, Math.floor(j / 2) * 51, i * 51, 8, 10);
+ s += " ";
+ }
+ return s;
+}
+
+function TCGenerateWind() {
+ var s = '';
+ for (j = 0; j < 12; j ++) {
+ s += "";
+ for (k = 0; k < 3; k ++)
+ for (i = 0; i <= 5; i++)
+ s += this.bldCell(i * 51, k * 51 + (j % 2) * 51 * 3, Math.floor(j / 2) * 51, 8, 10);
+ s += " ";
+ }
+ return s
+}
+
+function TCGenerateGray() {
+ var s = '';
+ for (j = 0; j <= 15; j ++) {
+ s += "";
+ for (k = 0; k <= 15; k ++) {
+ g = Math.floor((k + j * 16) % 256);
+ s += this.bldCell(g, g, g, 9, 7);
+ }
+ s += ' ';
+ }
+ return s
+}
+
+function TCDec2Hex(v) {
+ v = v.toString(16);
+ for(; v.length < 6; v = '0' + v);
+ return v;
+}
+
+function TCChgMode(v) {
+ for (var k in this.divs) this.hide(k);
+ this.show(v);
+}
+
+function TColorPicker(field) {
+ this.build0 = TCGenerateSafe;
+ this.build1 = TCGenerateWind;
+ this.build2 = TCGenerateGray;
+ this.show = document.layers ?
+ function (div) { this.divs[div].visibility = 'show' } :
+ function (div) { this.divs[div].visibility = 'visible' };
+ this.hide = document.layers ?
+ function (div) { this.divs[div].visibility = 'hide' } :
+ function (div) { this.divs[div].visibility = 'hidden' };
+ // event handlers
+ this.C = TCChgMode;
+ this.S = TCSelect;
+ this.P = TCPaint;
+ this.popup = TCPopup;
+ this.draw = TCDraw;
+ this.dec2hex = TCDec2Hex;
+ this.bldCell = TCBuildCell;
+ this.divs = [];
+}
+
+function TCDraw(o_win, o_doc) {
+ this.win = o_win;
+ this.doc = o_doc;
+ var
+ s_tag_openT = o_doc.layers ?
+ 'layer visibility=hidden top=54 left=5 width=182' :
+ 'div style=visibility:hidden;position:absolute;left:6px;top:54px;width:182px;height:0',
+ s_tag_openS = o_doc.layers ? 'layer top=32 left=6' : 'div',
+ s_tag_close = o_doc.layers ? 'layer' : 'div'
+
+ this.doc.write('<' + s_tag_openS + ' id=sam name=sam>' + s_tag_close + '>');
+ this.sample = o_doc.layers ? o_doc.layers['sam'] :
+ o_doc.getElementById ? o_doc.getElementById('sam').style : o_doc.all['sam'].style
+
+ for (var k = 0; k < 3; k ++) {
+ this.doc.write('<' + s_tag_openT + ' id="p' + k + '" name="p' + k + '">' + this['build' + k]() + '
' + s_tag_close + '>');
+ this.divs[k] = o_doc.layers
+ ? o_doc.layers['p' + k] : o_doc.all
+ ? o_doc.all['p' + k].style : o_doc.getElementById('p' + k).style
+ }
+ if (!o_doc.layers && o_doc.body.innerHTML)
+ this.o_samp = o_doc.all
+ ? o_doc.all.samp : o_doc.getElementById('samp');
+ this.C(this.initPalette);
+ if (this.field.value) this.P(this.field.value, true)
+}
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/picker.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/picker.html
new file mode 100644
index 00000000..0a64874b
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/assets/picker.html
@@ -0,0 +1,41 @@
+
+
+
+
+ Tigra Color Picker
+
+
+
+
+
+
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/com_ninjarsssyndicator.xml b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/com_ninjarsssyndicator.xml
new file mode 100644
index 00000000..5d4d8c4d
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/com_ninjarsssyndicator.xml
@@ -0,0 +1,46 @@
+
+
+ Ninja RSS Syndicator
+ 2009/15/12
+ Daniel Chapman
+ daniel@ninjaforge.com
+ http://ninjaforge.com
+ NinjaForge.com
+ General Public License as published by the Free Software Foundation. ]]>
+ 1.0.7
+
+
+
+ install/install.sql
+
+
+
+ index.html
+ ninjarsssyndicator.php
+ assets
+ controllers
+ feed
+ models
+ views
+
+
+ Ninja RSS Syndicator
+
+ Dashboard
+ Feeds
+ Button Maker
+ Default Settings
+
+
+ index.html
+ admin.ninjarsssyndicator.php
+ controllers
+ models
+ install
+ assets
+ views
+
+
+ install/install.php
+ install/uninstall.php
+
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/buttonmaker.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/buttonmaker.php
new file mode 100644
index 00000000..971b3207
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/buttonmaker.php
@@ -0,0 +1,26 @@
+_link = 'index.php?option=com_ninjarsssyndicator&task=buttonmaker';
+ }
+
+ function save()
+ {
+ $model = $this->getModel('buttonmaker');
+ $msg = $model->save($post);
+ $is_ajaxed = isset($_SERVER["HTTP_X_REQUESTED_WITH"]) ? ($_SERVER["HTTP_X_REQUESTED_WITH"] == "XMLHttpRequest") : false;
+ if($is_ajaxed)
+ exit($msg);
+ $this->setRedirect( $this->_link, $msg );
+ }
+}
+?>
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/config.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/config.php
new file mode 100644
index 00000000..52a82d49
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/config.php
@@ -0,0 +1,27 @@
+getModel('config');
+ if ($model->saveConfig($post)) {
+ $msg = JText::_( 'Settings Saved!' );
+ } else {
+ $msg = JText::_( 'Error Saving Settings' );
+ }
+
+ // Check the table in so it can be edited.... we are done with it anyway
+ $link = 'index.php?option=com_ninjarsssyndicator&task=config';
+ $this->setRedirect($link, $msg);
+ }
+}
+?>
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/defaultcontroller.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/defaultcontroller.php
new file mode 100644
index 00000000..0ba0252b
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/defaultcontroller.php
@@ -0,0 +1,75 @@
+registerTask('info', 'info');
+ $this->registerTask('buttonmaker', 'buttonmaker');
+ $this->registerTask('genbtn', 'gen_button');
+ $this->registerTask('config', 'config');
+ $this->registerTask('feeds', 'feeds');
+ $this->registerDefaultTask('feeds');
+ }
+
+ function display()
+ {
+ parent::display();
+ }
+
+ function info()
+ {
+ require_once(JPATH_COMPONENT . DS . 'views' . DS . 'about.php');
+ new NinjaRssSyndicatorViewAbout();
+ }
+
+ function buttonmaker()
+ {
+
+ JRequest::setVar('view','buttonmaker');
+ JRequest::setVar('layout','form');
+
+ $this->display();
+ }
+
+ function config()
+ {
+ JRequest::setVar('view','config');
+ JRequest::setVar('layout','config');
+
+ $this->display();
+ }
+
+ function feeds()
+ {
+ $document = &JFactory::getDocument();
+ $viewType = $document->getType();
+ $view = &$this->getView('feeds',$viewType,'NinjaRssSyndicatorView');
+ $model = &$this->getModel('feed');
+ if(!JError::isError($model))
+ {
+ $view->setModel($model,true);
+ }
+ $view->setLayout('feeds');
+ $view->display();
+
+ }
+
+ function gen_button()
+ {
+ JRequest::setVar( 'view', 'buttonmaker' );
+ JRequest::setVar( 'layout', 'button' );
+
+ parent::display();
+ }
+
+
+
+
+}
+?>
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/feed.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/feed.php
new file mode 100644
index 00000000..56659a6c
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/feed.php
@@ -0,0 +1,116 @@
+_link = 'index.php?option=com_ninjarsssyndicator&task=feeds';
+ $this->registerTask( 'add' , 'edit' );
+ $this->registerTask( 'apply' , 'save' );
+ }
+
+ function cancel()
+ {
+ //$msg = JText::_( 'Operation Cancelled' );
+ $this->setRedirect( $this->_link );
+ }
+
+ function edit()
+ {
+
+ JRequest::setVar( 'view', 'feed' );
+ JRequest::setVar( 'layout', 'feed' );
+ JRequest::setVar('hidemainmenu', 1);
+
+ parent::display();
+ }
+
+ function save()
+ {
+ $model = $this->getModel('feed');
+
+ if ($model->save($post)) {
+ $msg = JText::_( 'Feed Saved!' );
+ } else {
+ $msg = JText::_( 'Error Saving feed' );
+ }
+ if($this->_task == 'apply')
+ {
+ $id = JRequest::getVar( 'id', '', 'post', 'string' );
+ //die(JRequest::getVar('id' ));
+ $this->_link = "index.php?option=com_ninjarsssyndicator&task=edit&cid[]=$id&controller=feed";
+ }
+ $this->setRedirect( $this->_link, $msg );
+ }
+
+ function publish()
+ {
+
+ // Check for request forgeries
+ JRequest::checkToken() or jexit( 'Invalid Token' );
+
+ $cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
+ JArrayHelper::toInteger($cid);
+
+ if (count( $cid ) < 1) {
+ JError::raiseError(500, JText::_( 'Select an item to publish' ) );
+ }
+
+ $model = $this->getModel('feed');
+ if(!$model->publish($cid, 1)) {
+ echo "\n";
+ }
+
+ $this->setRedirect($this->_link);
+ }
+
+ function unpublish()
+ {
+
+ // Check for request forgeries
+ JRequest::checkToken() or jexit( 'Invalid Token' );
+
+ $cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
+ JArrayHelper::toInteger($cid);
+
+ if (count( $cid ) < 1) {
+ JError::raiseError(500, JText::_( 'Select an item to unpublish' ) );
+ }
+
+ $model = $this->getModel('feed');
+ if(!$model->publish($cid, 0)) {
+ echo "\n";
+ }
+
+ $this->setRedirect($this->_link);
+ }
+
+ function remove()
+ {
+ // Check for request forgeries
+ JRequest::checkToken() or jexit( 'Invalid Token' );
+
+ $cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
+ JArrayHelper::toInteger($cid);
+
+ if (count( $cid ) < 1) {
+ JError::raiseError(500, JText::_( 'Select an item to delete' ) );
+ }
+
+ $model = $this->getModel('feed');
+ if(!$model->delete($cid)) {
+ echo "\n";
+ }
+
+ $this->setRedirect($this->_link);
+ }
+
+
+
+}
+?>
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/controllers/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/install/install.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/install/install.php
new file mode 100644
index 00000000..a4fa2599
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/install/install.php
@@ -0,0 +1,46 @@
+setQuery("ALTER IGNORE TABLE `#__ninjarsssyndicator_feeds` DROP COLUMN `feed_catsInTitle`;");
+$database->query();
+$database->setQuery("ALTER IGNORE TABLE `#__ninjarsssyndicator_feeds` CHANGE COLUMN `msg_sectcat` `msg_exitems` varchar(250) default NULL;");
+$database->query();
+
+
+ //Do updates of table structure if we need to
+ //This is mainly for people doing an upgrade
+ $database->setQuery("SHOW FULL COLUMNS FROM #__ninjarsssyndicator_feeds where field = 'msg_contentPlugins'");
+ $results = $database->loadObjectList();
+
+ if (!count($results))
+ {
+ $database->setQuery(" ALTER TABLE `#__ninjarsssyndicator_feeds`
+ ADD COLUMN `msg_contentPlugins` tinyint(1) default NULL;");
+ $database->query();
+ }//if (!count($results))
+
+ $database->setQuery("SHOW FULL COLUMNS FROM #__ninjarsssyndicator_feeds where field = 'msg_includeCats'");
+ $results = $database->loadObjectList();
+
+ if (!count($results))
+ {
+ $database->setQuery(" ALTER TABLE `#__ninjarsssyndicator_feeds`
+ ADD COLUMN `msg_includeCats` tinyint(1) default NULL;");
+ $database->query();
+ }//if (!count($results))
+
+?>
+
+Ninja RSS Syndicator has been succesfully installed.
+
+Ninja RSS Syndicator was originally called BCA RSS Syndicator and developed by Body Health Debate to promote Breast Cancer Awareness in the Joomla community.
+
+
+Ninja RSS Syndicator has been succesfully uninstalled.
+NinjaForge
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/buttonmaker.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/buttonmaker.php
new file mode 100644
index 00000000..aa5a3038
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/buttonmaker.php
@@ -0,0 +1,31 @@
+'.JURI::root().'images/stories/'.$imgName.'';
+ else
+ return "There's an error while save image.Please try again!";
+ }
+}
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/config.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/config.php
new file mode 100644
index 00000000..540fafa3
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/config.php
@@ -0,0 +1,83 @@
+_data )) {
+ $query = $this->_buildQuery();
+ $this->_db->setQuery( $query );
+ $this->_data = $this->_db->loadObject();
+ }
+ if (!$this->_data) {
+ $this->_data = '';
+ }
+ return $this->_data;
+ }
+
+ function saveConfig(){
+ $id = JRequest::getVar('id', '1', 'post', 'int');
+ $msg = JRequest::getVar('msg', 'Get the latest news direct to your desktop', 'post', 'string');
+ $msg = $this->_db->Quote($this->_db->getEscaped($msg), false);
+ $defaultType = JRequest::getVar('defaultType', '1.0', 'post', 'string');
+ $count = JRequest::getVar('count', '10', 'post', 'string');
+ $orderby = JRequest::getVar('orderby', 'rdate', 'post', 'string');
+ $numWords = JRequest::getVar('numWords', '25', 'post', 'int');
+
+ $cache = JRequest::getVar('cache', '3600', 'post', 'int');
+ $imgUrl = JRequest::getVar('imgUrl', '', 'post', 'string');
+ $imgUrl = $this->_db->Quote($this->_db->getEscaped($imgUrl), false);
+ $renderAuthorFormat = JRequest::getVar('renderAuthorFormat', '1', 'post', 'string');
+ $renderHTML = JRequest::getVar('renderHTML', '0', 'post', 'int');
+ $FPItemsOnly = JRequest::getVar('FPItemsOnly', '1', 'post', 'int');
+ $description = JRequest::getVar('description', '', 'post', 'string');
+ $description = $this->_db->Quote($this->_db->getEscaped($description), false);
+
+ $query = "UPDATE #__ninjarsssyndicator SET msg = $msg,
+ defaultType='$defaultType',
+ count = '$count',
+ orderby = '$orderby',
+ numWords = $numWords,
+ cache = $cache,
+ imgUrl = $imgUrl,
+ renderAuthorFormat = '$renderAuthorFormat',
+ renderHTML = $renderHTML,
+ FPItemsOnly = $FPItemsOnly,
+ description = $description
+ WHERE id = $id";
+
+
+ $this->_db->setQuery($query);
+ $this->_data = $this->_db->query();
+
+ if($this->_data)
+ return true;
+ else
+ return false;
+ }
+
+
+}
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/feed.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/feed.php
new file mode 100644
index 00000000..e49527b3
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/feed.php
@@ -0,0 +1,339 @@
+getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' );
+ $limitstart = $mainframe->getUserStateFromRequest( $option.'.limitstart', 'limitstart', 0, 'int' );
+
+ // In case limit has been changed, adjust limitstart accordingly
+ $limitstart = ($limit != 0 ? (floor($limitstart / $limit) * $limit) : 0);
+
+ $this->setState('limit', $limit);
+ $this->setState('limitstart', $limitstart);
+
+ //edit feed
+ $array = JRequest::getVar('cid', 0, '', 'array');
+ $this->setId((int)$array[0]);
+ }
+
+ function setId($id)
+ {
+ // Set id and wipe data
+ $this->_id = $id;
+ $this->_sdata = null;
+ }
+ /**
+ * Method to get the total number of feeds items
+ *
+ * @access public
+ * @return integer
+ */
+ function getTotal()
+ {
+ // Lets load the content if it doesn't already exist
+ if (empty($this->_total))
+ {
+ $query = $this->_buildQuery();
+ $this->_total = $this->_getListCount($query);
+ }
+ return $this->_total;
+ }
+
+ /**
+ * Method to get a pagination object for the feeds
+ *
+ * @access public
+ * @return integer
+ */
+ function getPagination()
+ {
+ // Lets load the content if it doesn't already exist
+ if (empty($this->_pagination))
+ {
+ jimport('joomla.html.pagination');
+ $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );
+
+ }
+
+ return $this->_pagination;
+ }
+
+
+
+ function _buildQuery()
+ {
+ $query = "SELECT * FROM `#__ninjarsssyndicator_feeds`";
+ return $query;
+ }
+
+ function getData()
+ {
+ // Load the data
+ if (empty( $this->_data )) {
+ $query = $this->_buildQuery();
+ $this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));;
+ }
+ if (!$this->_data) {
+ $this->_data = null;
+ }
+
+ return $this->_data;
+ }
+
+
+//Feed
+
+ /**
+ * Method to remove a feed
+ *
+ * @access public
+ * @return boolean True on success
+ * @since 1.5
+ * lvh
+ */
+ function delete($cid = array())
+ {
+ $result = false;
+
+ if (count( $cid ))
+ {
+ JArrayHelper::toInteger($cid);
+ $cids = implode( ',', $cid );
+ $query = 'DELETE FROM `#__ninjarsssyndicator_feeds`'
+ . ' WHERE id IN ( '.$cids.' )';
+ $this->_db->setQuery( $query );
+ if(!$this->_db->query()) {
+ $this->setError($this->_db->getErrorMsg());
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Method to (un)publish a feed
+ *
+ * @access public
+ * @return boolean True on success
+ * @since 1.5
+ * lvh
+ */
+ function publish($cid = array(), $publish = 1)
+ {
+ $user =& JFactory::getUser();
+
+ if (count( $cid ))
+ {
+ JArrayHelper::toInteger($cid);
+ $cids = implode( ',', $cid );
+
+ $query = "UPDATE `#__ninjarsssyndicator_feeds` SET published='$publish'"
+ . "\nWHERE id IN ($cids)";
+ $this->_db->setQuery( $query );
+ if (!$this->_db->query()) {
+ $this->setError($this->_db->getErrorMsg());
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ function getSData()
+ {
+ // Load the data
+ if (empty( $this->_sdata )) {
+ $query = "SELECT * FROM `#__ninjarsssyndicator_feeds` WHERE id = $this->_id";
+ $this->_db->setQuery( $query );
+ $this->_sdata = $this->_db->loadObject();
+ }
+ if (!$this->_sdata) {
+ $this->_sdata = new stdClass();
+ $this->_sdata->id = 0;
+ }
+ return $this->_sdata;
+ }
+
+ function getSections()
+ {
+ if (empty( $this->_sections ))
+ {
+ $query = "SELECT id, title"
+ . "\n FROM #__sections"
+ . "\n WHERE published = 1"
+ . "\n AND scope = 'content'"
+ . "\n ORDER BY ordering"
+ ;
+ $this->_sections = $this->_getList( $query );
+ }
+ return $this->_sections;
+ }
+
+ function getExCategories()
+ {
+ if (empty( $this->_exCategories ))
+ {
+ $query = "SELECT c.id, CONCAT( s.title, ' | ', c.title ) AS title"
+ . "\n FROM #__categories AS c"
+ . "\n INNER JOIN #__sections AS s ON s.id=c.section"
+ . "\n WHERE c.published = 1"
+ . "\n AND s.published = 1"
+ . "\n AND s.scope = 'content'"
+ . "\n ORDER BY s.ordering, c.ordering"
+ ;
+ $this->_exCategories = $this->_getList( $query );
+ }
+ return $this->_exCategories;
+ }
+
+ function getSectionCategoryList()
+ {
+ if (empty( $this->_seccatlist ))
+ {
+ $query = "SELECT id AS value, title AS text FROM #__sections ORDER BY title";
+ $secs = $this->_getList( $query );
+ foreach($secs as $sec)
+ {
+ $subquery = "SELECT id AS value, title FROM #__categories WHERE section = " . $sec->value . " ORDER BY title";
+ $cats = $this->_getList( $subquery );
+
+ foreach($cats as $cat)
+ {
+ $this->_seccatlist[] = $cat->title;
+
+ }
+ }
+ }
+ return $this->_seccatlist;
+ }
+
+ function save()
+ {
+ $id = JRequest::getVar('id', '0', 'post', 'int');
+ $a_msg_sectlist = JRequest::getVar('msg_sectlist', array(), 'post', 'array');
+ $a_msg_excatlist = JRequest::getVar('msg_excatlist', array(), 'post', 'array');
+
+ $msg_sectlist = implode(',', $a_msg_sectlist);
+ $msg_excatlist = implode(',', $a_msg_excatlist);
+
+ $feed_name = JRequest::getVar('feed_name', '', 'post', 'string');
+ $feed_name = $this->_db->Quote($this->_db->getEscaped($feed_name), false);
+
+ $feed_description = JRequest::getVar('feed_description', '', 'post', 'string');
+ $feed_description = $this->_db->Quote($this->_db->getEscaped($feed_description), false);
+
+ $feed_type = JRequest::getVar('feed_type', '', 'post', 'string');
+ $feed_cache = JRequest::getVar('feed_cache', '', 'post', 'string');
+
+ $feed_imgUrl = JRequest::getVar('feed_imgUrl', '', 'post', 'string');
+ $feed_imgUrl = $this->_db->Quote($this->_db->getEscaped($feed_imgUrl), false);
+
+ $feed_button = JRequest::getVar('feed_button', '', 'post', 'string');
+ $feed_button = $this->_db->Quote($this->_db->getEscaped($feed_button), false);
+
+ $feed_renderAuthorFormat = JRequest::getVar('feed_renderAuthorFormat', '', 'post', 'string');
+ $feed_renderHTML = JRequest::getVar('feed_renderHTML', '0', 'post', 'int');
+ $feed_renderImages = JRequest::getVar('feed_renderImages', '0', 'post', 'int');
+ $msg_count = JRequest::getVar('msg_count', '', 'post', 'string');
+ $msg_orderby=JRequest::getVar('msg_orderby', '', 'post', 'string');
+ $msg_numWords = JRequest::getVar('msg_numWords', '0', 'post', 'int');
+ $msg_FPItemsOnly = JRequest::getVar('msg_FPItemsOnly', '0', 'post', 'int');
+ $msg_fulltext = JRequest::getVar('msg_fulltext', '0', 'post', 'int');
+ $published = JRequest::getVar('published', '0', 'post', 'int');
+ //VH Oct 27 2008
+ $msg_exitems = JRequest::getVar('msg_exitems', '', 'post', 'string');
+
+ $msg_contentPlugins = JRequest::getVar('msg_contentPlugins', '0', 'post', 'int');
+ $msg_includeCats = JRequest::getVar('msg_includeCats', '0', 'post', 'int');
+
+ $isNew = ($id<1);
+ if($isNew)
+ $query = "INSERT INTO #__ninjarsssyndicator_feeds (`feed_name`,`feed_description`, `feed_type`, `feed_cache` ,`feed_imgUrl`,
+ `feed_button`, `feed_renderAuthorFormat`, `feed_renderHTML`, `feed_renderImages` , `msg_count` , `msg_orderby`,
+ `msg_numWords` , `msg_FPItemsOnly`, `msg_sectlist` , `msg_excatlist` , `msg_includeCats`, `msg_fulltext` , `msg_exitems` ,
+ `msg_contentPlugins`, `published`)
+ VALUES
+ (
+ $feed_name,
+ $feed_description,
+ '$feed_type',
+ '$feed_cache',
+ $feed_imgUrl,
+ $feed_button,
+ '$feed_renderAuthorFormat',
+ '$feed_renderHTML',
+ '$feed_renderImages',
+ '$msg_count',
+ '$msg_orderby',
+ '$msg_numWords',
+ '$msg_FPItemsOnly',
+ '$msg_sectlist',
+ '$msg_excatlist',
+ '$msg_includeCats',
+ '$msg_fulltext',
+ '$msg_exitems',
+ '$msg_contentPlugins',
+ '$published'
+ )
+ ";
+ else
+ $query = "UPDATE #__ninjarsssyndicator_feeds SET
+ `feed_name` = $feed_name,
+ `feed_description` = $feed_description,
+ `feed_type` = '$feed_type',
+ `feed_cache` = '$feed_cache',
+ `feed_imgUrl` = $feed_imgUrl,
+ `feed_button` = $feed_button,
+ `feed_renderAuthorFormat` = '$feed_renderAuthorFormat',
+ `feed_renderHTML` = '$feed_renderHTML',
+ `feed_renderImages` = '$feed_renderImages',
+ `msg_count` = '$msg_count',
+ `msg_orderby` = '$msg_orderby',
+ `msg_numWords` = '$msg_numWords',
+ `msg_FPItemsOnly` = '$msg_FPItemsOnly',
+ `msg_sectlist` = '$msg_sectlist',
+ `msg_excatlist` = '$msg_excatlist',
+ `msg_includeCats` = '$msg_includeCats',
+ `msg_fulltext` = '$msg_fulltext',
+ `msg_exitems` = '$msg_exitems',
+ `msg_contentPlugins` = '$msg_contentPlugins',
+ `published` = '$published'
+ WHERE id = $id
+ ";
+ $this->_db->setQuery($query);
+ $this->_data = $this->_db->query();
+ if($this->_data)
+ return true;
+ else
+ return false;
+ }
+
+ function getDefaultData()
+ {
+ $config =& $this->getInstance('config','ninjarsssyndicatorModel');
+ return $config->getData();
+ }
+
+}
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/models/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/about.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/about.php
new file mode 100644
index 00000000..e9654715
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/about.php
@@ -0,0 +1,40 @@
+[ ' . $text.' ] ', 'systeminfo.png' );
+ $this->about();
+ }
+
+ function about()
+ {
+ ?>
+
+
+
+ The Ninja RSS Syndicator component makes your content available in different RSS, OPML and ATOM 0.3 formats.
+
+
If you need help with configuring this component just ask on the NinjaForge forums.
+
Ninja RSS Syndicator was originally called the BCA RSS Syndicator and was developed by Body Health Debate to raise awareness of breast cancer in the Joomla Community.
+
License
+
Ninja RSS Syndicator is free software; you can redistribute it and/or modify it under the terms of the General Public License as published by the Free Software Foundation.
+
Resources
+
+
Ninja RSS Syndicator is based upon the Joomla 1.0 DS-Syndicate component, and was converted to Joomla 1.5 by XiPat
+
Ninja RSS Syndicator makes use of the free FeedCreator class by Kai Blankenhorn and the excellent XMLRPC Library from Incutio . The Button Maker code was a creation of Bill Zeller with an user interface from here . The implementation of the MetaWeblog and blogger APIs were implemented by Gayle Davies with help from code from NucleusCMS. My changes were to refactor the code.
+
+
Copyright 2009, NinjaForge and Body Health Debate .
+
+
+
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/button.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/button.php
new file mode 100644
index 00000000..e6534128
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/button.php
@@ -0,0 +1,210 @@
+0, "y"=>0, "w"=>6);
+$images[66] = array("x"=>6, "y"=>0, "w"=>6);
+$images[67] = array("x"=>12, "y"=>0, "w"=>6);
+$images[68] = array("x"=>18, "y"=>0, "w"=>6);
+$images[69] = array("x"=>24, "y"=>0, "w"=>5);
+$images[70] = array("x"=>29, "y"=>0, "w"=>5);
+$images[71] = array("x"=>34, "y"=>0, "w"=>6);
+$images[72] = array("x"=>40, "y"=>0, "w"=>6);
+$images[73] = array("x"=>46, "y"=>0, "w"=>3);
+$images[74] = array("x"=>49, "y"=>0, "w"=>6);
+$images[75] = array("x"=>55, "y"=>0, "w"=>6);
+$images[76] = array("x"=>61, "y"=>0, "w"=>5);
+$images[77] = array("x"=>66, "y"=>0, "w"=>7);
+$images[78] = array("x"=>73, "y"=>0, "w"=>7);
+$images[79] = array("x"=>80, "y"=>0, "w"=>6);
+$images[80] = array("x"=>86, "y"=>0, "w"=>6);
+$images[81] = array("x"=>92, "y"=>0, "w"=>6);
+$images[82] = array("x"=>98, "y"=>0, "w"=>6);
+$images[83] = array("x"=>104, "y"=>0, "w"=>6);
+$images[84] = array("x"=>110, "y"=>0, "w"=>5);
+$images[85] = array("x"=>115, "y"=>0, "w"=>6);
+$images[86] = array("x"=>121, "y"=>0, "w"=>7);
+$images[87] = array("x"=>128, "y"=>0, "w"=>7);
+$images[88] = array("x"=>135, "y"=>0, "w"=>7);
+$images[89] = array("x"=>142, "y"=>0, "w"=>7);
+$images[90] = array("x"=>149, "y"=>0, "w"=>5);
+$images[32] = array("x"=>154, "y"=>0, "w"=>4);
+
+$images[49] = array("x"=>0, "y"=>10, "w"=>5);
+$images[50] = array("x"=>5, "y"=>10, "w"=>6);
+$images[51] = array("x"=>11, "y"=>10, "w"=>6);
+$images[52] = array("x"=>17, "y"=>10, "w"=>6);
+$images[53] = array("x"=>23, "y"=>10, "w"=>6);
+$images[54] = array("x"=>29, "y"=>10, "w"=>6);
+$images[55] = array("x"=>35, "y"=>10, "w"=>6);
+$images[56] = array("x"=>41, "y"=>10, "w"=>6);
+$images[57] = array("x"=>47, "y"=>10, "w"=>6);
+$images[48] = array("x"=>53, "y"=>10, "w"=>6);
+
+$images[33] = array("x"=>59, "y"=>10, "w"=>3);// !
+$images[64] = array("x"=>62, "y"=>10, "w"=>7);// @
+$images[35] = array("x"=>69, "y"=>10, "w"=>7);// #
+$images[36] = array("x"=>76, "y"=>10, "w"=>6);// $
+$images[37] = array("x"=>82, "y"=>10, "w"=>7);// %
+$images[94] = array("x"=>89, "y"=>10, "w"=>5);// ^
+$images[38] = array("x"=>94, "y"=>10, "w"=>6);// &
+$images[42] = array("x"=>100, "y"=>10, "w"=>7);// *
+$images[40] = array("x"=>107, "y"=>10, "w"=>4);// (
+$images[41] = array("x"=>111, "y"=>10, "w"=>4);// )
+$images[95] = array("x"=>115, "y"=>10, "w"=>6);// _
+$images[43] = array("x"=>121, "y"=>10, "w"=>7);// +
+$images[96] = array("x"=>128, "y"=>10, "w"=>4);// `
+$images[126] = array("x"=>132, "y"=>10, "w"=>6);// ~
+$images[91] = array("x"=>138, "y"=>10, "w"=>4);// [
+$images[93] = array("x"=>142, "y"=>10, "w"=>4);// ]
+$images[92] = array("x"=>146, "y"=>10, "w"=>5);// \
+$images[123] = array("x"=>151, "y"=>10, "w"=>5);// {
+$images[125] = array("x"=>156, "y"=>10, "w"=>5);// }
+$images[124] = array("x"=>161, "y"=>10, "w"=>3);// |
+$images[59] = array("x"=>164, "y"=>10, "w"=>4);// ;
+$images[58] = array("x"=>168, "y"=>10, "w"=>3);// :
+$images[39] = array("x"=>171, "y"=>10, "w"=>3);// '
+$images[34] = array("x"=>174, "y"=>10, "w"=>5);// "
+$images[44] = array("x"=>179, "y"=>10, "w"=>4);// ,
+$images[46] = array("x"=>183, "y"=>10, "w"=>3);// .
+$images[47] = array("x"=>186, "y"=>10, "w"=>5);// /
+$images[60] = array("x"=>191, "y"=>10, "w"=>5);// <
+$images[62] = array("x"=>196, "y"=>10, "w"=>5);// >
+$images[63] = array("x"=>201, "y"=>10, "w"=>6);// ?
+$images[61] = array("x"=>207, "y"=>10, "w"=>5);// =
+
+
+$letters = imagecreatefrompng($lettersPath);
+$rgb = getRGB($leftTextColor);
+
+$index = imagecolorexact($letters, 0, 0, 0);
+imagecolorset ($letters, $index, $rgb[0], $rgb[1], $rgb[2]);
+
+$leftText = stripslashes(strtoupper($leftText));
+
+$leftPos = $leftTextPosition;
+for($i=0;$i'.JURI::root().'components/com_ninjarsssyndicator/assets/images/buttons/'.$img_name.'');
+ }
+ else
+ {
+ exit("Error saving image");
+ }
+}
+else
+{
+ header ("Content-type: image/png");
+ imagepng ($im);
+ exit();
+}
+
+function _isWritable($path) {
+ if ($path{strlen($path)-1}=='/')
+ return _isWritable($path.uniqid(mt_rand()).'.tmp');
+
+ if (file_exists($path)) {
+ if (!($f = @fopen($path, 'r+')))
+ return false;
+ fclose($f);
+ return true;
+ }
+
+ if (!($f = @fopen($path, 'w')))
+ return false;
+ fclose($f);
+ unlink($path);
+ return true;
+ }
+
+?>
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/form.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/form.php
new file mode 100644
index 00000000..7ad697fb
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/form.php
@@ -0,0 +1,173 @@
+
+
+
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/letters.png b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/letters.png
new file mode 100644
index 00000000..b0734ec0
Binary files /dev/null and b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/tmpl/letters.png differ
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/view.html.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/view.html.php
new file mode 100644
index 00000000..fd959641
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/buttonmaker/view.html.php
@@ -0,0 +1,17 @@
+[ ' . $text.' ] ', 'mediamanager.png' );
+
+ parent::display($tpl);
+ }
+}
+?>
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/tmpl/config.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/tmpl/config.php
new file mode 100644
index 00000000..59142f39
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/tmpl/config.php
@@ -0,0 +1,50 @@
+
+
+ function loadImg(elem) {
+ document.getElementById("feedImg").src = elem.value;
+ }
+
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/tmpl/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/tmpl/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/view.html.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/view.html.php
new file mode 100644
index 00000000..a293ebf3
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/config/view.html.php
@@ -0,0 +1,70 @@
+get('Data');
+ $text = 'Default settings';
+ JToolBarHelper::title( JText::_( 'Ninja RSS Syndicator').': [ ' . $text.' ] ', 'config.png' );
+
+ $lists = array();
+
+ $rssType[] = JHTML::_('select.option', '2.0','RSS 2.0');
+ $rssType[] = JHTML::_('select.option', '1.0','RSS 1.0');
+ $rssType[] = JHTML::_('select.option', '0.91','RSS 0.91');
+ $rssType[] = JHTML::_('select.option', 'ATOM','ATOM');
+ $rssType[] = JHTML::_('select.option', 'OPML','OPML');
+ $rssType[] = JHTML::_('select.option', 'MBOX','MBOX');
+ $rssType[] = JHTML::_('select.option', 'HTML','HTML');
+ $rssType[] = JHTML::_('select.option', 'JS','JS');
+ $lists['rssTypeList'] = JHTML::_('select.genericlist', $rssType, 'defaultType', 'class="inputbox"', 'value', 'text', $configs->defaultType ? $configs->defaultType : '2.0', 'defaultType');
+
+ $orderings[] = JHTML::_('select.option', 'date','Created Date Ascending');
+ $orderings[] = JHTML::_('select.option', 'rdate','Created Date Descending');
+ $orderings[] = JHTML::_('select.option', 'mdate','Modified Date Ascending');
+ $orderings[] = JHTML::_('select.option', 'mrdate','Modified Date Descending');
+ $orderings[] = JHTML::_('select.option', 'catsect','Joomla Section, Category ordering');
+ $orderings[] = JHTML::_('select.option', 'artord','Joomla Article ordering');
+ $lists['orderingList'] = JHTML::_('select.genericlist', $orderings, 'orderby', 'class="inputbox"', 'value', 'text', $configs->orderby, 'orderby');
+
+ $numWords[] = JHTML::_('select.option','0','All');
+ for ($i=25;$i<=250;$i+=25) {
+ $numWords[] = JHTML::_('select.option',$i,$i);
+ }
+ $lists['numWordsList'] = JHTML::_('select.genericList', $numWords, 'numWords', 'class="inputbox"','value', 'text', $configs->numWords, 'numWords');
+
+ $authorformats[] = JHTML::_( 'select.option', '1','Yes');
+ $authorformats[] = JHTML::_( 'select.option', '0','No');
+ $lists['renderAuthorList'] = JHTML::_('select.genericList', $authorformats, 'renderAuthorFormat', 'class="inputbox"','value', 'text',$configs->renderAuthorFormat );
+
+ $renderHTML[] = JHTML::_( 'select.option', '1','Yes');
+ $renderHTML[] = JHTML::_( 'select.option', '0','No');
+ $lists['renderHTMLList'] =JHTML::_( 'select.genericList',$renderHTML, 'renderHTML', 'class="inputbox"','value', 'text',$configs->renderHTML );
+
+ $FPItemsOnly[] = JHTML::_( 'select.option', '0','All items');
+ $FPItemsOnly[] = JHTML::_( 'select.option', '1','Front page items only');
+ $FPItemsOnly[] = JHTML::_( 'select.option', '2','Non-frontpage items only');
+ $lists['FPItemsOnlyList'] =JHTML::_( 'select.genericList',$FPItemsOnly, 'FPItemsOnly', 'class="inputbox"','value', 'text',$configs->FPItemsOnly );
+
+ $this->assignRef('id', $configs->id);
+ $this->assignRef('msg', $configs->msg);
+ $this->assignRef('defaultType', $lists['rssTypeList']);
+ $this->assignRef('count', $configs->count);
+ $this->assignRef('orderby', $lists['orderingList']);
+ $this->assignRef('numWords', $lists['numWordsList']);
+ $this->assignRef('renderAuthorFormat', $lists['renderAuthorList']);
+ $this->assignRef('renderHTML', $lists['renderHTMLList']);
+ $this->assignRef('FPItemsOnly', $lists['FPItemsOnlyList']);
+ $this->assignRef('cache', $configs->cache);
+ $this->assignRef('imgUrl', $configs->imgUrl);
+ $this->assignRef('description', $configs->description);
+ parent::display($tpl);
+ }
+}
+?>
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/tmpl/feed.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/tmpl/feed.php
new file mode 100644
index 00000000..f11a023e
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/tmpl/feed.php
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ Feed name:
+
+
+
+ RSS Description editor->display( 'feed_description', $this->description, 500, 200, 70, 20, 1 ) ; ?>
+
+
+ Provide feed as RSS type: lists['rssTypeList']; ?>
+
+
+ Number of messages to show in feed:
+
+
+ Order by lists['orderingList']; ?>
+
+ > MAD 2007/10/10 */ ?>
+
+ Select the number of words to display in the feed lists['numWordsList']; ?>
+
+
+ Fulltext lists['fulltextlist'];?>
+
+
+
+ Include Author's email and name? lists['renderAuthorList']; ?>
+
+
+ Render HTML? lists['renderHTMLList'];?>
+
+
+ Render Images? lists['renderImagesList'];?>
+
+
+ Frontpage Items only? lists['FPItemsOnlyList'];?>
+
+
+ Number of seconds to cache
+
+
+ Published? lists['renderPublishedList'];?>
+
+
+ Section(s) lists['sectionlist'];?>
+
+
+ Include or Exclude Categories? lists['includeCats'];?>
+
+ > AGE 2007/09/25 */ ?>
+
+ Selected Categories lists['excludedcatlist'];?>
+
+
+ Excluded article(s)
+
+ exitems; ?>
+ Enter article id(s) you want to exclude.
+ Seperate id with a ",". Example: 1, 2, 3, 4, 5, 6
+
+
+
+ Feed image
+
+
+ [Tab] to preview or leave blank to leave out image details from feed
+
+
+
+ Image Preview:
+
+
+ Feed button
+ lists['feedButtons']);?>
+ BtnImgUrl); ?>" />
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/tmpl/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/tmpl/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/view.html.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/view.html.php
new file mode 100644
index 00000000..126af548
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feed/view.html.php
@@ -0,0 +1,151 @@
+get('SData');
+ $sections =& $this->get('Sections');
+ $exCategories =& $this->get('ExCategories');
+ $isNew = ($feed->id<1);
+ $text = $isNew ? 'New feed':'Change feed: '. $feed->feed_name;
+
+ JToolBarHelper::title( JText::_( 'Ninja RSS Syndicator').': [ ' . $text.' ] ', 'addedit.png' );
+ JToolBarHelper::apply();
+ JToolBarHelper::save();
+
+ $lists = array();
+
+ if ($isNew) {
+ JToolBarHelper::cancel();
+ $default =& $this->get('DefaultData');
+ } else {
+ // for existing items the button is renamed `close`
+ JToolBarHelper::cancel( 'cancel', 'close' );
+ }
+
+
+ //rss type list
+
+ $rssType[] = JHTML::_('select.option', '2.0','RSS 2.0');
+ $rssType[] = JHTML::_('select.option', '1.0','RSS 1.0');
+ $rssType[] = JHTML::_('select.option', '0.91','RSS 0.91');
+ $rssType[] = JHTML::_('select.option', 'ATOM','ATOM');
+ $rssType[] = JHTML::_('select.option', 'OPML','OPML');
+ $rssType[] = JHTML::_('select.option', 'MBOX','MBOX');
+ $rssType[] = JHTML::_('select.option', 'HTML','HTML');
+ $rssType[] = JHTML::_('select.option', 'JS','JS');
+ $lists['rssTypeList'] = JHTML::_('select.genericlist', $rssType, 'feed_type', 'class="inputbox"', 'value', 'text', $isNew ? $default->defaultType : $feed->feed_type, 'feed_type');
+
+ $fulltext[] = JHTML::_('select.option', "0","Intro text only");
+ $fulltext[] = JHTML::_('select.option', "1","Intro text + Read more link");
+ $fulltext[] = JHTML::_('select.option', "2","Intro text + Full text");
+ $fulltext[] = JHTML::_('select.option', "3","Full text only");
+ $lists['fulltextlist'] = JHTML::_('select.genericlist', $fulltext, 'msg_fulltext', 'class="inputbox"', 'value', 'text', $isNew ? '1': $feed->msg_fulltext );
+
+ $orderings[] = JHTML::_('select.option', 'date','Created Date Ascending');
+ $orderings[] = JHTML::_('select.option', 'rdate','Created Date Descending');
+ $orderings[] = JHTML::_('select.option', 'mdate','Modified Date Ascending');
+ $orderings[] = JHTML::_('select.option', 'mrdate','Modified Date Descending');
+ $orderings[] = JHTML::_('select.option', 'catsect','Joomla Section, Category ordering');
+ $orderings[] = JHTML::_('select.option', 'artord','Joomla Article ordering');
+ $lists['orderingList'] = JHTML::_('select.genericlist', $orderings, 'msg_orderby', 'class="inputbox"', 'value', 'text', $isNew ? $default->orderby : $feed->msg_orderby, 'msg_orderby');
+
+ $numWords[] = JHTML::_('select.option','0','All');
+ for ($i=25;$i<=250;$i+=25) {
+ $numWords[] = JHTML::_('select.option',$i,$i);
+ }
+ $lists['numWordsList'] = JHTML::_('select.genericList', $numWords, 'msg_numWords', 'class="inputbox"','value', 'text', $isNew ? $default->numWords : $feed->msg_numWords, 'msg_numWords' );
+
+ $FPItemsOnly[] = JHTML::_( 'select.option', '0','All items');
+ $FPItemsOnly[] = JHTML::_( 'select.option', '1','Front page items only');
+ $FPItemsOnly[] = JHTML::_( 'select.option', '2','Non-frontpage items only');
+ $lists['FPItemsOnlyList'] =JHTML::_( 'select.genericList',$FPItemsOnly, 'msg_FPItemsOnly', 'class="inputbox"','value', 'text',$isNew ? $default->FPItemsOnly : $feed->msg_FPItemsOnly, 'msg_FPItemsOnly' );
+
+ $yesNoList[] = JHTML::_( 'select.option', "1","Yes");
+ $yesNoList[] = JHTML::_( 'select.option', "0","No");
+ $lists['renderImagesList'] = JHTML::_( 'select.genericList', $yesNoList, 'feed_renderImages', 'class="inputbox"','value', 'text',$isNew ? '1' : $feed->feed_renderImages );
+ $lists['renderPublishedList'] = JHTML::_( 'select.genericList', $yesNoList, 'published', 'class="inputbox"','value', 'text',$isNew ? NULL : $feed->published);
+ $lists['renderHTMLList'] =JHTML::_( 'select.genericList',$yesNoList, 'feed_renderHTML', 'class="inputbox"','value', 'text', $isNew ? $default->renderHTML : $feed->feed_renderHTML , 'feed_renderHTML');
+ $lists['renderAuthorList'] = JHTML::_('select.genericList', $yesNoList, 'feed_renderAuthorFormat', 'class="inputbox"','value', 'text', $isNew ? $default->renderAuthorFormat : $feed->feed_renderAuthorFormat, 'feed_renderAuthorFormat' );
+
+
+ $includeCats[] = JHTML::_( 'select.option', "0","Exclude Selected Categories");
+ $includeCats[] = JHTML::_( 'select.option', "1","Include Selected Categories");
+ $lists['includeCats'] = JHTML::_( 'select.genericList', $includeCats, 'msg_includeCats', 'class="inputbox"','value', 'text',$isNew ? NULL : $feed->msg_includeCats);
+
+
+
+ //Section list
+ $sectOptions[] = JHTML::_('select.option', "","All sections");
+ $sectOptions[] = JHTML::_('select.option', "0","Uncategorised");
+ foreach($sections as $section)
+ {
+ $sectOptions[] = JHTML::_('select.option', $section->id,$section->title);
+ }
+
+ if($isNew)
+ $sectSelected = '';
+ else
+ $sectSelected = explode(',',$feed->msg_sectlist);
+
+ $lists['sectionlist'] = JHTML::_( 'select.genericList',$sectOptions, 'msg_sectlist' . '[]', ' class="inputbox" multiple="true"', 'value', 'text', $sectSelected );
+ //Excluded categories
+ if($isNew)
+ $exCatSelected = '';
+ else
+ $exCatSelected = explode(',',$feed->msg_excatlist);
+
+ $exCatOptions[] = JHTML::_('select.option', "",'No Selection');
+ $exCatOptions[] = JHTML::_('select.option', "0","Uncategorised");
+ foreach($exCategories as $exCategory)
+ {
+ $exCatOptions[] = JHTML::_('select.option', $exCategory->id,$exCategory->title);
+ }
+
+ $lists['excludedcatlist'] = JHTML::_( 'select.genericList', $exCatOptions, 'msg_excatlist' . '[]', 'class="inputbox" multiple="true"', 'value', 'text', $exCatSelected );
+
+ //Feedbutton images uit de directory laden
+ $button_path = JPATH_ROOT .DS. "components".DS."com_ninjarsssyndicator".DS."assets".DS."images".DS."buttons";
+ $dir = @opendir($button_path);
+ $button_images = array();
+ $button_col_count = 0;
+
+ while( $file = @readdir($dir) )
+ {
+ if( $file != '.' && $file != '..' && is_file($button_path . '/' . $file) && !is_link($button_path . '/' . $file) )
+ {
+ if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $file) )
+ {
+ $button_images[$button_col_count] = $file;
+ $button_name[$button_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $file)));
+ $buttons[] = JHTML::_( 'select.option', $button_images[$button_col_count], $button_name[$button_col_count]);
+ $button_col_count++;
+ }
+ }
+ }
+ @closedir($dir);
+ $lists['feedButtons'] = JHTML::_( 'select.genericList', $buttons, 'feed_button', 'onchange="loadButton(this)" class="inputbox" ','value', 'text',$isNew ? 'rss20.gif' : $feed->feed_button);
+
+ //Editor
+ $editor =& JFactory::getEditor();
+
+ $this->assignRef('id', $feed->id);
+ $this->assignRef('name', $feed->feed_name);
+ $this->assignRef('count', $feed->msg_count = $isNew? $default->count:$feed->msg_count);
+ $this->assignRef('cache', $feed->feed_cache = $isNew? $default->cache:$feed->feed_cache);
+ $this->assignRef('imgUrl', $feed->feed_imgUrl);
+ $isNew? $feed->feed_button='rss20.gif':$feed->feed_button;
+ $this->assignRef('BtnImgUrl', $feed->feed_button);
+ $this->assignRef('exitems', $feed->msg_exitems);
+ $this->assignRef('description', $feed->feed_description = $isNew ? $default->description : $feed->feed_description);
+ $this->assignRef('editor', $editor);
+ $this->assignRef('lists', $lists);
+ parent::display($tpl);
+ }
+}
+?>
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/tmpl/feeds.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/tmpl/feeds.php
new file mode 100644
index 00000000..1b4a8200
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/tmpl/feeds.php
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/tmpl/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/tmpl/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/view.html.php b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/view.html.php
new file mode 100644
index 00000000..ca73f95a
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/feeds/view.html.php
@@ -0,0 +1,30 @@
+[ ' . $text.' ] ', 'addedit.png' );
+
+ JToolBarHelper::publishList();
+ JToolBarHelper::unpublishList();
+ JToolBarHelper::deleteList();
+ JToolBarHelper::editListX();
+ JToolBarHelper::addNewX();
+
+ $items = & $this->get( 'Data');
+ $total = & $this->get( 'Total');
+ $pagination = & $this->get( 'Pagination' );
+
+ $this->assignRef('items', $items);
+ $this->assignRef('pagination', $pagination);
+
+ parent::display($tpl);
+ }
+}
+?>
\ No newline at end of file
diff --git a/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/index.html b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/oss/joomla/trunk/administrator/components/com_ninjarsssyndicator/views/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file