- Timestamp:
- 03/23/09 22:47:05 (12 months ago)
- Location:
- trunk/PhotoGallery/plugins/PhotoGallery
- Files:
-
- 2 modified
-
PhotoGallery.pl (modified) (2 diffs)
-
lib/PhotoGallery/Plugin.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PhotoGallery/plugins/PhotoGallery/PhotoGallery.pl
r1502 r1503 39 39 $$output_ref =~ s/\bYour category\b/\bYour photo album\b/g; 40 40 }, 41 'MT::App::CMS::template_source.header' => sub { 42 my ($cb, $app, $html_ref) = @_; 43 return unless $plugin->in_gallery && 44 $plugin->get_config_value('suppress_create_entry','blog:'.$app->blog->id); 45 $$html_ref =~ s{<li id="create-entry" class="nav-link">.*</a></li>}{};; 46 }, 41 47 }, 42 48 applications => { … … 56 62 }, 57 63 }, 58 64 blog_config_template => '<mt:PluginConfigForm id="PhotoGallery">', 65 settings => { 66 'suppress_create_entry' => { 67 scope => 'blog', 68 }, 69 }, 70 plugin_config => { 71 'PhotoGallery' => { 72 'fieldset1' => { 73 'suppress_create_entry' => { 74 type => 'checkbox', 75 label => 'Suppress Create Entry button and menu items for this blog?', 76 tag => 'IfSuppressCreateEntry?', 77 }, 78 }, 79 }, 80 }, 59 81 template_sets => { 60 82 'mid-century-photo-gallery' => { -
trunk/PhotoGallery/plugins/PhotoGallery/lib/PhotoGallery/Plugin.pm
r1502 r1503 61 61 foreach my $key (keys %$menus) { 62 62 if ($key =~ /^create:/) { 63 delete $menus->{$key}; 63 my $blog = (MT::App->instance->blog ? MT::App->instance->blog : undef); 64 unless ( 65 $key =~ /entry/ && $blog && MT->component('PhotoGallery')->get_config_value('suppress_create_entry','blog:'.$blog->id) 66 ) { 67 delete $menus->{$key}; 68 } 64 69 } 65 70 }
