Picturelicious v2.0

Installation

  1. Edit the lib/config.php. Things you absolutely need to change are the $frontendPath and $db (Database) settings.

  2. Upload everything from the picturelicious/ directory, so that the index.php is at the root of your installation. Make sure you also upload the .htacces file (it is initially hidden on MacOS).

  3. Make sure PHP has writing permissions on the following directories:

    You can change permissions (chmod) with your FTP client. Many server configurations require you to set permissions to 0777 (all permissions set).

  4. Import the picturelicious.sql with PHPMyAdmin into your database.

  5. Register a new user on your site. You can give this user Admin rights, by changing the admin value for this user to 1 in the pl_users table. Again, use PHPMyAdmin to do so.

    Important: If you want to use the vbb-Forum integration, you have to install the forum and activate it in your config before(!) any users are registered.

Mass importing images

You can import many images at once. Just upload all images you want to appear on your site into the import/ directory of your installation, log in as an admin user and choose Import from the menu. You can then click on Import Images at the bottom of the page. Please note that this may take a while.

Customizing the Image Grid

The Image Grid or "Image Cloud" is highly customizable but requires some understanding. When a page is loaded, all images are assigned to one of the available thumbnail sizes and the Image Grid is then generated in a fixed width. This is important for users who have Javascript disabled. When Javascript is enabled, the Image Grid will adept to the available width of the browser window. The width and height of each thumbnail in this grid is also specified in the style.css. Therefore, if you want to change the layout, you have to edit three different files:

The Image Grid is ultimately defined by the different thumbnail sizes that are available. In the default configuration, thumbnails are generated in 3 different, qudratic sizes 64x64, 128x128 and 192x192. Since the gridSize is set to 64, the size of the thumbnails is only specified by 1, 2 or 3 - a multiple of the gridSize.

The percentage setting in the lib/config.php specifies how many of the images are assigned to each of the box definitions. All of these percentage settings should add up to 1. The order of these box definitions is also important: the first definition is the "least important", while the last one is the "most important", meaning that images with a bad rating will be assigned to the first one, while images with a good rating, will be assigned to the last one.

Take a look at the image-grid-examples.html for some example configurations.

Please note that whenever you change the size of one of these thumbnail definitions, the thumbnails have to be regenerated. There is no tool included for doing so on the fly. The simplest solution is, to move all images into the import/ directory, clear the database and import these images again.

Using the Random Thumbnail Widget

To promote your Picturelicious site on other websites, you can easily embed some thumbnails from Picturelicious by using the following code snippet:

<script type="text/javascript" src="http://example.com/random/4/64x64/">

This will insert 4 thumbnails in 64x64 wherever you put this snippet to. Also take a look at the configuration (Random Thumbnail Widget).

Configuration

All configuration settings can be found in lib/config.php. Following is a list of these settings and their meaning. Many of this settings are only needed for fine tuning.

Names and URLs for your installation

$absolutePath
The absolute path to your Picturelicious installation from your domain root. If Picturelicious is installed on http://example.com/picturelicious/, your $absolutePath must be set to /picturelicious/. If Picturelicious is not in a sub-directory, the default setting (/) is the right one.
$frontendPath
The complete URL to you Picturelicious installation.
$siteName
The name of your site. This value is extensivly used in numerous templates and the registration mail
$siteTitle
The title of your site to appear in the browser window's title bar

Cookies

$sessionCookie
The name of the session cookie - a normal user will never see this
$rememberCookie
The name of the remember cookie - a normal user will never see this

Spam protection

$ipLockTime
The time in seconds to lock an IP-adress from voting for the same image again
$uploadLockTime
The time in seconds to which the $maxNumUploads setting corresponds
$maxNumUploads
The maximum number of image uploads allowed in $uploadLockTime seconds

User scores

$votingScore
The score a user gains for voting for an image
$postScore
The score a user gainr for posting an image
$tagScorePerChar
The score a user gains for each character he writes in a tag
$tagScoreMax
The maximum score when tagging an image

Misc settings

$usersPerPage
The number of users to show on one page in the user list
$defaultChmod
The permissions to use when creating a new directory. Chances are, you have to keep this setting at 0777
$templates
The directory in which all templates are stored
$keywordWordSeperator
The seperator between words when a keyword for an image is generated. Feel free to change this to '_' or an empty value for no word seperation
$colorSearchDev
The maximum deviation for each color channel (R, G, B) when searching for colors

Random Thumbnail Widget

$maxRandomThumbs
Maximum number of thumbnails to show on the random thumb widget
$minRandomScore
Minimum score of an image to be shown on the random thumb widget

vbb Forum integration

$vbbIntegration
enabled
Whether to enable the vbb integration (true|false)
path
relative path to the installation directory of vbb-Forum

Cache settings

$cache
enabled
Whether to enable the cache
path
relative path to the cache directory
clearEvery
The cache is cleared at every image upload or at least every n'th vote

Database settings

$db
host
The hostname of your database server (in most cases this should be localhost)
database
The name of the database where all the Picturelicious tables reside
user
username for the database login
password
password for the database login
prefix
prefix for all tables (note that you manually have to rename your tables if you want to change this setting)

Image processing and thumbnail creation

$images
thumbsPerPage
Number of images to show in the browse mode (i.e. the image cloud)
imagePath
File path to the images
thumbPath
File path to the thumbnails
avatarsPath
File path to the avatar images
maxDownload
Maximum file size when copying images from a remote URL
jpegQuality
Quality level for the created thumbnails (0-100)
sharpen
Whether to sharpen thumbnails after resizing. Note: This only works with PHP 5.1 and newer and is automatically disabled on older versions.

Grid Solver settings

$gridView
Refer to the Grid View section in this readme