Dr. Scotty Delicious
Coding Team

Posts: 1,172
Dr. of Fine Pirate Arts
|
 |
« on: May 03, 2006, 04:03 AM » |
|
MODcast & MODcastAdmin 0.2.6 by Scotty Delicious http://www.scottydelicious.com Made on a Mac™ (OS X 10.4.6) using TextMate [ http:\\:www.macromates.com ]
based on dircaster 0.4 by Ryan King ( http://www.shadydentist.com) ID3v2.x tag support added by Warren Stone <fasttr [at] gmail [dot] com> and utilizing getid3 library by James Heinrich <info [at] getid3 [dot] org>, http://www.getid3.org. iTunes specific tag support by Warren Stone The MODcast snippet generates an iTunes XML podcast feed from a folder of audio or video files. The MODcastAdmin snippet asks the user to create a new feed and then presents the user with an easy to manage form requesting configuration data, then writes that data to a configuration file with the same name as the feed. Example, a user creates a new feed called "mytalkshow". MODcastAdmin takes all their preferences and stuffs them into a file called mytalkshow.inc.php. To call the snippet, one would simply type [[MODcast? &feed=`mytalkshow`]]. All their prefs would be loaded automatically by the snippet. NEW! You can also use MODcastAdmin to edit and manage existing config files. Simply select the name of the "feed".inc.php file you with to edit from the drop down list, press "Load Config File", "Continue", and there are all your preferences, already in the form, just begging to be edited or embellished! So, again, you must call the admin snippet uncached [!MODcastAdmin!], and the page where you call MODcast from must have the template set to "blank", and its content type set to text/xml. all you need to do is specify the feed! I have this snippet creating a podcast of all my music. the music page is: http://www.scottydelicious.com/music.htmland the podcast XML is: http://www.scottydelicious.com/modcast.xml CHANGE LOG: See MODcast_README.txt
TO DO: Add file upload management (sill only 50% done) Change if/else statements to switch/case (100% done) Add more descriptive/helpful comments (forever ending, never done) Clean up the code (Got a damn good start today)
KNOWN BUGS: #1) the subcategory gets reset everytime a saved config file is reloaded. !RESOLVED! #2) Check boxes don't work. !RESOLVED! #3) the subcategory doesn't work at all in KHTML/WebKit based browsers (safari, shiira, konqueror...).
later -sD- scotty Delicious
|
|
|
« Last Edit: May 12, 2006, 12:45 AM by ScottyDelicious »
|
Logged
|
We pillage, we plunder, we rifle and loot. Drink up me 'earties, Yo Ho! We kidnap and ravage and don't give a hoot. Drink up me 'earties, Yo Ho! Yo Ho, Yo Ho! A pirate's life for me.
|
|
|
banzai
Testers

Posts: 857
MODx Italia
|
 |
« Reply #1 on: May 03, 2006, 04:16 AM » |
|
Thanks for sharing Scotty - nice snippet 
|
|
|
|
|
Logged
|
|
|
|
zi
MODx Special Forces /
Administrator

Posts: 3,014
May Peace Be On You
|
 |
« Reply #2 on: May 03, 2006, 07:07 AM » |
|
Nice snippet Scotty!  Thanks for sharing. regards, zi
|
|
|
|
|
Logged
|
“Internet Explorer’s CSS rendering: WYSIWTF”. — someone genius
--------------------------------------------------
|
|
|
|
kickass
|
 |
« Reply #3 on: May 03, 2006, 12:14 PM » |
|
Very cool! Check it off the wishlist!
|
|
|
|
|
Logged
|
|
|
|
Dr. Scotty Delicious
Coding Team

Posts: 1,172
Dr. of Fine Pirate Arts
|
 |
« Reply #4 on: May 03, 2006, 03:41 PM » |
|
There are a few additions on my todo list:
1) Turn this into a module + Snippet combo. you will be able to set the configuration through a form. the preferences you set in the module would be passed to the snippet so it could be called simply as [[MODcast]] on a blank template, text/XML page.
2) Add an "Upload Media" option to the module so you can do all the management from the back end.
I feel like I may be missing something, If you have any ideas, please post them here.
-sD-
|
|
|
|
|
Logged
|
We pillage, we plunder, we rifle and loot. Drink up me 'earties, Yo Ho! We kidnap and ravage and don't give a hoot. Drink up me 'earties, Yo Ho! Yo Ho, Yo Ho! A pirate's life for me.
|
|
|
|
kickass
|
 |
« Reply #5 on: May 03, 2006, 04:04 PM » |
|
Oh, Scotty, you are delicious!  Yes, that would all be good, since, for instance, the client who asked for this feature for the site I'm currently building knows just enough about html to give me a headache . . . (yes, Barry, I realize you might be reading this, but I've already told you that in person the last time I had to fix your site  ) So making podcasting "idiot-proof" would be a very good thing. No great hurry, I'm still building this one out . . . but I suspect some people might need it yesterday.
|
|
|
|
|
Logged
|
|
|
|
davidm
Marketing & Design Team

Posts: 6,777
The best way to predict the future is to invent it
|
 |
« Reply #6 on: May 03, 2006, 06:37 PM » |
|
My, my this is a kickass snippet (no pun intended  ) I mean this is one of those things that will get bloggers out of the wood to adopt MODx as their favorite blogging tool... this, NewsListing and MaxiGallery and soon Trackbacks... why do you need WordPress or Loudblog for ?  I still have to install and test, but I just love the concept, and the name... man that was a sweet pick !!! Hats off !
|
|
|
|
|
Logged
|
|
|
|
|
Pixel Stuff
|
 |
