Technology Tools for Ministry

Community

Web-Empowered Church User Community
All Categories > Ministry Tools > Sermon Management System Extension > Importing Of Files and Data?
Total Posts: 10 - Pages (1): [1]
Author: Jacob Ortman
Posted: Apr 22 2008 - 01:56 AM
Subject: Importing Of Files and Data?
I know this is a long shot, but I figured I'd ask.

I'm new to Typo3 and the WEC setup (great project, by the way). I've worked in other CMSes before, but never in Typo3 -- and it's daunting, but I'm getting the hang of it (slowly but surely -- http://www.sovereigngracebend.com/index.php )

Wordpress decided to poop out on me and I was getting sick of babysitting the thing and all its security issues. So I decided to try this project. I have a question about the Sermon management system (I have other questions, too, but those are for other threads). In my wordpress install, I basically had a blog post with links to the week's sermon's MP3 file using the podpress plugin. I still have all the sermons (103 files in the "/sermon_audio" folder) on the server, all named in MM.DD.YY format. Anybody know a way to import these as records, keeping the dates from the filenames? I also have the old WP database, if need be (and I don't mind monkeying with SQL and phpMyAdmin and the like, I just didn't know if this is even remotely possible).

Thanks in advance!
-Jake
Author: Peter Schott
Posted: Apr 22 2008 - 09:03 AM
Subject: re: Importing Of Files and Data?
It's definitely possible if you want to mess with the MySQL side. You'd want to import the data into the tx_wecsermons_resources table first to populate the available MP3 files. You'll need to choose whether they go in as a "Default" type or "MP3" type. Default will let people download them. MP3 will use the streaming plugin that comes with WEC, but won't give them a download option (that I've found anyway). You may want to create one Resource record first to see what they look like.

After that, you can create the "Sermon" records in tx_wecsermons_sermons. This is pretty straightforward as well, but you'll probably want to create that sample record first to see what it looks like.

Finally, as a minimum, you'll enter the relationships between the sermons and the resources in the tx_wecsermons_resources_rel table. You'll probably want to populate the other relationship tables as well, but this gives you a starting point. I'm sure that one of the programmers will have more information than I'm giving here, but from a purely DB perspective, that should be a good starting point.

You'll probably need to tweak some of the flags on the Sermon record for everything to display properly, but I think even without that it will work. Flags like the IsLinked or such may just affect the display, but it's possible the code is dependent on them for whether to even look for a resource. I wouldn't set those until after the link has been created in the join table(s), in any case.


As an FYI, there is a phpMyAdmin plugin for TYPO3 that will let you run the app straight from the TYPO3 interface. Useful on hosted solutions, but if you have better access another way, I'd probably use that just because it would be less setup. For me, it helps an awful lot because getting to the phpMyAdmin interface for our host involves a lot of steps.
user picture Author: Mark Stephenson
Posted: Apr 22 2008 - 12:53 PM
Subject: re: Importing Of Files and Data?
Jake,

First, welcome to WEC!

As I read Peter's post and think about the many sermons I have entered, I think it will be easier to open a few browser windows and cut and paste. The reason why is that each sermon has a main sermon record. That record includes information like the date, the name of the sermon, and the speaker. Then a sermon can have any number of resources. Those could be text, audio, video, a file, or a link. The resources are stored as separate records for each resource. When you enter a sermon, you will then add the resources for the sermon from that same form, but underneath all that there are multiple records. That makes transfer of the data at the database level more of a pain. My general feeling is that doing this via database changes is probably more time consuming unless you are a database wiz and want the fun of it. Once you get them entered you should have them list nicely and play onscreen or downloaded. And you can podcast them as well. You can also add more resource types in the future like text and/or video.

In Christ,
Mark
Author: Jacob Ortman
Posted: Apr 22 2008 - 02:09 PM
Subject: re: Importing Of Files and Data?
For the record, I have root access on the server. It's a cPanel server that I manage (one of three) and I'm kind of the church's geek so I volunteered to take this project on.

Sounds like the MySQL way might be more of a pain than I imagined because of all the tables and links involved. I understand the reasoning behind it, but that doesn't make it any easier :-)

I think I'll upload the last 6 months or so into the SMS and then just create an index page linking to the other 18 month's worth as raw data -- I don't know if I have the free time to get them all in there :-).

It was mentioned that the MP3 filetype will use the streaming plugin. Do any of the other audio formats use the streaming plugin (like WMA)? The reason I ask is that will save me a step as the audio recorder they use records in WMA format and I've just converted them all to MP3 format, but if I can skip that step, that'll save a few steps (and maybe make it so I can train others how to do this).

And is there documentation somewhere on the simple and easy way to upload a sermon into the system? I couldn't find instructions, unless I'm missing something really obvious (more than likely).

Will I have to reupload it from my desktop for the records to create properly or can I point at it in the directory it's in (or should I move the MP3s that are already on the server somewhere else).

Also, I just noticed that there's a 1.0 release here:
http://webempoweredchurch.org/products/wec_sermons/

It appears 0.9.5 on my server (came with the WEC Typo3 starter package). Should I be using 1.0?

Again, I apologize for all these questions, and thanks again for putting up with me! I'm sure once I learn Typo3 terminology a bit better (and how things work with it) I'll be bugging folks less.
Author: Matt Bradshaw
Posted: Apr 22 2008 - 02:17 PM
Subject: re: Importing Of Files and Data?
As Peter indicated, it's certainly *possible* to import the pre-existing data w/ pure SQL. But... I agree with Mark in that it's not exactly a pain-free experience and you might be better served by simply transferring them manually. Although you're on the bubble, so to speak, w/ 100+ sermons...

If you decide to go down this path, Peter correctly enumerated the main tables (thanks Pete!):

* tx_wecsermons_sermons - the main sermon data (pk is uid)

* tx_wecsermons_resources - a table listing resources, (pk is uid; other fields of interest to you include file, type [joined to tx_wecsermons_resource_types on uid... make sure this is downloadfile or embedded_mp3 for the tx.wecsermons_resource_types.typoscript_object_name] )

* tx_wecsermons_sermons_resources_rel - the intermediate table mapping sermons (sermonid => tx_wecsermons_sermons.uid) to resources (resourceid => tx_wecsermons_resources.uid)

As Peter indicated, there are other relationships that are less essential but follow the same pattern (speakers, topics, series, ...). Also note that our discussion of table layout assumes version 0.10.0. The table structure has changed in the last update.

If you have further questions, please let me know. :-)

Regards,

Matt
Author: Matt Bradshaw
Posted: Apr 22 2008 - 02:25 PM
Subject: re: re: Importing Of Files and Data?
Hello again, Jake. :-)

