formatting
This commit is contained in:
		
							parent
							
								
									04987ea70e
								
							
						
					
					
						commit
						1c216e8d51
					
				| @ -99,7 +99,7 @@ class TagEditCloud extends Extension | |||||||
|             case 'c': |             case 'c': | ||||||
|                 if (Extension::is_enabled(TagCategoriesInfo::KEY)) { |                 if (Extension::is_enabled(TagCategoriesInfo::KEY)) { | ||||||
|                     $tag_data = $database->get_all( |                     $tag_data = $database->get_all( | ||||||
|                     " |                         " | ||||||
|                                         SELECT tag, FLOOR(LN(LN(count - :tag_min1 + 1)+1)*150)/200 AS scaled, count |                                         SELECT tag, FLOOR(LN(LN(count - :tag_min1 + 1)+1)*150)/200 AS scaled, count | ||||||
|                                         FROM tags |                                         FROM tags | ||||||
|                                         WHERE count >= :tag_min2 |                                         WHERE count >= :tag_min2 | ||||||
| @ -108,12 +108,13 @@ class TagEditCloud extends Extension | |||||||
|                                             ELSE 2 |                                             ELSE 2 | ||||||
|                                         END, tag |                                         END, tag | ||||||
|                                         LIMIT :limit",
 |                                         LIMIT :limit",
 | ||||||
|                     ["tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count] |                         ["tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count] | ||||||
|                     ); |                     ); | ||||||
|                     break; |                     break; | ||||||
|                 } else { |                 } else { | ||||||
|                     $sort_method = 'a'; |                     $sort_method = 'a'; | ||||||
|                 } |                 } | ||||||
|  |                 // no break
 | ||||||
|             case 'a': |             case 'a': | ||||||
|             case 'p': |             case 'p': | ||||||
|             default: |             default: | ||||||
| @ -131,8 +132,8 @@ class TagEditCloud extends Extension | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         $counter = 1; |         $counter = 1; | ||||||
|         $last_cat = NULL; |         $last_cat = null; | ||||||
|         $last_used_cat = NULL; |         $last_used_cat = null; | ||||||
|         foreach ($tag_data as $row) { |         foreach ($tag_data as $row) { | ||||||
|             $full_tag = $row['tag']; |             $full_tag = $row['tag']; | ||||||
| 
 | 
 | ||||||
| @ -157,8 +158,9 @@ class TagEditCloud extends Extension | |||||||
| 
 | 
 | ||||||
|             if (array_search($row['tag'], $image->get_tag_array()) !== false) { |             if (array_search($row['tag'], $image->get_tag_array()) !== false) { | ||||||
|                 if ($used_first) { |                 if ($used_first) { | ||||||
|                     if ($last_used_cat !== $current_cat && $last_used_cat !== NULL) |                     if ($last_used_cat !== $current_cat && $last_used_cat !== null) { | ||||||
|                         $precloud .= "</span><span class='tag-category'>\n"; |                         $precloud .= "</span><span class='tag-category'>\n"; | ||||||
|  |                     } | ||||||
|                     $last_used_cat = $current_cat; |                     $last_used_cat = $current_cat; | ||||||
|                     $precloud .= " <span onclick='{$js}' class='tag-selected' style='font-size: ${size}em$color' title='${row['count']}'>{$h_tag}</span> \n"; |                     $precloud .= " <span onclick='{$js}' class='tag-selected' style='font-size: ${size}em$color' title='${row['count']}'>{$h_tag}</span> \n"; | ||||||
|                     continue; |                     continue; | ||||||
| @ -170,8 +172,9 @@ class TagEditCloud extends Extension | |||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if ($counter++ <= $def_count) { |             if ($counter++ <= $def_count) { | ||||||
|                 if ($last_cat !== $current_cat && $last_cat != NULL) |                 if ($last_cat !== $current_cat && $last_cat != null) { | ||||||
|                     $cloud .= "</span><span class='tag-category'>\n"; //TODO: Maybe add a title for the category after the span opens?
 |                     $cloud .= "</span><span class='tag-category'>\n"; | ||||||
|  |                 } //TODO: Maybe add a title for the category after the span opens?
 | ||||||
|                 $cloud .= $entry; |                 $cloud .= $entry; | ||||||
|             } else { |             } else { | ||||||
|                 if ($last_cat !== $current_cat && $counter !== $def_count + 2) { |                 if ($last_cat !== $current_cat && $counter !== $def_count + 2) { | ||||||
|  | |||||||
| @ -5,7 +5,6 @@ use function MicroHTML\INPUT; | |||||||
| 
 | 
 | ||||||
| class UserConfigTheme extends Themelet | class UserConfigTheme extends Themelet | ||||||
| { | { | ||||||
| 
 |  | ||||||
|     public function get_user_options(string $key): string |     public function get_user_options(string $key): string | ||||||
|     { |     { | ||||||
|         $html = " |         $html = " | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user