Changeset 1002
- Timestamp:
- 09/02/08 19:01:13 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/StyleCatcher-2.1-dev/plugins/StyleCatcher/lib/StyleCatcher/CMS.pm
r998 r1002 219 219 my $app = shift; 220 220 221 my $blog_id = $app->param('blog_id'); 222 my $url = $app->param('url'); 223 my $layout = $app->param('layout'); 224 my $name = $app->param('name'); 221 my ($blog_id, $url, $layout, $name, $template_set) 222 = map { $app->param($_) || q{} } (qw( blog_id url layout name template_set )); 225 223 226 224 # Load the default stylesheet for this blog … … 245 243 } 246 244 247 my $mtthemebase = $app->static_path . 'themes-base/'; 248 my $url2 = $mtthemebase . "blog.css"; 245 my $base_css = q{}; 246 my %use_base_css = ( 247 q{} => 1, 248 mt_blog => 1, 249 mt_community_blog => 1, 250 mt_community_forum => 1, 251 professional_website => 1, 252 universal_website => 1, 253 my_set => 1, # universal website from plugin 254 ); 255 if ($use_base_css{$template_set}) { 256 my $base_css_url = $app->static_path . "theme-base/blog.css"; 257 $base_css = "\@import url($base_css_url);"; 258 } 249 259 250 260 # Replacing the theme import or adding a new one at the beginning 251 261 my $template_text = $tmpl->text(); 252 262 my $replaced = 0; 253 my $header = 254 '/* This is the StyleCatcher theme addition. Do not remove this block. */'; 263 my $header = '/* This is the StyleCatcher theme addition. Do not remove this block. */'; 255 264 my $footer = '/* end StyleCatcher imports */'; 256 my $styles = $header . "\n" . <<"EOT" . $footer; 257 \@import url($url2); 265 my $styles = <<"EOT"; 266 $header 267 $base_css 258 268 \@import url($url); 269 $footer 259 270 EOT 260 271 if ($template_text =~ s/\Q$header\E.*\Q$footer\E/$styles/s) { branches/StyleCatcher-2.1-dev/plugins/StyleCatcher/tmpl/view.tmpl
r998 r1002 226 226 selected = mixer.name; 227 227 var url = mixer.entries[mixer.name].url; 228 var tset = mixer.entries[mixer.name].template_set; 228 229 229 230 TC.addClassName(btn, "disabled-button"); … … 236 237 'magic_token': '<mt:var name="magic_token">', 237 238 'blog_id': blog_id, 238 'name': mixer.name 239 'name': mixer.name, 240 'template_set': tset 239 241 }; 240 242 if (layout)
