Manfre / xpattern (http://xpattern.net)

xPattern CMS

Clone this repository (size: 1.9 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/Manfre/xpattern/
commit 1360: 4d35b18ff91a
parent 1359: 6abaf6c410e5
branch: default
tags: tip
Added list_themes select/dropdown function which will allow users to change the theme they're using/editing.
Eric
6 months ago

Changed (Δ472 bytes):

raw changeset »

textpattern/lib/lib_blurb.php (20 lines added, 0 lines removed)

Up to file-list textpattern/lib/lib_blurb.php:

@@ -98,4 +98,24 @@ function delete_blurb($name, $type, $the
98
98
	return false;
99
99
}
100
100
101
//-------------------------------------------------------------
102
// outputs a select-box list of installed presentation themes
103
104
	function list_themes() {
105
		
106
		$rs = safe_rows_start('DISTINCT theme', 'blurb', "1=1 order by theme, name");
107
		
108
		if($rs) {
109
			while($a = nextRow($rs)) {
110
				extract($a);
111
				$theme_list[] = $theme;
112
			}
113
			
114
			$out = selectInput('theme_select', $theme_list,$theme_list,false,'','theme_select');
115
		}
116
		
117
		return $out;
118
		
119
	}
120
101
121
?>