Geeklog Plugins by Portalparts - www.portalparts.com
filemgmt - Version 1.5.2
Author: Blaine Lang < blaine@portalparts.com >
Date: April 2, 2006
Requires: Geeklog Version 1.4 or greater
Plugin adds the ability to upload and manage downloads of files on your website.
Summary of features:
- Files can be organized into categories and subcategories
- Categories can be be restricted - access assigned to a group
- Able to restrict access to members only - both overall view access and upload rights available
- Categories and Files can have image thumbnails or snapshots
- File Rating and reporting of broken links
- Automatic flagging of Popular and new files
- Integrated support for comments - optionally per file
- Easy online Administration
- Language Files for Translation and Templates to modify File layout view
Summary of version 1.5 changes
- Support for GL 1.4 Comment API
- Integrated Category security to restrict access to files for specific Groups only
- Support for autotag -- example [file:10] creates a link
to file id 10 with the filename as the link description
- Major overhaul of all screens to clean up HTML and use Generic Plugin CSS
- Support for PHP settings register_globals and register_long_arrays now to be off
- File Listing - main view pages are now templates for end-user theming
- Integrated Update - via plugin Editor
- Admin setup auto determines initial (default) settings for file repository
- Integrated support for glMenu - see www.portalparts.com
This chapter contains the following sections:
If you've enjoyed this plugin, please consider supporting my contributions. These projects require considerable time and effort to create for distribution and ongoing support. The intial version of this plugin was released in 2002. |
|
1) How to Install
You need to manually create the plugins program directories and copy the files to their appropriate directories.
Step 0 - Backup your Database
- Make a backup of your current
geeklog database using the built-in admin feature. Verify your backup feature is
configured correctly and backup file is not 0 bytes. This is worth the time to verify your backup
Step 1 - Restore the plugin Archive
- Uncompress the archive files into your <geeklog_dir>/plugins directory. It will create a filemgmt subdirectories for the files.
Step 2 - Create the required plugin directories
- Create a directory called filemgmt under your public_html directory
- Create a directory called filemgmt under your public_html/admin/plugins directory
Step 3 - Copy the the required plugin files
- Copy the files (contents) from the new plugin's public_html directory to the filemgmt directory you just created under your sites main public_html directory
- Copy the files (contents) from the new plugin's admin directory to the filemgmt directory you just created under your sites main public_html/admin/plugins directory
Step 4 - Run the plugin install
- Logged in as 'admin' you can access the installer from the plugin editor [admin -> plugins]
- If the files have been copied correctly in step 3, you will see the new plugin to be installed
Step 5 - Create the required directories for the File Store / Repository
Create the following directories under public_html. You can change the names and location if you want. It just must be located somewhere under your sites publc_html directory. The actual setup will be defined in the plugins administration settings.
Set directory permission so that your webserver has write access to the directories. This may require write permissions to be 744, 754 or 777 depending on your webserver setup.
- filemgmt_data
- filemgmt_data/files
- filemgmt_data/files/tmp
- filemgmt_data/snaps
- filemgmt_data/snaps/tmp
- filemgmt_data/category_snaps
Step 6 - Set filemgmt Admin Settings
You need to have write access to the /plugins/filemgmt directory to allow the filemgmt admin script to update your sites setup. Needs write access to the file filemgmt.php
- Access the filemgmt admin (Admin Menu Block), from there the Settings page
- Review the settings and update as required for your site preferences
- The initial load of this page will invoke a new feature where it will pre-load the default settings for the last six settings (Directories and URL settings for your file repository). If you have used the default directory paths they are most likely correct but verify.
- Note the URL and Path settings end in a forward slash / character
2) How to update from version 1.3
You need to be running Geeklog version 1.4 or later and filemgmt plugin version 1.3
Step 0 - Backup your Database
- Make a backup of your current
geeklog database using the built-in admin feature. Verify your backup feature is
configured correctly and backup file is not 0 bytes. This is worth the time to verify your backup
Step 1 - Restore the plugin Archive
- Rename your plugins filemgmt.php - site settings so you don't loose them when you restore the new archive or restore the archive to a temp directory and copy over all the news files except filemgmt.php
- Uncompress the archive files into your <geeklog_dir>/plugins directory. You will need to replace all the files and some directories and files are no longer needed.
- Update all your sites main public_html/filemgmt files. Suggest you delete current files and copy over the new files
- Update all your sites main public_html/admin/plugins/filemgmt files. Suggest you delete current files and copy over the new files
- Remove any filemgmt related CSS from your themes style.css - no longer used
Step 2 - Run the plugin update
- Access the plugin update from the Plugin Editor. The plugin listing will now show a newer version of code is installed and an update is recommended. Using the Edit link by the plugin record, you will access the screen where there will now be an update button. The update will execute the needed database changes.
3) Theming the plugin look
The plugin uses the new default plugin CSS declarations that were introduced in GL 1.4. Example of the main CSS decalarations used are:
- .plugin - for overall look of the main tables
- .pluginRow1 and .pluginRow2 for the alternating file listing records
The templates are located under the main plugins folder plugins/filemgmt/templates directory
- filelisting.thtml - main template, container for category records and file listing records
- filelisting_category.thtml - individual template for each category - top of file listing
- filelisting_record.thtml - format for each individual file listing record. It's now possible by altering this template to have the actual filelisting snaphot image appear as a thumbnail inline in the listing. I've included comments in the template to make this change.
- filelisting_subcategory.thtml - used when viewing a category to format the top category heading
- sortmenu.thtml - used to format the sortable heading when in the category view
You can change the default number of categories shown per row in the main view
Variable: $numCategoriesPerRow
- Edit the script public_html/index.php and near the top of the script is this setting - default is 4
- Edit the script public_html/viewcat.php and near the top of the script is this setting - default is 6
4) Config.php Settins
There are a few config options available for the plugin in the plugins/filemgmt/config.php file. Edit as required for local site preference. The comments in the confg.php should explain their use.
// Permissions that will be used for new files into the repository
$filemgmtFilePermissions = (int) 0755;
// Number of days to show new files listing
$filemgmtWhatsNewPeriodDays = 14;
// String Length for Filename Titles in WhatsNewBlock
$filemgmtWhatsNewTitleLength = 20;
// Should the Whats New Block show new FileMgmt Comments
$filemgmt_showWhatsNewComments = true;