Topic: [Snippet] MODcast - MODx Podcast / Podcasting snippet  (Read 27423 times)

Pages: [1] 2 3   Go Down

#1: 3-May-2006, 04:03 AM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
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.html
and 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

* MODcast_MODcastAdmin_v0.2.6.zip (409.87 KB - downloaded 523 times.)
* MODcast_README.txt (7.32 KB - downloaded 562 times.)
« Last Edit: 12-May-2006, 12:45 AM by ScottyDelicious »

#2: 3-May-2006, 04:16 AM

Testers

banzai
Posts: 880

MODx Italia

WWW
Thanks for sharing Scotty - nice snippet Wink
MODx Websites Showcase 
Add your site to www.modx.it!
-----------------------------------------------------
FREE MODx Templates
www.tattoocms.it
-----------------------------------------------------
VIDEO: whats new in MODx 0.9.5   | VIDEO: MODx PHP Application Framework  |  modx Revolution  

bubuna.com - Web & Multimedia Design

#3: 3-May-2006, 07:07 AM

Administrator

zi
MODx Special Forces /
Posts: 3,555

May Peace Be On You

WWW
Nice snippet Scotty! Smiley

Thanks for sharing.

regards,

zi

#4: 3-May-2006, 12:14 PM

kickass
Posts: 160

WWW
Very cool! Check it off the wishlist!
"I'd love to change the world but I can't find the source code . . ."

Custom ModX Templates

#5: 3-May-2006, 03:41 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
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-

#6: 3-May-2006, 04:04 PM

kickass
Posts: 160

WWW
Oh, Scotty, you are delicious! Wink

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  Grin) 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.
"I'd love to change the world but I can't find the source code . . ."

Custom ModX Templates

#7: 3-May-2006, 06:37 PM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
My, my this is a kickass snippet (no pun intended Wink )

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 ?

Grin

I still have to install and test, but I just love the concept, and the name... man that was a sweet pick !!!
Hats off !
.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net

#8: 3-May-2006, 06:56 PM


Pixel Stuff
Posts: 275

WWW
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: 3-May-2006, 07:07 PM by jbjones »

#9: 3-May-2006, 07:12 PM


Pixel Stuff
Posts: 275

WWW
I read somewhere back when hand coding these things. Is the RSS tag of a Podcast actually supposed to read like this?

Code:
<rss xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd" version="2.0">

I'm just wondering.  Mine is currently only reading

Code:
<rss version="2.0">

Still seems to work just fine though. 
« Last Edit: 3-May-2006, 07:14 PM by jbjones »

#10: 3-May-2006, 10:20 PM

Briggsy
Posts: 372

WWW
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  Smiley
Emergency Management Academy of New Zealand
      http://www.emanz.ac.nz

MODx Sandbox   Login: sandbox  Password: castle

Admin Sandbox   Login: sandbox  Password: castle

#11: 5-May-2006, 11:59 AM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
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]] Grin.  I hated the fact that the snippet call was like 400 characters long Wink.  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.  Cry

later

-sD-

#12: 5-May-2006, 12:15 PM


Pixel Stuff
Posts: 275

WWW
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.

#13: 5-May-2006, 04:15 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
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! Wink

-sD-
« Last Edit: 5-May-2006, 04:20 PM by ScottyDelicious »

#14: 5-May-2006, 09:27 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
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-

#15: 6-May-2006, 02:50 AM


Pixel Stuff
Posts: 275

WWW
Wow.  Those two posts were only like 5 hours apart.  Fast working there.

#16: 6-May-2006, 08:36 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
I give up  Cry.
I can get it to work on my local testing server, but not on any of the production servers I use.  If anyone wants to take over this project, please do.  I am too much of a noob yet.  maybe later.

-sD-

#17: 6-May-2006, 09:29 PM

Coding Team

garryn
Posts: 1,391

WWW
Hey Scotty! Don't give up so easily Wink

PM me the code (or a link where I can download it) and I'll check it out and see if I can give you a hand. You've made a great snippet here, be a shame if you didn't progress it through.

I remember being in the position as you with PHP coding, it was only through the help of this community I have managed to code what I have.

Cheers, Garry

#18: 6-May-2006, 11:20 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
Hey Scotty! Don't give up so easily Wink

PM me the code (or a link where I can download it) and I'll check it out and see if I can give you a hand. You've made a great snippet here, be a shame if you didn't progress it through.

I remember being in the position as you with PHP coding, it was only through the help of this community I have managed to code what I have.

Cheers, Garry
Thanks Garry.  I am sending you a PM right now.  Honestly, this project consumed every free minute (+ some more minutes) of the last 5 days and my fiancé is getting pissed at me Cheesy Wink.

I appreciate you volunteering to take a look at my code.  I have wanted to ask someone to do this, but my AIM buddies (Mark & OpenGeek) have been pretty busy.  I basically just figured out a way to do some stuff that worked on one thing, that may or may not work on this project.  I admit that my knowlege deficit is the culprit here, and your agreement to pick me up out of the dirt and brush my face off means a lot.  check your MODx Forum PM box.

-sD-
« Last Edit: 7-May-2006, 11:29 AM by ScottyDelicious »

#19: 7-May-2006, 03:48 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
Ok,  Garry was right!  I do give up too easily.
It works just fine when it is called uncached ( i.e. [!MODcastAdmin!] )
so, we are back on track.
I should be posting v0.2 later today.

thanks to everyone who has helped or contributed ideas/feature requests.  You are the reason MODx gets better every day.

later

-sD-

#20: 9-May-2006, 03:15 AM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
Holy ice skating crap that was a lot more work than I expected! Shocked

I think I may have a semi-useful product here suitable for end users.  Please, if you have a chance to download this snippet and test it out I surely do appreciate it.  Please also keep the comments, suggestions, feature requests comming.  I never would have thought of half this crap if it wasn't for you guys.  I attached the new version to the first post.

-sD-
Pages: [1] 2 3   Go Up
0 Members and 1 Guest are viewing this topic.