* Added in RTE link box: Searched *into* Content ELements of type Text and Text w...
authorKasper Skårhøj <kasper@typo3.org>
Thu, 22 Apr 2004 16:16:31 +0000 (16:16 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Thu, 22 Apr 2004 16:16:31 +0000 (16:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@216 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/browse_links.php

index 360b5d3..254c00b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-04-22  Kasper Skårhøj,,,  <kasper@typo3.com>
 
+       * Added in RTE link box: Searched *into* Content ELements of type Text and Text w/Image after anchors (<a name="...">) and lists them as well with content elements to which an anchor link can be made.
+
+2004-04-22  Kasper Skårhøj,,,  <kasper@typo3.com>
+
        * Added configuration options for what level of pages cache is cleared when you edit a page header. You can not get children and grand-parents cleared as well. (TCEMAIN.clear..... in Page TSconfig)
 
 2004-04-21  Kasper Skårhøj,,,  <kasper@typo3.com>
index 916b19c..3fd1716 100755 (executable)
@@ -1497,7 +1497,7 @@ class SC_browse_links {
 
                                // Look up tt_content elements from the expanded page:
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
-                                                       'uid,header,hidden,starttime,endtime,fe_group,CType,colpos',
+                                                       'uid,header,hidden,starttime,endtime,fe_group,CType,colpos,bodytext',
                                                        'tt_content',
                                                        'pid='.intval($expPageId).t3lib_BEfunc::deleteClause('tt_content'),
                                                        '',
@@ -1522,6 +1522,23 @@ class SC_browse_links {
                                                $icon.
                                                htmlspecialchars(t3lib_div::fixed_lgd($row['header'],$titleLen)).
                                                '</a><br />';
+
+                                       // Finding internal anchor points:
+                               if (t3lib_div::inList('text,textpic', $row['CType']))   {
+                                       $split = preg_split('/(<a[^>]+name=[\'"]?([^"\'>[:space:]]+)[\'"]?[^>]*>)/i', $row['bodytext'], -1, PREG_SPLIT_DELIM_CAPTURE);
+
+                                       foreach($split as $skey => $sval)       {
+                                               if (($skey%3)==2)       {
+                                                               // Putting list element HTML together:
+                                                       $sval = substr($sval,0,100);
+                                                       $out.='<img'.t3lib_iconWorks::skinImg('','gfx/ol/line.gif','width="18" height="16"').' alt="" />'.
+                                                                       '<img'.t3lib_iconWorks::skinImg('','gfx/ol/join'.($skey+3>count($split)?'bottom':'').'.gif','width="18" height="16"').' alt="" />'.
+                                                                       '<a href="#" onclick="return link_typo3Page(\''.$expPageId.'\',\'#'.rawurlencode($sval).'\');">'.
+                                                                       htmlspecialchars(' <A> '.$sval).
+                                                                       '</a><br />';
+                                               }
+                                       }
+                               }
                        }
                }
                return $out;