« Reply #7 on: May 03, 2006, 06:56 PM » |
|
When you create the module, it would be nice to allow the date to be set on uploaded items rather than using the time stamp on the upload. Multiple reasons. - If you move the podcast archive all the dates get reset.
- The specific need I have is that we record live events and podcast them later in the week. I would rather have the date of the event show on the podcast rather than the date we uploaded it which might be the next day.
Second, is there currently any way to specify the Description field for the individual podcasts? I haven't found it yet. Ccould we get a paramater to pull that description from the MP3s comment field until a full entry form is made in the module.
|
|
|
|
« Last Edit: May 03, 2006, 07:07 PM by jbjones »
|
Logged
|
|
|
|
|
Pixel Stuff
|
 |
« Reply #8 on: May 03, 2006, 07:12 PM » |
|
I read somewhere back when hand coding these things. Is the RSS tag of a Podcast actually supposed to read like this? <rss xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd" version="2.0"> I'm just wondering. Mine is currently only reading <rss version="2.0"> Still seems to work just fine though.
|
|
|
|
« Last Edit: May 03, 2006, 07:14 PM by jbjones »
|
Logged
|
|
|
|
|
Briggsy
|
 |
« Reply #9 on: May 03, 2006, 10:20 PM » |
|
Sweet, been away for a month+, to come back and see this great Snippet. I can stop messing around with other 3rd party tools and lookat genuine MODx implimenation. Cheers 
|
|
|
|
|
Logged
|
|
|
|
Dr. Scotty Delicious
Coding Team

Posts: 1,172
Dr. of Fine Pirate Arts
|
 |
« Reply #10 on: May 05, 2006, 11:59 AM » |
|
Just an update, I have the Podcast management snippet for [[MODcast]] half done. It is called "[[MODcastAdmin]]". The configuration part works awesome. You fill out a web form once to configure every aspect of the snippet so the only call would be [[MODcast]]  . I hated the fact that the snippet call was like 400 characters long  . I need to scrub up the file upload half of [[MODcastAdmin]] because there are some SERIOUS security issues with it now, and it only uploads a file (no display of files already uploaded, no settings for timestamp like jbjones suggested), but I am hoping to get a ton of work done on MODcast/MODcastAdmin v0.3 this weekend because it is my fiancé's bridal shower, so I am kicked out of the house.  later -sD-
|
|
|
|
|
Logged
|
We pillage, we plunder, we rifle and loot. Drink up me 'earties, Yo Ho! We kidnap and ravage and don't give a hoot. Drink up me 'earties, Yo Ho! Yo Ho, Yo Ho! A pirate's life for me.
|
|
|
|
Pixel Stuff
|
 |
« Reply #11 on: May 05, 2006, 12:15 PM » |
|
While you are working on a configuration panel, think about how to create two separate Podcasts on the same site. For example: If we were using only [[MODcast]] how would we differentiate between a video cast and an audio cast or two different audio casts.
|
|
|
|
|
Logged
|
|
|
|
Dr. Scotty Delicious
Coding Team

Posts: 1,172
Dr. of Fine Pirate Arts
|
 |
« Reply #12 on: May 05, 2006, 04:15 PM » |
|
While you are working on a configuration panel, think about how to create two separate Podcasts on the same site. For example: If we were using only [[MODcast]] how would we differentiate between a video cast and an audio cast or two different audio casts.
Hmmm? Hadn't thought of that, as I just put this snippet together because I wanted to create a iTunes podcast of my music, so I only needed one feed. The "dirCaster" script that I used for the basis of this snippet works ok for this. I can see how multiple would be totally useful. If you have any ideas on how I could implement this, please post some very specific PHP code showing how to do this as I am basically a PHP noob (I just decided to start learning PHP about a month ago). I am going to continue my current work on v0.3 as a single feed, but even as I am writing this I am coming up with ideas on how to implement that feature. Thanks jbjones. you got my gears turning here!  -sD-
|
|
|
|
« Last Edit: May 05, 2006, 04:20 PM by ScottyDelicious »
|
Logged
|
We pillage, we plunder, we rifle and loot. Drink up me 'earties, Yo Ho! We kidnap and ravage and don't give a hoot. Drink up me 'earties, Yo Ho! Yo Ho, Yo Ho! A pirate's life for me.
|
|
|
Dr. Scotty Delicious
Coding Team

Posts: 1,172
Dr. of Fine Pirate Arts
|
 |
« Reply #13 on: May 05, 2006, 09:27 PM » |
|
Ok, I have MODcastAdmin working to configure multiple pocasts/videocasts. it now configures a user define feed for MODcast. once configured, MODcast can be called as [[MODcast? &feed=`podcast1`]] or whatever it was you set your feed name to in MODcastAdmin. I need to do a few more tests with it, and continue work with the *very* basic file upload. It may end up being a total of 3 snippets, MODcast, MODcastAdmin (for uploading and deleteing), and MODcastConfig (for creating or editing the config file). We will have to see how clever I can be.
-sD-
|
|
|
|
|
Logged
|
We pillage, we plunder, we rifle and loot. Drink up me 'earties, Yo Ho! We kidnap and ravage and don't give a hoot. Drink up me 'earties, Yo Ho! Yo Ho, Yo Ho! A pirate's life for me.
|
|
|
|
Pixel Stuff
|
 |
« Reply #14 on: May 06, 2006, 02:50 AM » |
|
Wow. Those two posts were only like 5 hours apart. Fast working there.
|
|
|
|
|
Logged
|
|
|
|
|