Looks like we were composing messages at the same time.

1) Yeah, I would *highly* recommend upgrading to 0.10.0 (not 1.0 <grin/>); 0.9.5 has some significant issues. The Starter package that was released yesterday (Typo3 v4.1.6) includes this latest release.

2) Unfortunately, the code for attaching resources expects you to upload the files again. Doing the MySQL handholding might be helpful just to populate the tx_wecsermons_resources table (move the files to $ROOT/uploads/tx_wecsermons). That could save you some time and is minimal in SQL complexity (no relations; simply rely on the UI to later map sermons to files/resources).

3) re: streaming WMA... I believe this is possible looking at the code, but I haven't verified to be 100% certain.

Hope this helps!

Regards,

Matt
Author: Jacob Ortman
Posted: Apr 22 2008 - 02:36 PM
Subject: re: Importing Of Files and Data?
Thanks for the updates, Matt. I think I'll just redownload the MP3s from the server and reupload them so I don't have to deal with the SQL issues. Would give me a chance to burn a backup copy anyway.

As for the upgrade, is it as simple as just uploaded the new files on top of the old ones (I used the tar.gz files before and probably will again) or is there more to it? Does it include upgrades to the other WEC extensions that appear to have new versions (eBible, for example)?

Thanks a bunch, Matt (and Mark, too)!
-Jake

user picture Author: Mark Stephenson
Posted: Apr 22 2008 - 02:42 PM
Subject: re: re: Importing Of Files and Data?
Jacob Ortman wrote:
For the record, I have root access on the server. It's a cPanel server that I manage (one of three) and I'm kind of the church's geek so I volunteered to take this project on.


Sounds like fun to me. :-)

