You have quite a few documents (txt, doc, pdf etc..) in your gallery? and you want to display them in a better way? If yes then this is the plugin for you.
For those of you who are not familiar with Scribd, take a look at
this. This is how you can display the documents in your coppermine installation too.
Here is a working demo after installing the plugin.
First you will have to register an account on
Scribd and get the API key and secret phrase. You can do so from
here.
After you get the API key and secret phrase install the attached plugin and your are all done.
Unfortunately cpg lacks a few plugin hooks which is needed by this plugin, So you will have to add those hooks manually i.e. you will have to add a few lines of code manually
before installing the plugin.
Edit include/picmgmt.inc.php (function add_picture)
Add
$CURRENT_PIC_DATA['pid'] = mysql_insert_id();
CPGPluginAPI::filter('add_file_data_success',$CURRENT_PIC_DATA);
just before
return $result;
}
Edit delete.php (function delete_picture)
Add
$pic['pid'] = $pid;
CPGPluginAPI::filter('before_delete_file', $pic);
just before
$query = "DELETE FROM {$CONFIG['TABLE_PICTURES']} WHERE pid='$pid' LIMIT 1";
$result = cpg_db_query($query);
Edit editpics.php (function process_post_data)
Add
$pic['pid'] = $pid;
CPGPluginAPI::filter('before_delete_file', $pic);
just before
$query = "DELETE FROM {$CONFIG['TABLE_PICTURES']} WHERE pid='$pid' LIMIT 1";
$result = cpg_db_query($query);
Thats it. After making the above changes you can install the plugin. The configure screen of plugin will ask you the Scribd API key and Secret phrase.
Supported formats are
txt, doc, ppt, xls, pdf and rtfNote:- The plugin requires PHP 5 and CURL
- Only documents uploaded after installing the plugin will be converted to Sribd. All older documents will continue to be displayed in normal way.
- All the documents you upload to your cpg installation will also be copied to scribd server.
- After you uninstall the plugin, the copies from scribd server will not get deleted. You will have to do that manually by visiting their site.
Cheers,
Abbas