From 144d628081d5666ec0520d346a31f50563da7b61 Mon Sep 17 00:00:00 2001 From: brent s Date: Sat, 30 Apr 2016 21:28:05 -0400 Subject: [PATCH] this shit sucks. writing plugins r hard hur durr --- bts_podcast/bts_podcast.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bts_podcast/bts_podcast.php b/bts_podcast/bts_podcast.php index 759acd8..3a2f8fa 100644 --- a/bts_podcast/bts_podcast.php +++ b/bts_podcast/bts_podcast.php @@ -18,8 +18,8 @@ $plugin['flags'] = PLUGIN_LIFECYCLE_NOTIFY; //if (!defined('txpinterface')) // @include_once('zem_tpl.php'); -register_callback('bts_podcast_initdb','plugin_lifecycle.bts_podcast', 'enabled'); -register_callback('bts_podcast_gen_metainfo','article_saved'); +//register_callback('bts_podcast_initdb','plugin_lifecycle.bts_podcast', 'enabled'); +//register_callback('bts_podcast_gen_metainfo','article_saved'); if (0) { ?> @@ -93,6 +93,11 @@ function bts_podcast_initdb () { safe_query("CREATE TABLE IF NOT EXISTS bts_podcast (id int(11) NOT NULL AUTO_INCREMENT,url_title varchar(64) NOT NULL,filename varchar(64) NOT NULL,type char(3) NOT NULL,checksum char(64) NOT NULL,bytesize varchar(16) NOT NULL,created datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,changed timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,PRIMARY KEY (id),UNIQUE KEY unique_index (url_title,type)) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8"); } +function bts_podccast_filesize($atts) { + bytecount = filesize(bts_podcast_path($atts) . bts_podcast_filename($atts); +return $bytecount; +} + function bts_podcast_gen_metainfo ($input) { $hash = hash_file('sha256',file_article_upload()); // safe_query("INSERT INTO bts_podcast (url_title,filename,type,checksum,bytesize) VALUES ('" . $input['urltitle'] . "','" . $input['mediafile'] . "','" . $input['mediatype'] . "','" . $input['mediachksum'] . "','" . $input['mediabytes'] . "') ON DUPLICATE KEY UPDATE url_title = '" . $input['urltitle'] . "', filename = '" . $input['mediafile'] . "', type = '" . $input['mediatype'] . "', checksum = '" . $input['mediachksum'] . "', bytesize = '" . $input['mediabytes'] . "'"); @@ -169,11 +174,10 @@ function bts_podcast_media_uri ($atts) { } /* -function bts_podccast_filesize($atts) { -} function bts_podcast_medialength($atts) { } -function bts_podcast_get_guid($atts) { +function bts_podcast_add_guid($atts) { + } */