Support for SermonSpeaker 5.x is in bugfix mode only, the same as it is for Joomla 3.10.
I will not add any new features to this releases.
Please upgrade to SermonSpeaker 6.x and Joomla 4.x, which is better anyway.

Moving Audiofiles to new directory

More
04 May 2014 20:30 - 04 May 2014 20:33 #4569 by Neil Zampella
Does anyone have an SQL script or J! extension that will help me change all the rows in the #_Sermons_Sermons table to reflect the new directory I had to create when I moved a site to J! 3.3?

I discovered that I had inadvertently use the same directory for the sermons, that I use for my site backups, and sermons were not being included in the backup.

However, now I have to manually change over 250 sermons to reflect the new path. Can anyone assist with a good SQL script?

I may just export the directory to text, do a find/replace, then drop and reload the table.

Note to developers: Perhaps it may be a good idea in future to use the path set in the Options, and append the filename to it so that issues like this could not happen in the future.

Thanks for your assistance.
Last edit: 04 May 2014 20:33 by Neil Zampella.

Please Log in or Create an account to join the conversation.

More
04 May 2014 20:49 #4570 by Thomas Hunziker
Hi Neil

The path in the options is only used to populate the dropdowns and to define where an uploaded file will be stored. This is to make sure changing the value doesn't break existing sermons.

But I may think about creating a tools function to move the files. I just need to find some time somewhere B)

As for the SQL command. Something along this line should work:
Code:
UPDATE `#__sermon_sermons` SET `audiofile` = REPLACE (`audiofile`, '/old/path/to/sermons/', '/new/path/to/sermons/')
Replace #__ with you database table prefix and do the same for the 'videofiles' field as well if needed.

Please Log in or Create an account to join the conversation.

More
05 May 2014 19:52 #4571 by Neil Zampella
Thanks Thomas ... it worked great !!

Please Log in or Create an account to join the conversation.

More
16 Dec 2015 09:25 #5722 by William Osborn
Hi Thomas - I accessed this thread because I have a similar issue with the websites that I maintain for the churches here in Hungary. In order to speed up response time on the websites, the webmaster has created a separate archive server to store all the Mp3's and/or videos. I can use something like the SQL example earlier in this thread to change the file path of all the studies' audio file path values, as well as changing the file path in the options. However, since this new archive server has a separate URL, I am not sure of the syntax that should be used for the new file path. so that your php scripts can properly access and retrieve the studies. Your help is always appreciated!

Please Log in or Create an account to join the conversation.

More
16 Dec 2015 20:15 #5724 by Thomas Hunziker
If the files aren't on the same domain (or more precisely within Joomla directory), they need to be linked with the full absolute URL starting with http:// (or https://). SO in the database you have to adjust it to this type of URL.

The file paths in the options don't matter for that. They are only relevant for new sermons. They tell SermonSpeaker where to look for files and populate the dropdown list. If you have your files on an extern server, that lookup will not work without some coding work.

Please Log in or Create an account to join the conversation.

More
17 Dec 2015 10:30 #5725 by Andy Prosser
I have a similar challenge. Wanting to move the audio files to a different server and domain - they're nearly out of disk space.

Did you ever develop the path update tool or is an SQL hack still the best way?
How do I set the new path going forward?

Andy

Please Log in or Create an account to join the conversation.

Time to create page: 0.106 seconds
Powered by Kunena Forum