|
Revision 346
(checked in by miyagawa, 6 years ago)
|
- Add new plugin Filter::ImageInfo? to fetch width & height from feed images. Fixes #80
- Plagger::TT plugins
- Plagger::Util::dumbnail function to resize images using img attributes
- Add $feed->image to $entry->icon when copied to SmartFeed?
- Fixed Frepa regular expression since they updated HTML
- Updated Gmail template to fix big logo issue. Fixes #68
|
- Property svn:keywords set to
Id Revision
|
| Line | |
|---|
| 1 |
package Plagger::Template; |
|---|
| 2 |
use strict; |
|---|
| 3 |
use base qw( Template ); |
|---|
| 4 |
|
|---|
| 5 |
use FindBin; |
|---|
| 6 |
use File::Spec::Functions qw(catfile); |
|---|
| 7 |
|
|---|
| 8 |
use Template::Provider::Encoding 0.04; |
|---|
| 9 |
use Template::Stash::ForceUTF8; |
|---|
| 10 |
|
|---|
| 11 |
sub new { |
|---|
| 12 |
my($class, $context, $plugin_class_id) = @_; |
|---|
| 13 |
|
|---|
| 14 |
my $path = $context->conf->{assets_path} || catfile($FindBin::Bin, "assets"); |
|---|
| 15 |
my $paths = [ catfile($path, "plugins", $plugin_class_id), |
|---|
| 16 |
catfile($path, "common") ]; |
|---|
| 17 |
|
|---|
| 18 |
return $class->SUPER::new({ |
|---|
| 19 |
INCLUDE_PATH => $paths, |
|---|
| 20 |
LOAD_TEMPLATES => [ |
|---|
| 21 |
Template::Provider::Encoding->new({ INCLUDE_PATH => $paths }), |
|---|
| 22 |
], |
|---|
| 23 |
STASH => Template::Stash::ForceUTF8->new, |
|---|
| 24 |
PLUGIN_BASE => [ 'Plagger::TT' ], |
|---|
| 25 |
}); |
|---|
| 26 |
} |
|---|
| 27 |
|
|---|
| 28 |
1; |
|---|
| 29 |
|
|---|