Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-03 22:41:59

EddieG5
Member
From: Georgia
Registered: 2004-03-03
Posts: 96

upm_img_popper

I’ve upgraded to the latest TXP and am having trouble with Mary’s plugin … I had the .64 version, which I know is sorely out of date. I downloaded the plugin files she just posted, but can’t figure out how to install the plugin. Copying the code from upm_img_popper.php and pasting into the plugin area in Admin posts and error. Has anyone had luck installing?

Offline

#2 2006-01-03 23:34:00

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: upm_img_popper

The code for the plugins that Mary posted is not compiled.

It seems that she really is gone unfortunately. All the plugins have been pulled from her site and the plugins are noted as abandoned in the resources site.

I posted a compiled version of 0.10 which was the last version she released.

I’d be willing to take over this plugin if no one else objects since a lot of the image tag work she implemented I wanted to do anyway, but Mary beat me to it in her super human speediness.

Last edited by hakjoon (2006-01-03 23:36:21)


Shoving is the answer – pusher robot

Offline

#3 2006-01-04 05:06:18

EddieG5
Member
From: Georgia
Registered: 2004-03-03
Posts: 96

Re: upm_img_popper

Thanks, hakjoon.

It is unfortunate that Mary has left us … still not sure what happened to cause her departure. At any rate, I think it would be great if you’d be willing to take over this plugin and am sure the rest of the community would as well.

Offline

#4 2006-01-04 05:35:55

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: upm_img_popper

Indeed, that would be nice Hakjoon.

Offline

#5 2006-01-05 22:25:01

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: upm_img_popper

Thanks for taking over the plugin.

Offline

#6 2006-01-12 03:49:45

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: upm_img_popper

I am having major problems with this on a site since updating to 4.03. The bigest one is that it does not show up at all ;0 any ideas Patrick?

The only js error I see so far is:

Error: p.firstChild has no properties
Source File: http://bllb.com/textpattern/index.php?event=upm_img_popper&js=link_js
Line: 66

Thanks!

Last edited by soulship (2006-01-12 03:50:21)

Offline

#7 2006-01-12 13:25:48

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: upm_img_popper

Are you running any other plugins that create links in the left hand column the way img_popper does? It seems like something changing the DOM for the page so that the script can’t figure out where to place the link. The admin panels could be made a lot easier to work with if they had more ID’s there is a lot of DOM traversal gymnastics that needs to happen now that is very prone to breakage.

The plugin is working fine on a write tab with no other plugins running for me. Let me know what you find. Also if youa re running anothe rplugin that is causing this let me know so I can try to make them co-exist.

Last edited by hakjoon (2006-01-12 13:25:56)


Shoving is the answer – pusher robot

Offline

#8 2006-01-12 14:46:59

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: upm_img_popper

Well patrick I was trying to get quick tags and img popper to play together most of the evening and now I’m turned around. It seems that now even with everything else disabled it won’t show at all. The DOM hooks are definitely lacking here. I pulled out your tiny mce and tried to get the imge funtion there working as well to no avail :( . Not super crazy about the markup anyway. So I am back to square 1. I am not sure where the conflict is comoing from at this point. The bas_img something or other plug works and shows in the left collumn fine, and I may have to hard wire that to output an img class for now, just to get me through. I know it’s off topic, but have you seen any compatibility issues with ff1.5 and some of our js DOM capturing plugins? I noticed last night that the mce sometimes works fine and sometimes assembles itself in the bottom left of the window completely outside of the text area. Only in ff 1.5? Strange but true. I may be having a bad plugin week :)

Offline

#9 2006-01-12 15:03:04

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: upm_img_popper

Hmmm that’s so weird. I have quicktags and img_popper working happilly together on 4.03.

I can’t imagine what could cause it to not show up at all if the Write tab is in it’s original state. I might try to retrofit this part of Mary’s code as it’s pretty fragile.

There is a newer version of tinyMCE (2.0.1) then the one in my zip if you want to try that, all the custom stuff I have done is in the ibrowser folder under plugins, the rest is all stock so it’s pretty easy to replace. Although I know what you mean about the markup I use quicktags personally.

If you want to post the source of the write tab when the plugin is failing somewhere I can take a look see if I see anything odd that’s happening. That’s helped me narrow down some pretty odd quirks in the past.


Shoving is the answer – pusher robot

Offline

#10 2006-01-18 07:50:57

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: upm_img_popper

hakjoon,

Something I wonder if you or someone could provide a better explanation for other developers. Mary had ability to insert a link into the articles tab, but upon looking at the code I’m completely confused at how she accomplished this. I would really appreciate a better understanding around this.

Thanks!

Offline

#11 2006-01-18 13:16:36

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: upm_img_popper

Do you mean how she inserted the code in the article textarea or how she inserted the link for the image popper itself?


Shoving is the answer – pusher robot

Offline

#12 2006-01-18 14:04:11

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: upm_img_popper

I’m looking to understand how she inserted the link for the image popper itself.

Offline

#13 2006-01-18 14:35:35

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: upm_img_popper

It’s basically just done by traversing the DOM and creating a link element where you want it to be. The admin interface doesn’t have a lot of DOM of elements with IDs so it makes it a little harder then it needs to be. Currently img_popper uses a fairly frail system to place the link that will break if the admin interface changes. I’m working on an update that is a little more foolproof, but it’s still not as easy as it could be.

So basically you
  1. Create the link using createElement
  2. Then you create and set the attributes the way you want them to be using setAttribute
  3. Basically then you need to insert it somwhere. For img_popper I find the ID for “Advanced Options” using getElementByID and then get the parent using parentNode. Since the Advanced DIV has a Paragraph before it with the link that activates you get that using previousSibling
  4. You can then insert the link in using insertBefore

The basic code looks like
<pre>
<code>
//create the link
var link = document.createElement(‘a’);
link.setAttribute(‘href’, ‘/where/to/link/to/’);

//place it

var node = document.getElementById(‘advanced’);
node.parentNode.insertBefore(link, node.previousSibling);
</code>
</pre>

And that should do it. DOM inspector is your friend for this sort of stuff. “Advanced options” is good because I think it’s always there no matter what preferences you have set (actually I should double check that).

Let me know if that makes sense otherwise I can write a more detailed example. I might move this into textbook if it makes sense.


Shoving is the answer – pusher robot

Offline

#14 2006-03-19 11:20:08

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: upm_img_popper

Hi

I’m just thinking of a new feature for this lovely plugin. Sometimes, I’d like to use an image as link. So, it would be great to use links in the customized templates.

I’m thinking of an optional tag, e.g.

<code><txp:upm_image image_id=“1062” form=“cartoon” link=“http://www.textpattern.org”/></code>

In the template, you can put the link whereever you want, unless you specify this option. If the link is not given, no a-tag will be produced.

What do you think?

Cheers, Matthias

Offline

#15 2006-03-19 19:35:54

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: upm_img_popper

Is this something that cannot be accomplished with the url attribute?


Shoving is the answer – pusher robot

Offline

Board footer

Powered by FluxBB