Page 1 of 1
Auto title downloadable files
Posted: 08 Feb 2011, 10:56
by sirdani
Hi,
is it possibble, to add the file name to each downloadable files' Title field automatically? I have about 600 files that I uploaded, and don't want to fill the title fields manually...
Thank you in advance.
Re: Auto title downloadable files
Posted: 13 Feb 2011, 01:29
by Jan
Hi, for now there is no such feature, it is in feature request list (something like multiple add in phoca gallery)
Jan
Re: Auto title downloadable files
Posted: 17 Feb 2011, 12:50
by ep98
You can play around with Excel 2 SQL

Make a csv regarding to files table in phoca and inject the date there.
Naming can be done simply - dir >> filenames.txt
Re: Auto title downloadable files
Posted: 17 Feb 2011, 14:44
by sirdani
Thanks, ep98, finally I did this way (I found it out myself just yesterday

)
This worked perfect and quick, the only difficulty was that the files are in different subdirectories, so I had to complete the filename column in the csv file (I merged to columns - the path and the filename).
Re: Auto title downloadable files
Posted: 17 Feb 2011, 14:49
by ep98
dir /s >> filenames-with-subs.txt
But since is solved, is good.
More happy Phoca users

Re: Auto title downloadable files
Posted: 28 Aug 2012, 15:50
by Jynxx
I know this is old, but can someone explain this to me? I have about the same amount as the author, around 600 files (mp3 files) that it would just be so much easier for me if the title/filename was added automatically. I have all 600 in the ../phocadownload folder just waiting to be tagged and readied. I am just looking for an easier way to add them. Doing all 600 one by one would take so so so long.
Re: Auto title downloadable files
Posted: 28 Aug 2012, 16:12
by Jynxx
Nevermind, when I did multiple add it added them automatically. Now question two... is there a way to auto add the preview file to be the same as the main file? Basically so you don't have to select a play/preview file? I can multiple add all 600 files, but I still have to go in and select the preview files one by one.
Like, is there a way to copy the "filename" table on the database, and then paste it to the "play" section on the database?
Re: Auto title downloadable files
Posted: 28 Aug 2012, 16:33
by Jynxx
Again, after looking for a LONG time (started before I asked this question), I found the answer. For anyone who is interested, this is how I did it.
First, I uploaded all my files via FTP to the /phocadownload folder. I actually had another folder in there named "audio" so it was ../phocadownload/audio. After that I did "Multiple Add" from the Joomla - Phoca Download - Files section, and selected them all. They all were added, and the filename became the title and the alias. Then in order to make the "Play" file the same as the filename, I did this...
I went into the MySQL database using phpMyAdmin, found the joomla database, and browsed to the jos_phocadownload table. I then ran an SQL query saying:
Code: Select all
update (table) set column2 = column1
So in my case, adding the "filename" to "filename_play" was as easy as:
Code: Select all
update jos_phocadownload set filename_play = filename
And boom, all 600 added as previews. Awesome. Hope this helps anyone else who has this problem!
Re: Auto title downloadable files
Posted: 19 Sep 2012, 00:05
by Jan
Hi, thank you for this guide.
Jan