Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-04-10 09:06:58

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Adding Files to the txp database manually?

I want to make use of the TXP file stats etc that come with uploading files via the txp admin interface. The files I’m working with are 60mb audio files (DJ mixes) so as you can imagine, the admin interface times out whilst uploading the 60mb file.

I can easily upload the files via FTP so that’s not a problem, but how can i add the files manually to the TXP database so i can make use of the TXP stats?

Offline

#2 2009-04-10 09:27:07

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Adding Files to the txp database manually?

Hi Qwest, In the files tab, there is a pull down menu called “existing file”. Choose the file through that:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-04-10 10:25:28

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: Adding Files to the txp database manually?

aaaaaaaaahhh! Thanks :)

Offline

#4 2009-04-12 11:49:02

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: Adding Files to the txp database manually?

just a quick note on this – I’ve done the above and added the existing files to my database and they all show up nicely, however I’ve tested the download count by downloading the files myself, but they still show as “none” downloaded… is this something to do with TXP not counting my own IP or something else?

Offline

#5 2009-04-12 21:04:27

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Adding Files to the txp database manually?

Qwest wrote:

is this something to do with TXP not counting my own IP or something else?

I wouldn’t think so.

How are you downloading the file, perhaps by using a direct url pointing at the files directory?

Offline

#6 2009-04-13 09:03:54

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: Adding Files to the txp database manually?

This would be a link to one of my mixes > http://mrqwest.co.uk/dj/file_download/3 which presumably goes through TXP so I would of thought it’d pick up the downloads?

Offline

#7 2009-04-13 09:11:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Adding Files to the txp database manually?

Qwest wrote:

http://mrqwest.co.uk/dj/file_download/3

I don’t think file_download counts work unless the ‘file_download’ part of the URL is “the section”, i.e. http://mrqwest.co.uk/file_download/3. I may be wrong, though as I’ve never tried putting file_download anywhere else in the URL.

[ P.S. just looked in the core code and I’m not sure how it is downloading your files at all with that URL scheme… unless you’re using gbp_permanent_links or something? I’ve not looked in the core in too much depth so maybe there’s something there I don’t quite understand ]

Last edited by Bloke (2009-04-13 09:12:07)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#8 2009-04-13 09:20:47

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Adding Files to the txp database manually?

Stef, I think that Quest has two txp installs, one in the root and another in the /dj/ directory.

Qwest, what happens when you use the standard txp tag?

<txp:file_download_link id="3">Download</txp:file_download_link>


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#9 2009-04-13 09:24:45

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: Adding Files to the txp database manually?

Bloke… thanks for your comments. The files downloaded fine with that url scheme.

The TXP url is http://mrqwest.co.uk/dj so the file_download is the section i think, although I’m just using the Article section & adding the files to the Content > Files tab.

I’m not using any plugins for this the links to the files. I’m uploading via FTP and adding the existing files via Content > Files tab. Once I’ve got the file ID, i add that to a custom field in my Write tab (Download_ID). And then in my form, i’ve got a link to the file like this >

<a href=”<txp:site_url />file_download/<txp:custom_field name=“download_ID” />”>download</a>

This then links to the following URL : http://mrqwest.co.uk/dj/file_download/3/ which then converts to the URL via TXP.

I hope that makes sense and i’d really like to know why the downloads are still saying 0.

Offline

#10 2009-04-13 09:36:45

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: Adding Files to the txp database manually?

Colak,

I added that standard txp file tag, and downloaded the file using that link – and the file download still reads ‘none’

Offline

#11 2009-04-13 09:41:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Adding Files to the txp database manually?

colak wrote:

Stef, I think that Quest has two txp installs, one in the root and another in the /dj/ directory.

D’oh! of course, forget I spoke.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB