Source for file storage.pbase.php
Documentation is available at storage.pbase.php
* @subpackage plugins_storage
define( 'PLUGIN_GUID_PBASE', 'pbase' );
'store_function' => 'pbase_store',
'load_function' => 'pbase_load',
'verify_function' => 'pbase_verify',
'expunge_function' => 'pbase_expunge',
'description' => 'PBase Image ID',
'auto_activate' => FALSE,
'edit_label' => 'Enter <a href="http://www.pbase.com">PBase</a> Image ID',
'edit_field' => '<input type="text" name="STORAGE['. PLUGIN_GUID_PBASE. ']" size="40" />
<a href="http://www.pbase.com">{biticon ipackage=liberty iname=pbase iexplain=pbase}</a>',
'edit_help' => 'Enter the ID of the image you would like to include.<br />The ID is the number that is displayed at the end of the URL in the browsers address bar, when viewing the image of choice.'
the pbase plugin doesn't need to do anything extra besides store the pbase image_id
in liberty_attachment.foreign_id - which has already happened in LibertyAttachable::store().
So, we don't need to even define this function
if( !empty( $pStoreRow['upload'] ) ) {
$pStoreRow['foreign_id'] = $pStoreRow['upload'];
return( empty( $pStoreRow['foreign_id'] ) ? FALSE : TRUE );
if( $pRow['foreign_id'] ) {
$ret['source_url'] = 'http://www.pbase.com/image/'. $pRow['foreign_id'];
$ret['thumbnail_url']['small'] = 'http://www.pbase.com/image/'. $pRow['foreign_id']. '/small.jpg';
$ret['thumbnail_url']['medium'] = 'http://www.pbase.com/image/'. $pRow['foreign_id']. '/medium.jpg';
$ret['thumbnail_url']['large'] = 'http://www.pbase.com/image/'. $pRow['foreign_id']. '/large.jpg';
|