|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Including Viewer Remarks in Generated AlbumsNote: The Viewer Remarks feature requires that albums be viewed from a web server that supports PHP and either MySQL or PostgreSQL (which may run on a user’s machine or be provided by an external web host). Most web hosts provide this functionality (MySQL is more common than PostgreSQL).Items on this page
IntroductionWhen the Viewer Remarks feature is enabled, viewers of generated albums can post remarks about album images. These remarks can be viewed by all who view the album. Remarks appear in the lower part of the page just above the horizontal shadow bar. The Remarks pane can be set to open:
Viewer Remarks can be enabled for slide image pages, index pages, or both. The Viewer Remarks feature has an Administration Console that permits those with the assigned adminstrative password the right to edit or delete a single remark and delete all remarks for a given image. Two security features can be enabled to help thwart “forum spam”:
Viewers may embed <b></b> or <strong></strong> tags to create bold text and may embed <em></em> or <i></i> tags to create italicized text. All other html tags are stripped from messages, for security reasons.
Sample Album with Viewer Remarks enabledThere is a sample album with a working example of the Viewer Remarks feature. Please feel free to add, edit, or delete comments. To enter administrative mode, use ‘admin’ for the username and ‘1111’ for the password. RequirementsThe web server on which the album is located must support the programming language PHP and either the MySQL or PostgreSQL database program. Users who run their own web servers should know this. Most users use an external web host; check the web host’s control panel or ask the host’s technical support to see if these requirements are met (most web hosts provide this functionality). Quick Start GuideThe follow steps must be taken to create an album with the Viewer Remarks feature:
Note: When generating an album with the Viewer Remarks feature, the page extension must be set to .php on the JAlbum Advanced-Naming tab and ‘Write UTF-8’ must be set on the JAlbum Advanced-General tab. BPP will not generate the album unless this is done. Creating a MySQL or PostgreSQL databaseUsers running their own webservers should consult the appropriate documentation to figure out how to create a MySQL/PostgreSQL database on their server. Users with an external web host will most likely use their web host’s control panel to create a MySQL/PostgreSQL database. If needed, consult the web host’s documentation or the host’s technical support. There are typically three steps that need to be taken:
Important: three pieces of information are needed from the MySQL/PostgreSQL database creation process: the MySQL/PostgreSQL database name, the database username, and the username password. Write these down (and keep the information for future reference)! Typically, there is no way to recover a database user password via a web host’s control panel. At many webhosts, the database name and database username will in the form hostusername_dbname and hostusername_dbusername, where hostusername is the username used to access the webhost’s control panel. Create the MySQL/PostgreSQL database before an album using the Viewer Remarks feature is generated. (Note: to avoid difficulty with some web servers, lower case should be used for the database name, username, and password.) A single MySQL/PostgreSQL database can be used to hold Viewer Remarks for multiple BluPlusPlus albums. Each album should have its own unique table name. Flash videos showing how to set up a MySQL database in three of the more popluar web host control panels are available via the links below: Note: The appearance of the control panels at a particular webhost may differ from the appearance of those shown in the videos, but the functionality should be similar. Setting up the Viewer Remark FeatureThe Viewer Remarks feature is enabled and set up on the BluPlusPlus Viewer Remarks tab. The following fields must be completed (to avoid difficulty with some web servers, lower case should be used for all fields): Server-based info (once set up, this will not change from album to album)
Album-based info (can change from album to album)
Note that some webhosts, for security reasons, only allow auto-generated emails to be sent to the same domain as the domain of the hosted website (for example, if the website is at domain ‘yourdomain.com’ notification emails could be restricted to go only to ‘someaddress@yourdomain.com’; ‘someaddress@aol.com’ may not function correctly). If notification emails sent to an external address do not arrive, this may be the reason. Some users may not find this convenient, as it may be desirable to send notification emails to an email address NOT at the website domain. As most webhosts offer email support and offer email forwarding support, a workaround would be to create an email address at the website domain and setup forwarding from that address to an external address. Administraton ConsoleTo access the Administration Console, type ‘admin’ in the Name field and the admin password set up when the album was generated in the Message field.
With the Administration Console, a remark may be deleted, edited, or approved (if Moderation is enabled); all remarks for a given image can also be deleted in admin mode. Via the ‘Remarks to display’ drop-down menu, one can choose “All remarks for page”, “All remarks in album”, “Unapproved remarks for page”, or “All unapproved remarks for album”. Note: if Moderation is not enabled, the two drop-down menu entries referring to unapproved remarks and the checkboxes for approving remarks will not appear.
International Language Support In order to enable full support for remarks left in international languages with non-Western character sets, the “Encoding” drop down menu on the JAlbum Advanced-General tab must be changed to “UTF-8”. If the album contains folders and/or images named using international languages with non-Western character sets, the “URL-encode links” box should be checked on the JAlbum Advanced-Naming tab (this second requirement is not specific to the Remarks feature but is necessary for JAlbum to handle non-Western file/folder names). Customizing the Date and Time format The date display format defaults to the US standard: month.day.year. The time display format defaults to Hours:Minutes (in 24 hour time). The default date/time format string is “m.d.Y H:i”. The periods between the format characters indicates that periods are to be used as separators. If slashes were used instead of periods, a date would be displayed as “month/day/year”. To change to “day/month/year” format use “d.m.Y H:i”. Note that the time shown is the server’s time, not the local time of the person viewing the album. A few examples of date/time display formats should give an idea of some of the possibilities:
The following (complicated) table gives all possible format characters for date and time display:
SecurityThe parameters needed to make the Viewer Remarks feature work (MySQL/PostgreSQL database name, database username, database user password, admin login, and admin password) are all stored in plain text in a file that can be opened on a local computer. However, they are not accessible when pages are viewed from a web server. Even attempting to load the connection script file directly will only result in seeing a blank page. While there are no guarantees, security for viewer remarks should be quite good. TroubleshootingThe most common problem that occurs is that the generated album cannot connect to the MySQL/PostgreSQL database. The indication of this is that either when a slide image page loads or when one clicks “Show/Hide” to toggle the Viewer Remarks, only a vaguely worded error message appears. The usual cause of this is either (a) incorrectly setting up the MySQL database, database user, or user password, or (b) entering this information incorrectly in the BPP-Viewer Remarks tab. The following are some possible error messages and their causes:
|