Browse code

blocks/menu/menu.php: fix array to string conversion warning for PHP 8 - proper fix

Clarissa Walker authored on 2026/09/15 06:55:16
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 <?php
2 2
 if(!defined("_CHARSET")) exit( );
3 3
 
4
-$content = (int) $content;
4
+$content = '';
5 5
 
6 6
 	if(isset($blocks[$block]['content'])) {
7 7
 		foreach($blocks[$block]['content'] as $page) {
Browse code

blocks/menu/menu.php: fix array to string conversion warning for PHP 8 - remove temp error suppression

Clarissa Walker authored on 2026/09/15 06:48:18
Showing 1 changed files
... ...
@@ -1,7 +1,8 @@
1 1
 <?php
2
-error_reporting(0);
3 2
 if(!defined("_CHARSET")) exit( );
4 3
 
4
+$content = (int) $content;
5
+
5 6
 	if(isset($blocks[$block]['content'])) {
6 7
 		foreach($blocks[$block]['content'] as $page) {
7 8
 			if(isset($pagelinks[$page]['link'])) {
Browse code

blocks/menu/menu.php: temp error suppression

Clarissa Walker authored on 2026/09/14 20:11:16
Showing 1 changed files
... ...
@@ -1,4 +1,5 @@
1 1
 <?php
2
+error_reporting(0);
2 3
 if(!defined("_CHARSET")) exit( );
3 4
 
4 5
 	if(isset($blocks[$block]['content'])) {
... ...
@@ -19,4 +20,4 @@ if(!defined("_CHARSET")) exit( );
19 20
 	}
20 21
 	if(empty($blocks[$block]['style'])) $content = "<ul>$content</ul>";
21 22
 	$content = "<div id=\"$block\">$content</div>";
22
-?>
23 23
\ No newline at end of file
24
+?>
Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,22 @@
1
+<?php
2
+if(!defined("_CHARSET")) exit( );
3
+
4
+	if(isset($blocks[$block]['content'])) {
5
+		foreach($blocks[$block]['content'] as $page) {
6
+			if(isset($pagelinks[$page]['link'])) {
7
+				if(empty($blocks[$block]['style'])) $content .= "<li ".($current == $page ? "id=\"menu_current\"" : "").">".$pagelinks[$page]['link']."</li>";
8
+				else $content .= $pagelinks[$page]['link'];
9
+			}
10
+		}
11
+	}
12
+	else {
13
+		$pages = array('home', 'recent', 'titles', 'catslink', 'series', 'members', 'authors', 'challenges', 'search', 'tens', 'featured', 'help', 'contactus', 'login', 'logout', 'adminarea');
14
+		foreach($pages as $page) {
15
+			if(empty($pagelinks[$page])) continue;
16
+			if(empty($blocks[$block]['style'])) $content .= "<li ".($current == $page ? "id=\"menu_current\"" : "").">".$pagelinks[$page]['link']."</li>";
17
+			else $content .= $pagelinks[$page]['link'];
18
+		}
19
+	}
20
+	if(empty($blocks[$block]['style'])) $content = "<ul>$content</ul>";
21
+	$content = "<div id=\"$block\">$content</div>";
22
+?>
0 23
\ No newline at end of file