summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-01 14:48:01 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-01 14:48:01 +0100
commitea5b0aa39b86d8a7c474d357616d76298477ed5e (patch)
treeeb40d1ee5f0e48e96590e9ae256dd5a575306b72 /plugins
parentf2a6a2bf7e4c574098e28ad81eabbc2b56425d72 (diff)
downloadliberty-ea5b0aa39b86d8a7c474d357616d76298477ed5e.tar.gz
liberty-ea5b0aa39b86d8a7c474d357616d76298477ed5e.tar.bz2
liberty-ea5b0aa39b86d8a7c474d357616d76298477ed5e.zip
Remove pbase/pdfx plugin — facilities moved into mime.pdf
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/mime.pbase.php123
1 files changed, 0 insertions, 123 deletions
diff --git a/plugins/mime.pbase.php b/plugins/mime.pbase.php
deleted file mode 100755
index 388d25c..0000000
--- a/plugins/mime.pbase.php
+++ /dev/null
@@ -1,123 +0,0 @@
-<?php
-
-namespace Bitweaver\Liberty;
-
-use Bitweaver\BitBase;
-
-/**
- * @version $Header$
- *
- * @author xing <xing@synapse.plus.com>
- * @version $Revision$
- * created Thursday May 08, 2008
- * @package liberty
- * @subpackage liberty_mime_handler
- **/
-
-/**
- * setup
- */
-global $gLibertySystem;
-
-/**
- * This is the name of the plugin - max char length is 16
- * As a naming convention, the liberty mime handler definition should start with:
- * PLUGIN_MIME_GUID_
- */
-define( 'PLUGIN_MIME_GUID_PBASE', 'mimepbase' );
-
-$pluginParams = [
- // Set of functions and what they are called in this paricular plugin
- // Use the GUID as your namespace
- 'verify_function' => 'mime_pbase_verify',
- 'store_function' => 'mime_pbase_store',
- //'update_function' => 'mime_pbase_update',
- 'load_function' => 'mime_pbase_load',
- //'download_function' => 'mime_pbase_download',
- //'expunge_function' => 'mime_pbase_expunge',
- // Brief description of what the plugin does
- 'title' => 'Display image from PBase',
- 'description' => 'Use a PBase image ID to display it on your website.',
- // Templates to display the files
- 'upload_tpl' => 'bitpackage:liberty/mime/pbase/upload.tpl',
- // url to page with options for this plugin
- //'plugin_settings_url' => LIBERTY_PKG_URL.'admin/mime_pbase.php',
- // This should be the same for all mime plugins
- 'plugin_type' => MIME_PLUGIN,
- // Set this to true if you want the plugin active right after installation
- 'auto_activate' => false,
- // Help page on bitweaver.org
- //'help_page' => 'LibertyMime+PBase+Plugin',
-];
-$gLibertySystem->registerPlugin( PLUGIN_MIME_GUID_PBASE, $pluginParams );
-
-function mime_pbase_verify( &$pStoreRow ) {
- global $gBitSystem, $gBitUser;
- $ret = false;
- if( BitBase::verifyId( $pStoreRow['pbase_id'] )) {
- $pStoreRow['user_id'] = BitBase::verifyId( $gBitUser->mUserId ) ? $gBitUser->mUserId : ROOT_USER_ID;
- $pStoreRow['attachment_id'] = $gBitSystem->mDb->GenID( 'liberty_attachments_id_seq' );
- $ret = true;
- } else {
- $pStoreRow['errors']['pbase_id'] = "No valid PBase ID given.";
- }
- return $ret;
-}
-
-/**
- * Store the data in the database
- *
- * @param array $pStoreRow File data needed to store details in the database - sanitised and generated in the verify function
- * @access public
- * @return bool true on success, false on failure - $pStoreRow[errors] will contain reason
- */
-function mime_pbase_store( &$pStoreRow ) {
- global $gBitSystem;
- $ret = false;
- if( BitBase::verifyId( $pStoreRow['pbase_id'] )) {
- // add the data into liberty_attachments to make this file available as attachment
- $storeHash = [
- "attachment_id" => $pStoreRow['attachment_id'],
- "content_id" => $pStoreRow['content_id'],
- "attachment_plugin_guid" => PLUGIN_MIME_GUID_PBASE,
- "foreign_id" => $pStoreRow['pbase_id'],
- "user_id" => $pStoreRow['user_id'],
- ];
- $gBitSystem->mDb->associateInsert( BIT_DB_PREFIX."liberty_attachments", $storeHash );
- $ret = true;
- } else {
- $pStoreRow['errors']['pbase_id'] = "No valid PBase ID given.";
- }
- return $ret;
-}
-
-/**
- * mime_pbase_update update file information in the database if there were changes.
- *
- * @param array $pStoreRow File data needed to update details in the database
- * @access public
- * @return void
- */
-function mime_pbase_update( &$pStoreRow, $pParams = null ) {
-}
-
-/**
- * Load file data from the database
- *
- * @param array $pFileHash Contains all file information
- * @param array $pPrefs Attachment preferences taken liberty_attachment_prefs
- * @param array $pParams Parameters for loading the plugin - e.g.: might contain values such as thumbnail size from the view page
- * @access public
- * @return bool true on success, false on failure - $pStoreRow[errors] will contain reason
- */
-function mime_pbase_load( &$pFileHash, &$pPrefs, $pParams = null ) {
- $ret = [];
- if( $ret = mime_default_load( $pFileHash, $pPrefs )) {
- $ret['display_url'] = 'http://www.pbase.com/image/'.$pFileHash['foreign_id'];
- $ret['thumbnail_url']['small'] = 'http://www.pbase.com/image/'.$pFileHash['foreign_id'].'/small.jpg';
- $ret['thumbnail_url']['medium'] = 'http://www.pbase.com/image/'.$pFileHash['foreign_id'].'/medium.jpg';
- $ret['thumbnail_url']['large'] = 'http://www.pbase.com/image/'.$pFileHash['foreign_id'].'/large.jpg';
- $ret['is_mime'] = true;
- }
- return $ret;
-} \ No newline at end of file