Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2013-02-13 02:05:42
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
File already exists error message
Spotted this when attempting to upload a duplicate file – shouldn’t the “File already exists” message be a red one rather than a greenie?
Offline
Re: File already exists error message
Yeah, there are a few other places on that panel in particular where the error level status isn’t set properly. Easy to fix, leave it with me.
EDIT: or Jukka :-)
Last edited by Bloke (2013-02-13 13:13:10)
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
Online
#3 2013-02-13 09:11:03
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: File already exists error message
Thanks Stef. Whilst we’re on the subject of Files tabs – are there any plans afoot to add in some pluggable_ui()s to the File Edit page – similar to what’s been done on the Image Edit page?
Offline
Re: File already exists error message
gomedia wrote:
are there any plans afoot to add in some pluggable_ui()s to the File Edit page – similar to what’s been done on the Image Edit page?
There should be some, yes. Loose plan is to pluggable_ui() as much as makes sense as each tab is revisited with markup changes. Whaddya need, and where?
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
Online
#5 2013-02-13 11:54:32
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: File already exists error message
Bloke wrote:
There should be some, yes. Loose plan is to pluggable_ui() as much as makes sense as each tab is revisited with markup changes. Whaddya need, and where?
Something along the lines of what’s been done to the Image tab would be fine thanks – i.e. where each subcomponent has its own pluggable_ui. I’m working on a File tab version of adi_image_tab & am rediscovering the quirks of ob_start() & pattern matching buffers. I’ve a client that’s going to be doing a lot of file uploads, so I’m trying to make it a little easier for them. One particular aspect, which I want to provide a way around, is the standard “Replace file replaces the file contents, but not the file name” scenario.
Offline
Re: File already exists error message
I was going to plan my first plugin attempt for the file tab – can I not do that at the moment?
I was planning to add an image field, for client logo, site screenshot type senarios.
Offline
Re: File already exists error message
tye wrote:
I was planning to add an image field, for client logo, site screenshot type senarios.
You can do that now, for sure. Hook into the file_ui
/ extend_detail_form
event/step and you can add the image UI controls there. You’ll also need to do some database wrangling on the file
event to create the new column (or table if you wish) to hold the image, etc.
How do I know it works? Because I’ve done it for a few people in the past. Even to the extent that the image was automatically associated if the name (+.jpg or .png) matched the filename. What we’re talking about here is just more stuff to allow you to replace content on the Files panel instead of just augmenting it. If you need to do that kind of thing you can approach it in at least two other ways, but it’s potentially ugly:
- jQuery
- buffer processing (str_replace)
If you want to look at smd_remote_file, I’ve got a new (4.5+) version that I haven’t got round to uploading yet which uses the ugly method to do its stuff. That plugin would be so much easier with better callbacks like those Adi mentioned…
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
Online
Re: File already exists error message
Thanks Stef – I’ll download smd_remote_file which will probably help me blankly looking at files and code…. which is all I have done so far :)
Offline
Re: File already exists error message
As of r5221 any individual admin-side input control rendered by the inputlabel() function can be customized through the pluggable UI events.
Any rendered inputLabel() widget goes through a callback event that follows the pattern {$event}_ui > inputlabel.{$name}
. Works the same as any other callback event or pluggable UI spot.
Offline
#10 2013-02-15 00:56:12
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: File already exists error message
Thanks.
Offline
Re: File already exists error message
tye wrote #270502:
I was planning to add an image field, for client logo, site screenshot type senarios.
Hi tye. Did you implement this in the end? If so, could you share your solution or plugin? I’d like to add publication covers to a downloads area…
TXP Builders – finely-crafted code, design and txp
Offline
#12 2015-09-23 22:32:46
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: File already exists error message
jakob wrote #295094:
I’d like to add publication covers to a downloads area…
On my pencil-notes-roadmap for adi_file_tab I’ve got written “File image field”. What kind of thing did you have in mind?
Offline