Auto title downloadable files

Phoca Download - download manager
sirdani
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 08 Feb 2011, 10:45

Auto title downloadable files

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48595
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Auto title downloadable files

Post by Jan »

Hi, for now there is no such feature, it is in feature request list (something like multiple add in phoca gallery)

Jan
If you find Phoca extensions useful, please support the project
User avatar
ep98
Phoca Professional
Phoca Professional
Posts: 163
Joined: 12 May 2008, 12:00
Contact:

Re: Auto title downloadable files

Post 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
sirdani
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 08 Feb 2011, 10:45

Re: Auto title downloadable files

Post 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).
User avatar
ep98
Phoca Professional
Phoca Professional
Posts: 163
Joined: 12 May 2008, 12:00
Contact:

Re: Auto title downloadable files

Post by ep98 »

dir /s >> filenames-with-subs.txt
But since is solved, is good.
More happy Phoca users :)
Jynxx
Phoca Member
Phoca Member
Posts: 10
Joined: 18 Aug 2012, 17:14

Re: Auto title downloadable files

Post 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.
Jynxx
Phoca Member
Phoca Member
Posts: 10
Joined: 18 Aug 2012, 17:14

Re: Auto title downloadable files

Post 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?
Jynxx
Phoca Member
Phoca Member
Posts: 10
Joined: 18 Aug 2012, 17:14

Re: Auto title downloadable files

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48595
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Auto title downloadable files

Post by Jan »

Hi, thank you for this guide.

Jan
If you find Phoca extensions useful, please support the project
Post Reply