Jacob Ortman wrote:
Sounds like the MySQL way might be more of a pain than I imagined because of all the tables and links involved. I understand the reasoning behind it, but that doesn't make it any easier :-)


Yea, this is a common issue when moving between different database representations.

Jacob Ortman wrote:
I think I'll upload the last 6 months or so into the SMS and then just create an index page linking to the other 18 month's worth as raw data -- I don't know if I have the free time to get them all in there :-).


I know the feeling, we have nearly 10 years of sermons we are moving. It gets painful, but it sure is fun after they are moved to be able to list them and display them in different ways automatically. Ours are here: http://ginghamsburg.org/sermon/ I think there are 205 of them so far.

Jacob Ortman wrote:
It was mentioned that the MP3 filetype will use the streaming plugin. Do any of the other audio formats use the streaming plugin (like WMA)? The reason I ask is that will save me a step as the audio recorder they use records in WMA format and I've just converted them all to MP3 format, but if I can skip that step, that'll save a few steps (and maybe make it so I can train others how to do this).


The audio plugin requires MP3 because MP3 plays across multiple platforms (PC, Mac, etc.) and it can be downloaded or podcast. The MP3 format makes for a nice universal format. However, you can use another player if you need to and other players can play WMA I believe. In order to simplify the process, it might be helpful to look at other tools that might export MP3 more easily. MP3 is so popular that there are probably many options out there.

Jacob Ortman wrote:
And is there documentation somewhere on the simple and easy way to upload a sermon into the system? I couldn't find instructions, unless I'm missing something really obvious (more than likely).


Here is a page where you can get the sermon document:

http://typo3.org/extensions/repository/view/wec_devo/1.7.0/

Click on "Read online" to see it in a web page or if you are running Open Office you can click on "Download" to the right of "doc/manual.sxw." The docs are in Open Office format because the software is free.

Jacob Ortman wrote:
Will I have to reupload it from my desktop for the records to create properly or can I point at it in the directory it's in (or should I move the MP3s that are already on the server somewhere else).

Also, I just noticed that there's a 1.0 release here:
http://webempoweredchurch.org/products/wec_sermons/

It appears 0.9.5 on my server (came with the WEC Typo3 starter package). Should I be using 1.0?

Again, I apologize for all these questions, and thanks again for putting up with me! I'm sure once I learn Typo3 terminology a bit better (and how things work with it) I'll be bugging folks less.


I suggest copying them to a directory in fileadmin. Then you can link to them from within the sermon management forms.

Yes, upgrading to the latest version is a very good idea now and in the future.

Well, hang with us and we will help you though the learning curve. Once you get going, I think you will be very pleased.

In Christ,
Mark
Author: Matt Bradshaw
Posted: Apr 22 2008 - 03:02 PM
Subject: re: re: Importing Of Files and Data?
Jake -

I actually misspoke earlier... brain isn't sufficiently caffeinated. You can point at items inside of the fileadmin tree. So there is no need to re-upload resource files.

With uprades, I typically resort to symlinks. I unpack the various versions and then simply modify the production typo3_src link to point at the version we're wanting. Note that the sermons extension in particular has an Update script (Extension Mgmr -> WEC Sermons -> UPDATE in the dropdown). This is to migrate from the old to the new table structure in case you have any preexisting sermon data.

Regards,

Matt
Author: Peter Schott
Posted: Apr 22 2008 - 03:06 PM
Subject: re: Importing Of Files and Data?
Sorry for the DB responses. I'm a DB guy by default so I'd probably have moved the files around and messed with the database if I had a bunch to import. Of course, our host is a little slow and I hate to spend time manually setting things. We don't have a problem of a huge backlog as we've only recently gone digital at our church.

Shouldn't the sermon doc link be:
http://typo3.org/documentation/document-library/extension-manuals/wec_sermons/0.10.0/view/

I agree with Mark - copy them somewhere so you can just pull them in and be done with it. Either that or take Matt's advice and populate the Resource table so you have something to start with. The SMS does copy files for Resources by default when you use the GUI. Even if the files are in the same folder, you'll get another copy (or did last I tried it).

-Pete
Total Posts: 10 - Pages (1): [1]
You must login to post a message to this conference.