Commits

Anonymous committed 4d35b18

Added list_themes select/dropdown function which will allow users to change the theme they're using/editing.

Comments (0)

Files changed (1)

textpattern/lib/lib_blurb.php

 	return false;
 }
 
+//-------------------------------------------------------------
+// outputs a select-box list of installed presentation themes
+
+	function list_themes() {
+		
+		$rs = safe_rows_start('DISTINCT theme', 'blurb', "1=1 order by theme, name");
+		
+		if($rs) {
+			while($a = nextRow($rs)) {
+				extract($a);
+				$theme_list[] = $theme;
+			}
+			
+			$out = selectInput('theme_select', $theme_list,$theme_list,false,'','theme_select');
+		}
+		
+		return $out;
+		
+	}
+
 ?>