g2image select does not work - functions.js - obj.wpg2_tag_size.value

evilzenscientist

Joined: 2006-11-22
Posts: 29
Posted: Fri, 2007-09-28 23:03

Latest from svn.

'Press button to insert checked image' does not insert wpg2 tag into the post body.

'Insert a WPG2 tag for the current album' works fine.

Any ideas? If not I'll start taking the plugin to pieces.

 
evilzenscientist

Joined: 2006-11-22
Posts: 29
Posted: Fri, 2007-09-28 23:19

capt_kirk

something is broken in functions.js; I commented out anything that was refering to the obj.wpg2_tag_size.value - and got things working:

if(window.tinyMCE) {
htmlCode += '<img src="' + thumbnail_src[i]
+ '" alt="' + image_id[i];
/* if (obj.wpg2_tag_size.value)
htmlCode += '|' + obj.wpg2_tag_size.value; */
htmlCode += '" title="' + image_id[i];
/* if (obj.wpg2_tag_size.value)
htmlCode += '|' + obj.wpg2_tag_size.value;
*/ htmlCode += '" ' + thumbw[i] + thumbh[i]

Nice code btw - comments and structure helped me no end this past few days.

Don't know if I've found a loose end that's not plumbed in elsewhere - but right now this is working for me.

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Sun, 2007-09-30 03:12

Sorry. I can't recreate this problem on my dev box, www.wpg2next.com, or http://demo.steffensenfamily.com/wordpress. (The demo page is not running the very latest SVN. I need to update it. But all of the code around WPG2 tag generation is the same as in SVN.) My primary testing mode is in "WPG2 tag of image." Once I get it working, I get all the other modes working.

Are you getting the "WPG2 tag "size" attribute (Leave blank for the default size of: 150px)" text box under Insertion Options when you have "WPG2 tag of image" selected?

If you are getting that box, does it make any difference if you enter a number?

Does it do the same thing in Code view?

What browser are you using?

Thanks,
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
evilzenscientist

Joined: 2006-11-22
Posts: 29
Posted: Mon, 2007-10-01 06:22

Kirk

Firefox and IE - both failed with the same javascript problems.

I don't get the 'size' attribute text either.

It's from the last but one svn update.

Screenshot of g2image attached.

I don't write code!| www.evilzenscientist.com | www.gonetoutah.com |

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Mon, 2007-10-01 10:24

Ahh, I think I figured it out. I think you're running an old version of the Gallery2 Imageblock module. g2image checks to see if you're running Imageblock version 1.0.9 or greater and then it displays the image size text box. Would you check your Imageblock version under Gallery2 -> Site Admin -> Plugins?

(I need to add a check either for that version number in WPG2 or to skip the size attribute if not present in G2Image. Here is the bug report I created for this.)

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
evilzenscientist

Joined: 2006-11-22
Posts: 29
Posted: Mon, 2007-10-01 14:35

That's better!

I'll go back and remove the commented lines and see if it fixes the problem.

Dontcha love these ones.

I don't write code!| www.evilzenscientist.com | www.gonetoutah.com |

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Mon, 2007-10-01 15:50

Thanks. I'm glad that was it.

In SVN, I've added an ImageBlock version check to WPG2 validation and added hidden and empty wpg2_tag_size and drupal_exactsize inputs to avoid the javascript errors. We'll wait a week or so to see what other bugs pop up as a wider base tries WPG2 3.0 and then will release a 3.0.1 update.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website