Textpattern Forum

You are not logged in. Register | Login | Help

#11 2010-06-04 06:48:08

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 485

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

On my site I have a js.gallery which loads different images called by image ID separated by a comma.
I’ve tried your latest plugin and I’ve got this:

Errore nel caricare il plug-in: bot_image_upload -> User_Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’71,77,73,75,76’ at line 1
select ext from txp_image where id = 72,71,77,73,75,76 on line 85

may bot_image_upload not support this method?

BTW: bot_show_image should be turned off when you install bot_image_upload or can they live together?

Last edited by candyman (2010-06-04 06:53:29)

Offline

#12 2010-06-04 11:03:45

sacripant
Plugin Author
From: Dakar – Sénégal – Africa
Registered: 2008-06-01
Posts: 358
Website

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

Hello, sorry for my bad english

Thanks for your plugin. It’s a good ergonomy.

In my locale install, I have no checkbox .add.

In your code, you add checkbox after "td:nth-child(9)" but in my table I’m only 7 nth-child.
For the checkbox I need to change the code : iframe.find("#list td:nth-child(7)") at line 125.

And I can’t checked multiple checkbox for add multiples images ID to the image field.

Offline

#13 2010-06-04 12:21:52

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

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

candyman wrote:

On my site I have a js.gallery which loads different images called by image ID separated by a comma.

sacripant wrote:

…And I can’t checked multiple checkbox for add multiples images ID to the image field.

As I wrote in the first post this plugin works only with the standard txp behaviour i.e. one article image per article.
It doesen’t work with multiple images.
Maybe in the future I’ll add this capability but this involves a serious rewrite and more code = more page weight so I got to plan it well to keep as small as possible.

.. BTW: bot_show_image should be turned off when you install bot_image_upload or can they live together?

No, they can’t live togheter, bot_image_upload incorporates bot_show_image.

