Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#451 2005-11-20 00:44:23
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: upm_img_popper
0.9.7
Offline
#452 2005-11-23 20:41:36
- redpen
- Member
- From: Maine USA
- Registered: 2005-11-01
- Posts: 24
Re: upm_img_popper
New install of 0.9.7 on 4.0.2…
When I try to preview image, alt, or caption, I get invalid argument error on line 50 char 2 of ../index.php?event=upm_img_popper&bm=true#
Am I alone?
This was with IE6 on WinXP.
Firefox 1.0 is okay for preview popups.
Last edited by redpen (2005-11-23 20:55:30)
Offline
#453 2005-11-23 21:40:11
Re: upm_img_popper
Confirmed, same here. WinXP SP2, IE 6. Everything cosy with FF 1.0.7.
Too sad you can’t force your clients to use a proper browser…
Online
#454 2005-11-28 23:09:25
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: upm_img_popper
This is maddening. Same browser and platform. I don’t get any errors or warnings, but I don’t get the popups either. Firefox and Opera are fine. I searched and searched, can’t find anything on it via Google.
If I can’t find anything, or someone else can’t figure it out, IE users will have to live with the fact that their browser is extremely outdated, insecure, broken and should be buried. I wish it were otherwise, but there’s nothing else I can do at this point.
Offline
#455 2005-12-01 21:58:47
- andersms
- New Member
- Registered: 2005-09-20
- Posts: 7
Re: upm_img_popper
Disclaimers: New to TxP, using version 4.0.2 (r1076).
It seems that the caption does not pass to the <img...title="blabidy" /> correctly when using the “popup” type, with <txp:upm_image /> or <txp:upm_article_image />. It works properly when using thumb.
Case study here (image at the top of the article is a “popup”, image at the bottom is a “thumb”).
Offline
#456 2005-12-02 12:52:13
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: upm_img_popper
Are you using the latest available version of the plugin?
Offline
#457 2005-12-03 14:06:34
- andersms
- New Member
- Registered: 2005-09-20
- Posts: 7
Re: upm_img_popper
I assume so, I downloaded and installed in Wednesday from this thread.
EDIT: further clarification
Last edited by andersms (2005-12-03 14:07:07)
Offline
#458 2005-12-09 09:57:19
- estelle
- New Member
- Registered: 2005-10-06
- Posts: 4
Re: upm_img_popper
Hi,
I’m sorry but I am a total newbie at textpattern. All i am trying to do is insert a thumbnail into an article and have it link to the fullsize image.
I have installed this plugin but I do not have a new link above “Textile Help” when I am in Content -> Write.
Can anyone provide me with clues as to what I have missed? I can setup a new admin account if necessary…
Thanks heaps,
Estelle.
Offline
#459 2005-12-09 10:02:49
- estelle
- New Member
- Registered: 2005-10-06
- Posts: 4
Re: upm_img_popper
Okay, just found a post somewhere else that said i have to activate it…. (Such a newbie i am!!)
Offline
#460 2005-12-09 16:49:42
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: upm_img_popper
andersms: I knew I was forgetting something, sorry ‘bout that.
I just re-read your post. When the image is a popup, the caption is added as a title attribute to the a(nchor) tag. So, if that’s what you’re getting, that’s what it has been written to do. Otherwise, if you’re still having problems, please let me know. I’ll try and be quicker to answer, I promise. :)
That said, I’m finding a couple more bugs in the plugin, which I’m fixing right now and will be posting an update shortly.
Last edited by Mary (2005-12-09 16:49:54)
Offline
#461 2005-12-12 06:24:36
Re: upm_img_popper
Mary,
I’ve finally equipped myself with a copy of Microsofts Script Debugger and hunted down the cause for those string constant not delimited properly errors in IE while inserting an image in the “content > write” tab.
Basically, this happens when an image’s title or alternative text contains a quote. The image chooser then contains markup like that:
[...]
<li><a href="#" onclick="return insertTag('custom', '33');">custom</a></li>
<li><a href="#" onclick="return insertTag('xhtml', '33', '.jpg', '100', '160',
'alttext with "quotes" and <brackets>', 'caption with "quotes" and <brackets>');">XHTML</a></li>
[...]
<a href="#" onclick="return makeWin('Alternate text for “a-sample.jpg”',
'alttext with "quotes" and <brackets>');">Alt text</a></li>
<li><a href="#" onclick="return makeWin('Caption for “a-sample.jpg”',
'caption with "quotes" and <brackets>');">Caption</a></li>
Would you kindly escape quotes (and brackets, just in case) before you build the image chooser? escape_title() might suit perfectly, but requires 4.0.2.
Thank you.
Robert
Last edited by wet (2005-12-12 06:26:43)
Online
#462 2005-12-12 15:02:20
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: upm_img_popper
Posted source is definitely more helpful. I thought the image preview popup also had problems?
Offline
#463 2005-12-12 15:43:40
Re: upm_img_popper
No script errors on the public side by now. These would occur only with poups, wouldnt’ they? Maybe you are referring my quote from this post:
Two remarks regarding the admin side:
[…]
2. My installation of IE6/WinXP throws two JS error indications claiming that string constants are not closeed properly.
Both appear after the controls (Search, include width, include height, include alt text, include caption, assign class, Custom form) are painted but before the actual image list is drawn.
Online
#464 2005-12-12 16:02:40
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: upm_img_popper
No, I do mean admin-side still. redpen said: “When I try to preview image, alt, or caption…” So I’m wondering if the preview image was just mentioned because it only appeared all the popups weren’t working, or if that is still an issue.
I still can’t get the previews at all in IE. I need a “tearing-out-my-hair” smilie.
Offline
#465 2005-12-12 17:30:43
Re: upm_img_popper
Sorry, I obviously was in “post-before-read” mode.
When clicking on the admin side “preview > image”, the script halts on this line (quote this post for real code):
var fastWin = window.open('', 'upm-img-preview', 'top = '+t+', left = '+l+', width = '+ww+', height = '+wh+', toolbar = no, location = no, directories = no, status = yes, menubar = no, scrollbars = yes, copyhistory = no, resizable = yes');
Error message is:
Error: 49. Invalid argument.
MSDN says this:
sName Optional. String that specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an a element.
_blank The sURL is loaded into a new, unnamed window.
_media The sURL is loaded into the HTML content area of the Media Bar. Available in Internet Explorer 6 or later.
[…]
And they also say this on window.name:
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5.
That given, I think Internet Explorer tries to evaluate ‘upm minus img minus preview’, which fails. Netscape defines the range of valid characters for windowName. They say:
windowName can contain only alphanumeric or underscore (_) characters.
No arithmetic symbols.
This fails:
javascript:window.open('','upm-img-preview', 'top = 445,left = 650,width = 100,height = 160,toolbar = no,location = no,directories = no,status = yes,menubar = no,scrollbars = yes,copyhistory = no,resizable = yes');
while this succeeds:
javascript:window.open('','_blank', 'top = 445,left = 650,width = 100,height = 160,toolbar = no,location = no,directories = no,status = yes,menubar = no,scrollbars = yes,copyhistory = no,resizable = yes');
So I’ve made these changes to your script and had a working plugin for both FF and IE:
line #452: var fastWin = window.open('', '_blank', 'top = '+t+', left = '+l+', width = '+ww+', height = '+wh+', toolbar = no, location = no, directories = no, status = yes, menubar = no, scrollbars = yes, copyhistory = no, resizable = yes');
line #1068: $insert .= n.'<li><a href="#" onclick="return insertTag(\'xhtml\', '.chr(39).$id.chr(39).', '.chr(39).$ext.chr(39).', '.chr(39).$w.chr(39).', '.chr(39).$h.chr(39).', '.chr(39).htmlentities($alt).chr(39).', '.chr(39).htmlentities($caption).chr(39).');">XHTML</a></li>';
line #1078: $preview .= n.'<a href="#" onclick="return makeWin('.chr(39).upm_img_popper_gTxt('alt_text_for').sp.'“'.$name.'”'.chr(39).', '.chr(39).htmlentities($alt).chr(39).');">'.gTxt('alt_text').'</a></li>';
line #1083: $preview .= n.'<li><a href="#" onclick="return makeWin('.chr(39).upm_img_popper_gTxt('caption_for').sp.'“'.$name.'”'.chr(39).', '.chr(39).htmlentities($caption).chr(39).');">'.gTxt('caption').'</a></li>';
// god I hate javascript in php
How true…
You might give it a spin as I just hit the spots which obviously broke into the script debugger and do not know anything else about the inner workings of your marvellous plugin’s other segments which weren’t covered by this quick & dirty fix.
It found htmlentities() to be suitable for escaping quotes and brackets. I have not checked with non-latin characters, though.
cheers, Robert
Last edited by wet (2005-12-12 19:53:33)
Online