Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-05-15 15:56:12
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
bot_file_upload: upload and edit files from within the write tab
When you need to associate files with an article you’ll probably do the same as me: create a custom field called ‘files’ and manually insert file ids in it. Then you call a file list in your artcle with something like:
<txp:file_download_list id='<txp:custom_field name="files" />' wraptag="ul" break="li">
<txp:file_download_description/>
</txp:file_download_list>
(or use upm_file for txp versions pre 4.2.0).
This plugin doesen’t change this internally, it just operates at a visual level hiding the custom field and replacing it with an interface which lets you also upload and edit files from within the “write” tab – all without even touching the keyboard.
The plugin is heavily jquery based and basically uses an iframe to add and edit the files.
This plugin is interface-less. It must be configured by modifying plugins code.
Once some files are uploaded/associated with an article bot_file_upload will create a file list just under the ‘title’ field (but can be easily moved in another location)
Last edited by redbot (2012-12-07 14:16:53)
Offline
Re: bot_file_upload: upload and edit files from within the write tab
Result! Another essential redbot plugin.
:-)
Offline
#3 2010-05-16 21:38:27
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_file_upload: upload and edit files from within the write tab
pieman wrote:
Result! Another essential redbot plugin.
Thank you, glad you found it useful :-)
Offline
Re: bot_file_upload: upload and edit files from within the write tab
Redbot, I’m really looking forward to testing this out. Should have something to report back soon.
:)
Offline
Re: bot_file_upload: upload and edit files from within the write tab
Excellent, you rock man.
Offline
Re: bot_file_upload: upload and edit files from within the write tab
hey just tried it out and it integrated with the system i had already set up very well! (it’s the daily creations project on my homepage)
do you think there is a way to remove a file directly from the write tab? you have to go into the menu and uncheck it.
also i have been wondering for a while – is there any way to show a progress bar when uploading in txp?
Last edited by mrtunes (2010-05-19 17:01:05)
Offline
#7 2010-05-19 19:35:42
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_file_upload: upload and edit files from within the write tab
mrtunes wrote:
…do you think there is a way to remove a file directly from the write tab? you have to go into the menu and uncheck it.
Er… the plugin should already provide this feature. Have you uploaded the icons provided? On the right side of each file in the file list there should be an “x” like icon (delete) and a “pencil” icon (edit).
…also i have been wondering for a while – is there any way to show a progress bar when uploading in txp?
No, sorry, not really a progress bar (too complicated for me), but again… did you upload the images provided? one of them is a classic “loading” gif
aswihart wrote:
..Excellent, you rock man.
;-) thanx!
Last edited by redbot (2010-05-19 19:38:32)
Offline
Re: bot_file_upload: upload and edit files from within the write tab
Result! Another essential redbot plugin.
:)
txtstrap (Textpattern + Twitter Bootstrap + etc…)
Offline
#9 2010-05-27 17:45:08
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_file_upload: upload and edit files from within the write tab
Version 0.2 released.
This version doesn’t add new features, just fixes some issues and refines the overall look.
- File description changes are now immediately shown in the write tab, without the need to reload the page
- fixed Opera bug (file names didn’t show up)
- refined look
- file list is now placed by default under the ‘excerpt’ field (can be configurable anyway)
- other minor glitches fixed
Offline
Re: bot_file_upload: upload and edit files from within the write tab
Hey redbot, just trying this out, but I’m not getting anything on the “Write” tab. I tried disabling bot_wtc with no change. Also tried changing the plugin setting from after ‘excerpt’ to ‘body’. Any idea what could be wrong?
EDIT: Spoke to soon, I just hadn’t made the files
custom field, which is obviously needed.
I just ran into the same issue using Remora with the “lightbox” window asking me to login again, and also it has the drop-down Remora menu bar showing at the top inside the lightbox. This seems like the same thing that you smashed out in bot_image_upload, so nothing new here. I will keep playing around and check back later.
Last edited by aswihart (2010-07-28 15:20:47)
Offline
#11 2010-07-28 15:20:54
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_file_upload: upload and edit files from within the write tab
Hi, have you set a custom field for files? And secondly, have you changed plugins code accordingly (By default it works with a cf called “files”)?
edit
Oops! too late! Anyway you are right, it has the same issues of bot_image_upload (first version) so you can have a look on that thread to fix them.
I wish I had the time to release a new version but unfortunately it wasn’t the case. I’ll try to do it asap…
Last edited by redbot (2010-07-28 15:28:12)
Offline
Re: bot_file_upload: upload and edit files from within the write tab
Yep, the same fixes you mentioned for Remora and bot_image_upload work here, the following changes are needed for those affected:
change line 33 from…
$bot_iframe_url = hu.'textpattern/index.php?event=file';
…to…
$bot_iframe_url = 'index.php?event=file
and change line 144 from…
iframe.find("#pagetop,#end_page").hide();
…to…
iframe.find("#pagetop,#end_page,#nav,#messagepane").hide();
Offline