….In your code, you add checkbox after “td:nth-child(9)” but in my table I’m only 7 nth-child.
For the checkbox I need to change the code : iframe.find(“#list td:nth-child(7)”) at line 125.

Are you using a txp version pre 4.8? Again – as I wrote in the first post this plugin is compatible with txp 4.08 +

Last edited by redbot (2010-06-04 14:13:58)

Offline

#14 2010-06-04 13:10:39

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

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

Version 0.2 is compatible with remora and has some minor fixes

aswihart wrote:

…Noticing that only the most recently uploaded pics will display immediately on the Write tab after being added with the plugin. Other pics are hidden, and it looks like this.

Ok, thank you. This clearly shows there is a problem with the path to the images dir. And this explains also the login problem.
Sadly I can’t understand where the issue is originating. I have installed it in many txp sites (either in local than live) and I can’t experience the problem.
It seems to be the same issue that iam_image_uploader had until version 0.6c but I can’t gather a hint examining its code… mmmh..

Offline

#15 2010-06-04 14:13:04

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

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

Hey aswihart,
can you test please if this change solves the login problem?

Replace this line (around line 32)

$bot_iframe_url = hu.'textpattern/index.php?event=image';

with this:

$bot_iframe_url = 'index.php?event=image';

Thank you

Offline

#16 2010-06-04 16:12:53

sacripant
Plugin Author
From: Dakar – Sénégal – Africa
Registered: 2008-06-01
Posts: 358
Website

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

As I wrote in the first post this plugin works only with the standard txp behaviour i.e. one article image per article.

Ok, sorry, I’m a bad reader.
By default, checkbox is used for multiple choice, radio for unique choice.

Are you using a txp version pre 4.8? Again – as I wrote in the first post this plugin is compatible with txp 4.08 +

Very strange, it’s a clean install of Txp 4.2.

———————————————
Modif 17h15

In my Txp 4.2,
A tr on textpattern/?event=image image includes 8 td :

0 ID
1 Modify
2 Date
3 Name
4 Thumbnail
5 tags
6 Catégory
7 Checkbox

I don’t understand :(

Last edited by sacripant (2010-06-04 16:31:31)

Offline

#17 2010-06-04 18:50:05

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

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

sacripant wrote:

…Ok, sorry, I’m a bad reader.

Hey no prob, sorry if I it seemed a harsh answer.

.. By default, checkbox is used for multiple choice, radio for unique choice.

Fair enough. The fact is when I was writing it I was in doubt if it should accept more choiches or not. I’ll see if it’s the case to change it in the next release.

.. 0 ID
1 Modify
2 Date
3 Name
4 Thumbnail
5 tags
6 Catégory
7 Checkbox
I don’t understand :(

Don’t you have an “author” column after ‘category’??
Furthermore the first column is 1, not 0 and, as for the last column, the plugin hides the original checkboxes (column 9) and adds a column with the ones generated by the plugin (column 10).

Last edited by redbot (2010-06-04 18:51:51)

Offline

#18 2010-06-04 19:15:28

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

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

redbot wrote:

can you test please if this change solves the login problem?

I haven’t gotten it since updating that line, I will let you know but the login problem seems to be fixed.

Also, not sure if that update affected the thumbnail display issue or not, but it may have helped as I’m having zero issues now if I’m logged in as a Publisher.

The issue persists though if I’m logged in as a “Staff Writer” rather than Publisher and trying to add images uploaded by another user. Is that the way Textpattern works (can’t use other authors’ images in your article)? Either way, the image again displays normally after saving an article that references an image uploaded by another user.

Thanks for the rapid updates!

Last edited by aswihart (2010-06-04 19:21:20)

Offline

#19 2010-06-04 20:11:38

Gocom
Developer
Registered: 2006-07-14
Posts: 4,473
Website

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

Nice plugin redbot, nice indeed :-)

Because I don’t know good contact method to you, redbot, (i suspect your email in your forum profile is a web trap), I will throw this here.

I did small changes to the source, patches I think (goes bit out of the “patch” scope tho). If you like you could look at them redbot.

Download links: Normal plugin file | Compressed

I did remove the help file and such, so that no one starts to credit me of nothing I didn’t create. The downloads are intended to (you) Redbot, not really to public use. They do work tho, and even come with the images that were in the original zip file. I did add following changes:

  • Fixed SQL injections.
  • Moved the CSS to stylesheets (<style> block).
  • Moved Javascript, and CSS, into <head> section.
  • Embedded images to the plugin’s PHP (base64_encoded).
  • Removed escaping from the JavaScript (PHP doesn’t parse invalid variables).
  • Add PHP support for multiple images. It nolonger throws out an error. Tho, I didn’t update the JS to work with multiple images.
  • Checks if the image has thumbnail. If not, shows the full sized image (only PHP).
  • Removed globals that were set in every context.
  • Centralized preference variables.

I did also accidently remove the comments, and indetation changed too. Also the long line are no longer long. Long rows are cut over multiple rows. The theme issues and undefined thumbnail, I didn’t fix.

The thumbnail issue can be fixed by checking if the JS gets anything and if not, change the URL to the full image url. Currently it throws out undefined var notice. Theme support could be improving by hiding everything else than the the form['name="longform"']. Downside is that wildcard searches with find() are slower.

Last edited by Gocom (2010-06-04 20:17:05)


Rah-plugins | What? I’m a little confused… again :-) <txp:is_god />

Offline

#20 2010-06-05 11:43:18

sacripant
Plugin Author
From: Dakar – Sénégal – Africa
Registered: 2008-06-01
Posts: 358
Website

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

Don’t you have an “author” column after ‘category’??

I looked, and

If ( "My Txp install" has "only admin author")
   { "TR images table" has "8 TD" (no 'author' column) }
else ("My Txp install" has "more than 1 authors")
   { "TR images table" has "9 TD" ( + 'author' column) }

Offline

Board footer

Powered by FluxBB