aboutsummaryrefslogtreecommitdiff
path: root/w/fn/w.fn.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-10-28 19:56:27 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-10-28 19:56:27 +0100
commite17392e46259e6f2e012017987cf7c31c171488f (patch)
tree72b61b63e32819e81433e8df6f14dc92b0e3a604 /w/fn/w.fn.php
parenta91c916248f967da2d4218b575e665242b7c975b (diff)
downloadwcms-e17392e46259e6f2e012017987cf7c31c171488f.tar.gz
wcms-e17392e46259e6f2e012017987cf7c31c171488f.zip
abstract config NWY
Diffstat (limited to 'w/fn/w.fn.php')
-rw-r--r--w/fn/w.fn.php37
1 files changed, 1 insertions, 36 deletions
diff --git a/w/fn/w.fn.php b/w/fn/w.fn.php
index fe3ea48..558ae67 100644
--- a/w/fn/w.fn.php
+++ b/w/fn/w.fn.php
@@ -135,42 +135,7 @@ function str_clean(string $string)
return str_replace(' ', '_', strtolower(strip_tags($string)));
}
-function sumparser($text)
-{
- preg_match_all('#<h([1-6]) id="(\w+)">(.+)</h[1-6]>#iU', $text, $out);
-
-
- $sum = [];
- foreach ($out[2] as $key => $value) {
- $sum[$value][$out[1][$key]] = $out[3][$key];
- }
-
-
- $sumstring = '';
- $last = 0;
- foreach ($sum as $title => $list) {
- foreach ($list as $h => $link) {
- if($h > $last) {
- for ($i = 1; $i <= ($h - $last); $i++) {
- $sumstring .= '<ul>';
- }
- $sumstring .= '<li><a href="#'.$title.'">'.$link.'</a></li>' ;
- } elseif ($h < $last) {
- for ($i = 1; $i <= ($last - $h); $i++) {
- $sumstring .= '</ul>';
- }
- $sumstring .= '<li><a href="#'.$title.'">'.$link.'</a></li>' ;
- } elseif ($h = $last) {
- $sumstring .= '<li><a href="#'.$title.'">'.$link.'</a></li>' ;
- }
- $last = $h;
- }
- }
- for ($i = 1; $i <= ($last); $i++) {
- $sumstring .= '</ul>';
- }
- return $sumstring;
-}
+
?> \ No newline at end of file