Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 2013)
+++ branches/2.8.x/CHANGELOG	(revision 2014)
@@ -11,6 +11,8 @@
 ! = Update/Change
 ===============================================================================
 
+04 Nov-2013 Build 2014 Manuela v.d.Decken(DarkViper)
++ added new Interface usable to connect from WYSIWYG-Editor to all Modules with subitems like news or topics
 04 Nov-2013 Build 2013 Manuela v.d.Decken(DarkViper)
 # admin/groups some logical errors fixed
 03 Nov-2013 Build 2012 Manuela v.d.Decken(DarkViper)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 2013)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 2014)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '2013');
+if(!defined('REVISION')) define('REVISION', '2014');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/framework/WbLinkAbstract.php
===================================================================
--- branches/2.8.x/wb/framework/WbLinkAbstract.php	(revision 2013)
+++ branches/2.8.x/wb/framework/WbLinkAbstract.php	(revision 2014)
@@ -45,7 +45,61 @@
 	}
 
 	abstract public function makeLinkFromTag(array $aReplacement);
-//	abstract public function generateLinkList(Template $oTpl);
+	abstract public function &generateOptionsList();
 
+/**
+ *
+ * @param string $sAddonName
+ * @param string $sAddonTableName
+ * @param string $sPageIdName
+ * @param string $sSectionIdName
+ * @param string $sItemIdName
+ * @param string $sDateTimeName
+ * @param string $sTitleName
+ * @param string $sActivatedName
+ * @return array by reference
+ */
+	final protected function &_executeListGeneration(
+	                                                  $sAddonName      = 'news',
+	                                                  $sAddonTableName = 'mod_news_posts',
+	                                                  $sPageIdName     = 'page_id',
+	                                                  $sSectionIdName  = 'section_id',
+	                                                  $sItemIdName     = 'post_id',
+	                                                  $sDateTimeName   = 'created_when',
+	                                                  $sTitleName      = 'title',
+	                                                  $sActivatedName  = 'active'
+	                                                )
+	{
+		$aAddonItems = array();
+		//generate news lists
+		$sql = 'SELECT `p`.`'.$sItemIdName.'` `ItemId`, `p`.`'.$sPageIdName.'` `PageId`, '
+		     .        '`s`.`section_id` `SectionId`, `p`.`'.$sTitleName.'` `Title` '
+		     . 'FROM `'.$this->oDb->TablePrefix.'sections` `s` '
+			 . 'LEFT JOIN `'.$this->oDb->TablePrefix.$sAddonTableName.'` `p` ON `s`.`section_id`= `p`.`'.$sSectionIdName.'` '
+			 . 'WHERE `p`.`'.$sActivatedName.'`>0 AND `s`.`module`=\''.$sAddonName.'\' '
+			 . 'ORDER BY `s`.`page_id`, `s`.`section_id`, `p`.`'.$sDateTimeName.'` DESC';
+		if (( $oRes = $this->oDb->doQuery($sql))) {
+			$iCurrentPage    = 0;
+			$iCurrentSection = 0;
+			$iSectionCounter = 0;
+			while ($aItem = $oRes->fetchRow(MYSQL_ASSOC)) {
+				if ($iCurrentPage != $aItem['PageId']) {
+					$iCurrentPage = $aItem['PageId'];
+					$aAddonItems[$iCurrentPage.'P'] = array();
+				}
+				if ($iCurrentSection != $aItem['SectionId']) {
+					$iCurrentSection = $aItem['SectionId'];
+					$aAddonItems[$iCurrentPage.'P'][] = array();
+					$iSectionCounter = sizeof($aAddonItems[$iCurrentPage.'P'])-1;
+				}
+				$aAddonItems[$iCurrentPage.'P'][$iSectionCounter][] = array(
+				    'wblink' => '[wblink'.$aItem['PageId'].'?addon='.$sAddonName.'&item='.$aItem['ItemId'].']',
+				    'title'  => preg_replace("/\r?\n/", "\\n", $this->oDb->escapeString($aItem['Title']))
+				);
+			}
+		}
+		return $aAddonItems;
+	}
 
+
 } // end of class WbLinkAbstract
Index: branches/2.8.x/wb/modules/output_filter/filters/filterWbLink.php
===================================================================
--- branches/2.8.x/wb/modules/output_filter/filters/filterWbLink.php	(revision 2013)
+++ branches/2.8.x/wb/modules/output_filter/filters/filterWbLink.php	(revision 2014)
@@ -67,7 +67,7 @@
 							if($oWbLink instanceof WbLinkAbstract)
 							{
 							// create real link from replacement data
-								$aReplaceList[$sKey] = $oWbLink->makeLinkFromTag($aReplacement);
+								$aReplaceList[$sKey] = $oWbLink->makeLinkFromTag($aReplacement['Args']);
 							}
 						}
 					}
Index: branches/2.8.x/wb/modules/news/WbLink.php
===================================================================
--- branches/2.8.x/wb/modules/news/WbLink.php	(revision 2013)
+++ branches/2.8.x/wb/modules/news/WbLink.php	(revision 2014)
@@ -52,7 +52,7 @@
 	// search `link` from posts table and create absolute URL
 		$sql = 'SELECT `link` '
 			 . 'FROM `'.$this->oDb->TablePrefix.'mod_news_posts` '
-			 . 'WHERE `post_id`='.$aReplacement['Args']['item'];
+			 . 'WHERE `post_id`='.$aReplacement['item'];
 		if(($sLink = $this->oDb->get_one($sql)))
 		{
 			$sLink = trim(str_replace('\\', '/', $sLink), '/');
@@ -64,9 +64,24 @@
 		}
 		return $sRetval;
 	}
-
-//	public function generateLinkList(Template $oTpl)
-//	{
-//		;
-//	}
+/**
+ * generateOptionsList
+ * @param  string $sObjectName name of the array to create (default: 'AddonItemsSelectBox')
+ * @return &array complete definition of a SelectBox
+ * @description Bild a mulitdimensional Array with complete Option definitions for use in a Select Box
+ */
+	public function &generateOptionsList()
+	{
+		$aAddonItems =& $this->_executeListGeneration(
+	                                           'news',
+	                                           'mod_news_posts',
+	                                           'page_id',
+	                                           'section_id',
+	                                           'post_id',
+	                                           'created_when',
+	                                           'title',
+	                                           'active'
+	                                          );
+		return $aAddonItems;
+	}
 } // end of class m_news_WbLink
