Upcoming styles sharing platform¶
- Upload styles - implemented
- Browse styles - implemented
- Sort styles - implemented, more criterias may be added
- View details - implemented
- Download styles - implemented
- Rating - implemented
- Preview images of each style (before/after) - implemented
- Remove styles - not implemented
- Comments - not implemented
- Pagination - not implemented
- Approve styles - not implemented
Uploading a style¶
This is done inside darktable itself. Feature #9239. Select a style, select an image to represent the style, click upload. A new dialog pops up. Enter name and description. Enter username and password (for the redmine account, authenticated through the rest api).
The before and after images are rendered automatically. The before image is created by removing all modules that are included in the style from the duplicated image. The after image is done by applying the style to another duplicate. Both images are exported with max width 800px and max height 600px. Thumbnails are generated server side.
The user must also accept the user agreement which says roughly that images are published with the Creative Commons BY-NC-SA 3.0 Unported License, the style is released under another license (thoughts here about which license to use?), and that no sexually explicit, violent material may be uploaded etc. The developers (we) may at any time delete a style without letting the user know.
Go to the main page for the sharing platform. At the moment that is http://darktablestyles.sourceforge.net. It should probably be located at www.darktable.org/styles or www.darktable.org/resources/styles and found in the [resources] tab in the top menu.
This first page will give you an overview of all styles found. You're given the option to "Sort styles by rating, popular, newest, name, author". This may be extended if there is a need for that. Each style is displayed with some extra information depending on what sorting criteria you've selected; if rating - the current rating is shown, if newest - the upload date is shown etc.
Clicking a thumbnail or name of a style in the overview will bring you to the details page (show-style.php). Style name, description, rating, download stats, author, upload date, preview images etc. are shown.
Downloading a style¶
In the details page you can easily download a style by clicking "Download style" in the left panel. This will get the style from the database (stored in binary format) and record that the style have been downloaded +1 time.
The style's filename will be [id]-[name].dtstyle, so that every style will have it's unique filename. Any whitespace in the style name will be replaced with a dash (like-this).
Rating a style¶
Rating a style is done in the details page. Click the corresponding star in the rating bar underneath the preview image. The ip is logged to prevent multiple ratings from the same user/computer. One vote per ip and style is allowed. No interaction with accounts is done here.
Preview images for each style¶
Each thumbnail in the overview page is by default the after image. On hover it is shifted to the before image. This way the user can easily see what the style's affect will be.
In the detailed page the same approach is used. Hover over thumbnail to switch between after/before image. Here you can also click the thumb to bring up a big preview (max 800x600px) in a lightbox. Hovering here will also switch after/before image. You may also toggle with [t] on the keyboard, or clicking [t] in the instruction below the image. This way one can also preview styles on a tablet, smartphone etc., although that will probably not be the case too often. (Since the styles will be used on the computer they will likely be browsed there too)
Remove a style¶
At the moment there is no way to delete a style from the website. One idea from the irc is to have a link like "Report style", which gives the admins a hint about a style to remove. There one could also specify the reason why.
Some kind of backend for deleting styles must be implemented, and deletion only possible by admins (and maybe the author).
There is no consensus whether users should be able to remove their own styles.
Commenting a style¶
Right now there is no way to comment a style. It would be really nice if it's possible to reuse the wordpress comment feature, but it's pretty tricky to implement on non-wordpress-pages IIRC.
There is no pagination in the overview page at the moment. It would probably be a nice thing to have.
Approve a style¶
Styles uploaded to the website should be placed in a moderation queue. Before going live they should be approved or denied by an admin. Once a user have one style approved he/she should be able to upload styles directly without any further approval required.