DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT: Photo Blog¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed by: | Michiel Roos |
Changed: | 2005-10-16T18:08:04 |
Author: | Michiel Roos |
Email: | typo3@monosock.org |
Info 3: | |
Info 4: |
EXT: Photo Blog¶
Extension Key: photoblog
Copyright 2000-2002, Michiel Roos, <typo3@monosock.org>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.com
Table of Contents¶
EXT: Photo Blog 1
Introduction 1
What does it do? 1
Compatibility 2
Screenshots 2
Users manual 10
Installation 10
Create a sysfolder to store the blog entries 10
Create a page containing the blog plugin 10
Create a category (optional) 10
Setting up some sensible defaults 10
Create a blog entry 11
Comments 11
Comment moderation 11
RSS feed 12
RealURL configuration 12
Adminstration 13
Configuration 13
Tutorial 15
Known problems 15
To-Do list 15
Changelog 15
Introduction¶
What does it do?¶
A blog geared towards posting of images. You can find other examples of photoblogs on http://photoblogs.org . You might find an exampe here: http://teknowlogic.org/index.php?id=photoblog
Features¶
- Post images with title, description and multiple categories;
- Manually sort the order of entries;
- Post comments through the frontend;
- Show X random thumbnails;
- Show X latest thumbnails;
- Show X nearest thumbnails;
- Show X thumbnails belonging to the category the current image belongs to;
- Show a list of thumbnails of all the entries;
- Display comments in a popup window or on a normal page;
- Frontend user comment moderation system with 'round robin' scheduling;
- Display EXIF data;
- Browse and search archive of entries by date;
- Display archive of entries ordered by category;
- Offer RSS, RDF or Atom feed.
- Works nicely with Realurl.
Compatibility¶
Where did my categories go?
When upgrading from pre 0.2.8 versions, you may experience 'disappeared category titles'. Please use the UPDATE tool in the photoblog extension manager.
Photoblog version greater than 0.2.7 make use of 'nested categories'. This feature makes use of existing functions which appear to have been written for the 'pages' table. The point is that these functions expect a 'title' field in the category table which I did not use. So the update tool makes all things work again.
What's up with the sorting order of my images? In the later incarnations of photoblog, the sorting is exclusively done by the photodatetime field. This used to be crdate. You can copy the crdate column over to the new photoblogdatetime function. Only empty photodatetime values will be filled with the crdate value. This means that the dates you have already entered by hand will not be touched.
Screenshots¶
Frontend shots¶
Blog view with 'nearest thumbs' and 'random thumbs':¶
Comment view:¶
Archive view:¶
Category view:¶
Backend shots¶
Plugin configuration, general tab:¶
Plugin configuration, pages tab:¶
Plugin configuration, template tab:¶
Plugin configuration, advanced tab;¶
Record list, photo's, categories and comments:¶
Record editing, photo:¶
Record editing, comment:¶
Users manual¶
Installation¶
Install the extension with the extension manager.
Create a sysfolder to store the blog entries¶
Create a new page of type 'sysfolder'. This will be the page where we will store all the blog entries, categories and comments.
This is the complete tree structure I use:
Create a page containing the blog plugin¶
- Create a new page for the photoblog plugin.
- If you are using a version prior to 0.2.9; Disable caching for the page!
- Insert the plugin by choosing 'Create page content' and selecting 'PhotoBlog' from the plugin list.
- Choose what to display. You could start out with 'BLOG'.
- Choose a startingpoint. This will probably be the sysfolder you just created.
- You need to specify a template. If you don't, nothing will show up in the frontend. You can specify your own template under the 'template tab'. It is however easier to load the static data from the photoblog plugin. The static data will also set some sensible defaults for image width, maximum number of images and so on. You can also load a default style sheet in this way. Please read the section titled Configuration to see how to include the static data.
Create a category (optional)¶
Go to the photoblog sysfolder and create a new record of type 'Photoblog category'.
To make sure you can select your newly created category when creating a new blog entry, you have to set the general record storage option of the sysfolder to itself. If you don't, then we don't know where to find the categories.
I could make a configuration option to create a seperate folder to store just the categories and another folder to store all the comments. This might be a good thing. It also might scare people away because of 'too many config options'.
Setting up some sensible defaults¶
I recoomend to use the inclusion of static data as described below. The big advantage here is that you load a set of sensible defaults. If you don't like the default settings, tweak them using the 'flexforms'.
When the static data is added to the template, you can edit most of the configuration settings using the template constant editor. Editing the constants in this way has the advantage that they will be set for all the pages. This means that you can set all your settings using the constant editor and skip most of the flexform configuration. This is convenient when you have a lot of pages using the photoblog plugin.
Adding static data to the template¶
Go to the 'template tools' (Look for the icon with the T). In the page tree, navigate to the page where you have attached your main template. Choose 'info/modify' from the option list (top right). Now choose; 'Click here to edit whole template record' to get access to the panel below. Here you can add static data used for the Potoblog extension. Don't forget to clear the cache after you have changed your template.
The 3 static ext-templates offer you the following settings:
Default TS settings for the photoblog. Includes template image sizes etc. (see reference).
default CSS-styles: This are the CSS-style definitions for the photblog.
News-feed (RSS,RDF,Atom03): Include these settings if you want to enable XML feeds from your page.
Create a blog entry¶
- Go to the photoblog sysfolder and crea a new record of type 'Photoblog photo'.
- Choose a title, image, category and description.
- Check out the page in the frontend.
Comments¶
For comments to work, you will need a page to display the comments. Create a new page with the photoblog plugin and set the 'what to display' to 'COMMENTS'. Choose the maximum photo width for the comment page and also choose the Startingpoint (This should be the same location as where the blog entries are stored).
Now that you have created the comment page, go to your blog page. On the blog page you can now select the page you just created to be the comment page.
If you did all this correctly, a comment link will magically show up on the blog page.
Comment moderation¶
Comment moderation can be enabled on the 'advanced' tab. When you enable comment moderation, all submitted comments will be set to 'hidden'. An email will be sent to a moderator who may 'unhide'/approve the comment by clicking a link. You can select a list of frontend users as moderators. Round robin scheduling is used to send out the emails to the moderators.
IMPORTANT!
Make sure you enter your moderation preferences on the 'comment' page.
A moderation email:
RSS feed¶
To enable the XML-feed, add the static ext-template “Photoblog (RSS, RDF, Atom03)” to your TypoScript setup. This adds a new page-type (1000) and configures photoblog with the code “RSS”, if a page with type=1000 is requested. The other settings for RSS feeds can be configured in the constant editor or directly in your TypoScript setup (see reference). Take note that you need to set at least pid_list and blogPid globally (using the constant editor or TS) in order for the feed to work.
The feed you have chosen will now be available under http://your.site.org?type=1000
RealURL configuration¶
It is possible to make your site generate nice urls using the excellent realurl extension. Below is a configuration example for use with realurl. If you have realurl installed, you will know what to do with this snippet. If you don't, install realurl and read the docs.
'postVarSets' => array (
'_DEFAULT' => array (
'photo' => array (
'0' => array (
'GETvar' => 'tx_photoblog_pi1[showUid]',
'lookUpTable' => array (
'table' => 'tx_photoblog_photo',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted AND NOT hidden',
'useUniqueCache' => '1',
'useUniqueCache_conf' => array (
'strtolower' => '1',
'spaceCharacter' => '-',
),
),
),
),
'category-thumbs' => array (
'0' => array (
'GETvar' => 'tx_photoblog_pi1[showCatUid]',
'lookUpTable' => array (
'table' => 'tx_photoblog_category',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted AND NOT hidden',
'useUniqueCache' => '1',
'useUniqueCache_conf' => array (
'strtolower' => '1',
'spaceCharacter' => '-',
),
),
),
),
'link-to-previous' => array (
'0' => array (
'GETvar' => 'tx_photoblog_pi1[linkToPreviousEntry]',
),
),
),
),
Adminstration¶
Describes how to manage the extension from a superuser point of view. That relates to Page/User TSconfig, permissions, configuration etc. which administrator level users have access to.
Configuration¶
The flexform configuration should be enough for most mortal users. You can load a sensible set of defaults by adding the static typoscript to your template.
It is also possible to edit most of the configuration settings using the template constant editor. Editing the constants in this way has the advantage that they will be set for all the pages. This means that you can set all your settings using the constant editor and skip most of the flexform configuration. This is convenient when you have a lot of pages using the photoblog plugin.
((generated))¶
Adding static data to the template¶
Go to the 'template tools' (Look for the icon with the T). In the page tree, navigate to the page where you have attached your main template. Choose 'info/modify' from the option list (top right). Now choose; 'Click here to edit whole template record' to get access to the panel below. Here you can add static data used for the Potoblog extension. Don't forget to clear the cache after you have changed your template.
The 3 static ext-templates offer you the following settings:
Default TS settings for the photoblog. Includes template image sizes etc. (see reference).
default CSS-styles: This are the CSS-style definitions for the photblog.
News-feed (RSS,RDF,Atom03): Include these settings if you want to enable XML feeds from your page.
Reference¶
noSquareThumbs¶
Property
noSquareThumbs
Data type
boolean
Description
If true, thumbnails will NOT be made square by 'center cropping' the image.
Default
false
noPopupCommentWindow¶
Property
noPopupCommentWindow
Data type
boolean
Description
Do NOT open the comment window as a popup window.
Default
false
moderateComments¶
Property
moderateComments
Data type
boolean
Description
Enable or disable comment moderation.
Default
false
permaLinkOnBlogPage¶
Property
permaLinkOnBlogPage
Data type
boolean
Description
Display permalink on blog page.
Default
false
photoWidth¶
Property
photoWidth
Data type
int (pixels)
Description
The images of blog postings will be scaled down to this width if they are wider.
Default
750
photoHeight¶
Property
photoHeight
Data type
int (pixels)
Description
The images of blog postings will be scaled down to this height if they are higher.
Default
0
thumbnailWidth¶
Property
thumbnailWidth
Data type
int
Description
All thumbnails will be scaled to this width.
Default
0
thumbnailHeight¶
Property
thumbnailHeight
Data type
int
Description
All thumbnails will be scaled to this height.
Default
50
thumbCountLatest¶
Property
thumbCountLatest
Data type
int
Description
How many thumbnails to show in the 'latest thumbnails' set.
Default
5
thumbCountNearest¶
Property
thumbCountNearest
Data type
int
Description
How many thumbnails to show in the 'nearest thumbnails' set.
Default
5
thumbCountRandom¶
Property
thumbCountRandom
Data type
int
Description
How many thumbnails to show in the 'random thumbnails' set.
Default
5
popupCommentWindowWidth¶
Property
popupCommentWindowWidth
Data type
int
Description
Width of the popup window.
Default
460
popupCommentWindowHeight¶
Property
popupCommentWindowHeight
Data type
int
Description
Height of the popup window.
Default
490
file.templateFile¶
Property
file.templateFile
Data type
file
Description
The default template file.
Default
EXT:photoblog/pi1/photoblog.tmpl
blogPid¶
Property
blogPid
Data type
int
Description
The page id of the photoblog page. This is required for the rss feed.
Default
0
pid_list¶
Property
pid_list
Data type
string
Description
The PID of the page (or comma separated list pf PIDs) where your photoblog entries are located. This is required for the rss feed.
Default
0
archivePid¶
Property
archivePid
Data type
int
Description
The page id of the archive page.
Default
0
commentPid¶
Property
commentPid
Data type
int
Description
The page id of the comment page.
Default
0
strftime¶
Property
strftime
Data type
string
Description
The date format, formatted according to your locale.
Default
%d-%m-%y %H:%M
imageMagickParameters¶
Property
imageMagickParameters
Data type
string
Description
Imagemagick parameters used to scale non thumbnails.
Default
-quality 80 +profile "*" -unsharp 0.5x0.5+1.5
imageMagickThumbParameters¶
Property
imageMagickThumbParameters
Data type
string
Description
Imagemagick parameters used to scale thumbnails.
Default
-quality 60 +profile "*" -unsharp 0.5x0.5+1.5
photoAltSuffix¶
Property
photoAltSuffix
Data type
string
Description
This string will be appended to the alt attribute of all photo's.
Default
/ click to display previous image
photoTitleSuffix¶
Property
photoTitleSuffix
Data type
string
Description
This string will be appended to the title attribute of all photo's.
Default
/ click to display previous image
thumbnailAltPrefix¶
Property
thumbnailAltPrefix
Data type
string
Description
The alt attribute of all thumbnails will be prefixed with this string.
Default
thumb:
moderationMsgSenderName¶
Property
moderationMsgSenderName
Data type
string
Description
Sender name for moderation message.
Default
website
moderationMsgSenderEmail¶
Property
moderationMsgSenderEmail
Data type
string
Description
Sender email for moderation message.
Default
moderationMsgSubject¶
Property
moderationMsgSubject
Data type
string
Description
Subject for moderation message.
Default
Photoblog @ yourdomain.org, new comment
RSS, RDF and Atom settings
rss.rss2_tmplFile¶
Property
rss.rss2_tmplFile
Data type
file
Description
XML template for RSS 2.0 feed
Default
EXT:photoblog/res/rss_2.tmpl
rss.rss091_tmplFile¶
Property
rss.rss091_tmplFile
Data type
file
Description
XML template for RSS 0.91 feed
Default
EXT:photoblog/res/rss_0_91.tmpl
rss.rdf_tmplFile¶
Property
rss.rdf_tmplFile
Data type
file
Description
XML template for RDF feed
Default
EXT:photoblog/res/rdf.tmpl
rss.atom03_tmplFile¶
Property
rss.atom03_tmplFile
Data type
file
Description
XML template for Atom 0.3 feed
Default
EXT:photoblog/res/atom_0_3.tmpl
rss.format¶
Property
rss.format
Data type
string
Description
Defines the format of the photoblog feed. Possible values are: 'rss091', 'rss2' 'rdf' and 'atom03'
Default
rss2
rss.title¶
Property
rss.title
Data type
string
Description
The title of your photoblog feed. (required for rss091, rss2, rdf and atom03)
Default
your-server.org: Latest PhotoBlog entries
rss.link¶
Property
rss.link
Data type
string
Description
The link to your hompage. (required for rss091, rss2, rdf and atom03)
Default
rss.desc¶
Property
rss.desc
Data type
string
Description
The description of your photoblog feed. (required for rss091, rss2 and rdf. optional for atom03)
Default
Latest photoblog entries
rss.lang¶
Property
rss.lang
Data type
string
Description
Your site's language. A list of allowable values for <language> in RSS is available at http://blogs.law.harvard.edu/tech/stories/storyReader$15 (required for rss091, optional for rss2, not available for rdf, recommended for atom03)
Default
en
rss.limit¶
Property
rss.limit
Data type
int
Description
Maximum number of photoblog items in RSS feeds.
Default
10
rss.caching¶
Property
rss.caching
Data type
int
Description
Allow caching for the RSS feed
Default
1
rss.lastBuildDate¶
Property
rss.lastBuildDate
Data type
boolean
Description
Display The last time the channel was modified.
Default
0
rss.webMaster¶
Property
rss.webMaster
Data type
string
Description
The email address of the webmaster for the site, the person to contact if there are technical problems with the channel.
Default
rss.managingEditor¶
Property
rss.managingEditor
Data type
string
Description
The email address of the managing editor of the site, the person to contact for editorial inquiries.
Default
rss.copyright¶
Property
rss.copyright
Data type
string
Description
copyright string
Default
rss.photoWidth¶
Property
rss.photoWidth
Data type
int
Description
All feed images will be scaled down to this width.
Default
200
Tutorial¶
A full point-a-to-b-to-c walk-through of an application of the extension. Include screendumps.
Known problems¶
- Imagemagick is not obeying my command to +repage when handling gif images. This leaves some transparant areas on gifs after cropping them. This leaves ugly thumbnails.
- Some TYPO3 installations seem to have problems creating thumbnails and even blog images using version 0.2.11. NOTE! Since version 0.2.14, the imagemagick parameters are accessible through the constant editor. Please experiment with the parameters if you have problems with image display. One known combo that does not appear to work is: Typo version is 3.7.0 with ImageMagick 4.2.7 installed, PHP version is 4.3.3 running on Linux. A user reported that toying with the IM parameters got it to work in that case.
- Iso rating in exif data does not show up in all images.
- Png images are not processed with the given imageMagick parameters.
Please let me know if you run into any problems.
To-Do list¶
- Download different size images by clicking small icons.
- Trackback url on comment page.
- Integration into TimTab.
- Bulk import tool? Upload a zip and a data file and have them processed by a script.
- Watermark full size (original) images with custom watermark.
- Extend documentation. Make a nice tutorial.
- Write an extension for use with photoblog to enable content based image search based on http://gnu.org/software/gift .
Changelog¶
0.2.19 (BETA)¶
Version
0.2.19 (BETA)
Changes
- If watermarking is enabled, images are still compressed during second pass image processing step.
- Realurl config example added.
- Manual updated.
Date
16-10-2005
0.2.14 (BETA)¶
Version
0.2.14 (BETA)
Changes
- Set maximum photo height (default 0).
- Set maximum thumbnail width (default 0).
- Max thumb counts accessible through constant editor.
- ImageMagick parameters for blog image available througn constant editor.
- ImageMagick parameters for thumbnails available through constant editor.
- Cleanup and reordering of static include files.
- Manual updated.
Date
02-10-2005
0.2.13 (BETA)¶
Version
0.2.13 (BETA)
Changes
- Frontend user based comment moderation.
- Display permanent link on blog page.
- Manual updated.
Date
01-10-2005
0.2.12 (BETA)¶
Version
0.2.12 (BETA)
Changes
- Code cleanup! Made use of: $this->cObj->enableFields().
- Choose where to display EXIF data.
- Category list view has its own template now.
- Reconfigured flexform layout. Split 'General' tab into 'General' and 'Advanced'.
- Reordered the tabs of the flexform: General/Pages/Template/Advanced.
- Reordered order of fields in photo edit form.
- Changed max size of photo to 20M.
- Added photo 'alt' field (hidden/palettes).
- Added photo 'title' field (hidden/palettes).
- Thumbnail alt attributes can now be prefixed with 'thumbnailAltPrefix'.
- Photo title attribute can now be suffixed with 'photoTitleSuffix'.
- Photo alt attribute can now be suffixed with 'photoAltSuffix'.
- Manual updated.
Date
30-09-2005
0.2.11 (BETA)¶
Version
0.2.11 (BETA)
Changes
- Added UPDATE function to fix sorting order.
- Manual updated.
Date
29-09-2005
0.2.10 (BETA)¶
Version
0.2.10 (BETA)
Changes
- Fixed bug in category view. Doh!
- Manual updated.
Date
29-09-2005
0.2.9 (BETA)¶
Version
0.2.9 (BETA)
Changes
- Photoblog is now a USER_INT object. This means you no longer have to set 'no_cache' for every page that includes the photoblog plugin. Thanks for the tip Ben and Rupert.
- Changed autosizeMax from category selection 25 -> 12.
- Added photodatetime field.
- Sorting is now done by photodatetime,crdate. The 'manual sorting' capability has been removed. Use datetime to sort your images.
- Specify type of sorting has been removed since the above is logical enough ;-).
- Cleaner cropping code.
- Source file tweaks, proper indenting with tabs.
- Manual updated.
Date
28-09-2005
0.2.8 (BETA)¶
Version
0.2.8 (BETA)
Changes
- Nested categories.
- strftime configured date.
- Thumbnail size setting was fixed (spelling error).
- Manual updated.
Date
27-09-2005
0.2.4 (BETA)¶
Version
0.2.4 (BETA)
Changes
- Strange category creation bug fixed
- RSS rendering bug fixed.
- Manual updated (Changelog)
Date
24-09-2005
0.1.7 (BETA)¶
Version
0.1.7 (BETA)
Changes
- Manual updated.
- Sorting order of categories in list view is now alphabetic.
- Select your own sorting order (default is creation date). Choose between title or manual sorting order.
Date
23-09-2005
0.1.6 (BETA)¶
Version
0.1.6 (BETA)
Changes
- Manual updated.
- Fixed include paths in EXIF lib.
- Removed some 'echo' statements from EXIF lib.
- Fixed 'show all thumbs' functionality.
Date
21-09-2005
0.1.5 (BETA)¶
Version
0.1.5 (BETA)
Changes
- Manual updated. Added note about caching.
- Better image compression.
Date
21-09-2005
0.1.0 (BETA)¶
Version
0.1.0 (BETA)
Changes
- We've gone into BETA!
- Initial RSS support.
- Browse by category.
- Code cleanup.
- Split off css into seperate static file.
- Manual updated.
Date
19-08-2005
0.0.14 (ALPHA)¶
Version
0.0.14 (ALPHA)
Changes
- Better archive display. Group by month and year.
- Archive is now sorted by crdate, descending, no longer by 'sorting'.
- Blog entries are no longer sorted by 'sorting', only by creation date, descending.
Date
08-08-2005
0.0.12 (ALPHA)¶
Version
0.0.12 (ALPHA)
Changes
updated screenshots in documentation
Date
08-08-2005
0.0.10 (ALPHA)¶
Version
0.0.10 (ALPHA)
Changes
- configure extension via constant editor
- polarity switch of the thumbnail square/nonSquare option
- polarity switch the popup/noPopup option
- MM comments
- Comments are listed in blog entry editor
- Removed field photo_uid from comment table
- Comment listing in archive mode
- New css styles for archive mode
- Context sensitive help for tables / edit forms
Date
08-08-2005
0.0.7 (ALPHA)¶
Version
0.0.7 (ALPHA)
Changes
- Better documentation
- Comment window can now open as a javascript popup window.
- Better init functions
- Minor code cleanup
Date
04-08-2005
0.0.3 (ALPHA)¶
Version
0.0.3 (ALPHA)
Changes
Better documentation
Date
03-08-2005
EXT: Photo Blog - 17