Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2010-12-19 18:07:46

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

With version 0.4 two long awaited features are coming:

  • Multiple fields (“article image” or any other custom field) can be set for the plugin to operate.
  • Each field can be set to accept single or multiple images

So, for example, you may want to set the “article image” field to accept only one image, custom field 2 to accept a list for a gallery, custom field 3 for another gallery and so on.

If you are associating a lot of images with an article I suggest to use my other plugin bot_wtc to move the field in the central colum for a nicer look.

Works only with txp 4.3.
Download from first post.

Last edited by redbot (2010-12-22 20:24:59)

Offline

#50 2010-12-19 20:59:04

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

Is there no end to your brilliance? I’m loving the idea of using multiple fields. Thank you redbot, I can’t wait to try it out!

Offline

#51 2010-12-20 16:01:26

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

aswihart wrote:

Is there no end to your brilliance? I’m loving the idea of using multiple fields. Thank you redbot, I can’t wait to try it out!

Thank you aswihart! Let me know if you find any issues.

Offline

#52 2011-01-10 12:23:53

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

thanks for the adaptation of the plugin.
it works for me, i can see all the 50+ images below my article. sweeeet!

i have a question:
how do you sort the images..? is there a way to do so..? cause now you can enable new images and theyll get added behind the other images, right?..

and some minor problem, who cares..?
i use txp as a multi-site installation, the path to the images for the buttons are not working.
background: url(“’.hu.‘textpattern/?bot_image_img=delete”)
i fixed it locally, but the images are not existing, and i really dont know, where to look for them. are they getting generated or what the heck..?

thanks and keep it on!!

Offline

#53 2011-01-10 22:00:15

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

jens31 wrote:

how do you sort the images..? is there a way to do so..? cause now you can enable new images and theyll get added behind the other images, right?..

Hi jens,
Yes, you are right, images are added one after the other and are ordered in the public site depending on the sort order you specify when you call them within a normal txp tag (or a plugin like smd_gallery).
Remember that this plugin is just a cosmetic trick, under the hood you still have a comma separated list of images id.

If you are asking for the capability to re-order images in the write tab you are out of luck, sorry.
The issue is – while in bot_file_upload I provide a mechanism to re-order the files direcly in the admin side – in bot_image_upload things are more complex because we are dealing with floated thumbnails. I could use drag and drop but I didn’t want to require the inclusion of the jquery ui files.
I’ll see if in the future I’ll have a better idea…

and some minor problem, who cares..?
i use txp as a multi-site installation, the path to the images for the buttons are not working.
background: url(“’.hu.‘textpattern/?bot_image_img=delete”)
i fixed it locally, but the images are not existing, and i really dont know, where to look for them. are they getting generated or what the heck..?

Er, actually I didn’t consider multi-site installations (I’ve never ever tried them) but the issue should be trivial to solve. Even if I have no idea how now :-(
See, the images are base64 encoded and are included directly in the plugin code (can’t you see that long and weird series of apparently random characters ? ).
A temporary solution – until I manage to understand how multi sites work – is to download the tree images here, upload to your site and change manually the css in the plugin code.

thanks and keep it on!!

Thank you!

Offline

#54 2011-01-11 00:17:52

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

redbot wrote:

Er, actually I didn’t consider multi-site installations (I’ve never ever tried them) but the issue should be trivial to solve. Even if I have no idea how now :-(

Redbot, I think I fixed a similar issue in my plugin by just removing the hu and just using ?my_plugin_resource as the url.
There’s some information in this forum post


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#55 2011-01-11 09:02:28

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

hi redbot

i arranged myself with the sorting, since i put the textfield back on screen and made a title tag to the images, so ill know the id when hovering. this should work for now.
drag and drop would be the ultimate, my fear would just be the effort, not the ui implementation :)

Offline

#56 2011-01-11 11:01:50

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

MattD wrote:

Redbot, I think I fixed a similar issue in my plugin by just removing the hu and just using ?my_plugin_resource as the url.
There’s some information in this forum post

Thanks Matt, very useful infos!
Jens, can you try if Matt’s suggestions works?

jens31 wrote:

…my fear would just be the effort, not the ui implementation :)

I have the same fear ;-)

Offline

#57 2011-01-11 11:26:43

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

so let me get this clear, cause there is no real solution in matt’s link.
you have to implement another variable into the plug-in called ?my_plugin_resource (man, ill never get it to implement these fancy colored code snippets..):
and set it, right? and point it to the correct directory. in my case

?my_plugin_resource = “/”;

(cause i use a subdomain called admin.xyz.com)

Offline

#58 2011-01-11 12:08:40

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

jens31 wrote:

so let me get this clear, cause there is no real solution in matt’s link.
you have to implement another variable into the plug-in called ?my_plugin_resource (man, ill never get it to implement these fancy colored code snippets..):
and set it, right? and point it to the correct directory. in my case

No Jens! I’m talking about something very simple (if you want, of course).
Just edit the plugins code (if you haven’t already heavily modified it) and between lines 42- 58 replace

"'.hu.'textpattern/?bot_image_img=delete"

with

"?bot_image_img=delete"

or

"'.hu.'admin/?bot_image_img=delete"

or other similar variations

Offline

#59 2011-01-11 13:55:34

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

yo

ah, ok, got it.
“’.hu.‘admin/?bot_image_img=delete”
wont do, since the domain (hu) points to the public folder, while the admin folder is on the same level like the public one.

“?bot_image_img=delete”
will work (cause it now does). only thing i did, was moving the images from the txp folder into the txp_img folder, cause its a smartass that i is cleaning up all i can..

so i guess you could just remove ‘.hu.‘textpattern/
and it would work, in both, normal installation and multi-site, no??

by the way (cool, that i mention this at the end of our little training, eh?)
why not just use letters instead of images (like x for delete and e for edit).

love
jnz

Offline

#60 2011-01-11 14:43:30

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab

jens31 wrote:

“?bot_image_img=delete”
will work (cause it now does). only thing i did, was moving the images from the txp folder into the txp_img folder, cause its a smartass that i is cleaning up all i can..
so i guess you could just remove ‘.hu.‘textpattern/
and it would work, in both, normal installation and multi-site, no??

Thank you for helping Jens but there is still something which is not clear to me:
you said with “?bot_image_img=delete” it works…
Thats cool but then you mention that you moved the images from the txp folder into the txp_img folder (???).
Which images?? Wasn’t all this work aimed at making the plugin work without the need to upload the icons manually???
So here is my last request. Does the plugin generates the images as it should now ? I mean without uploading them?

by the way (cool, that i mention this at the end of our little training, eh?)
why not just use letters instead of images (like x for delete and e for edit).

Because I like to complicate simple things!
Anyway in this case you can simply delete the css which replaces the text and modify the code slightly to replace “edit” with “e” and “delete” with “x”. After all this plugin was meant as a base for further customizations.
If you want to do it and don’t know how just ask.

Offline

Board footer

Powered by FluxBB