Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#181 2007-03-02 16:58:51

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Just noticed something that seems a little odd:

when inserting a thumb into an article’s body and assigning a class attribute in upm_img_popper, I get something like this:

<img src="…" class="left"> which is fine.

However if I want to make that thumb the trigger for a larger popup image, upm_image assigns the class to the surrounding <a> instead and the image loses the style to float it to the left.

I realise I can easily address this in the CSS, but shouldn’t the class always be assigned to the image?

Cheers Martin

Offline

#182 2007-03-31 05:25:32

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_image: More powerful image display

v.0.6

Last edited by Mary (2013-01-24 17:22:24)

Offline

#183 2007-04-05 04:22:28

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [plugin] [ORPHAN] upm_image: More powerful image display

is it possible to specify a list of images with upm_image?

in the help file for that particular tag, it says

wraptag=“value” … The (X)HTML tag to wrap around the image (or the list, if using multiple images).

pretty sure you can’t have multiple images with upm_image …

any suggestions for how to achieve this (without using article images)… specify two or more images, to go in a div that encloses pics & captions, and floated

no probs with the custom forms to do this for one image

Offline

#184 2007-04-05 17:22:35

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_image: More powerful image display

It’s referring to the article image feature. The plugin itself doesn’t otherwise support multiple images, but I plan to support it eventually. I think Robert (wet) has a plugin that is supposed to work in conjunction with mine to do this, though (can’t remember off-hand what it is called).

Offline

#185 2007-04-05 17:24:14

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,428
Website GitHub Mastodon

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Offline

#186 2007-04-06 09:46:21

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [plugin] [ORPHAN] upm_image: More powerful image display

thanks Mary & Robert!

Offline

#187 2007-04-11 21:36:44

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

What does the “Auto-load JavaScript?” option under the extensions tab do?

Offline

#188 2007-04-12 21:47:15

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_image: More powerful image display

That switches off/on plugin JavaScript (powers popup) being inserted into your site.

Offline

#189 2007-04-30 15:10:22

brosevear
Member
From: Toronto, Canada
Registered: 2006-10-06
Posts: 17
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Hi Mary – I finally got around to updating Textpattern/upm_image on my site but now none of the upm_images are displaying. I use your plugin to display thumbnails:

<txp:upm_article_image type="thumbnail" />

I’ve used the general article_image tag in other areas and they’re still working fine. I’m kind of stumped – any idea why this might be happening, or where I should start to troubleshoot first?

Offline

#190 2007-04-30 15:29:14

brosevear
Member
From: Toronto, Canada
Registered: 2006-10-06
Posts: 17
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

brosevear wrote:

Hi Mary – I finally got around to updating Textpattern/upm_image on my site but now none of the upm_images are displaying.

Never mind – problem solved. Although I have no idea why. I hit refresh and they’re all there.

Before I get jumped for being a noob, I was working on this yesterday and refreshing had no effect. I came back to it today and must have hit refresh about 50 times (it relieves stress when I’m stumped). Not sure why it worked this last time. Maybe I hit it from a different angle.

Offline

#191 2007-07-06 17:28:43

danwoodward
Member
From: Brooklyn NY
Registered: 2006-08-06
Posts: 51
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

I’m having some issues with the popup in IE6 and IE7, the popup won’t work, and I’m getting a javascript error of “Object required” any one else have any issues like this. Thanks

- Issue resolved in IE6, I just restarted my computer :-)

However IE7 is still giving me issues, no errors but the popup just plain won’t work. I have both ie6 and 7 running on my pc, ie7 runs as a standalone…maybe this has an effect on something, anyone have anything similar happening in ie7.

Last edited by MR. (2007-07-06 18:45:48)

Offline

#192 2007-07-18 03:08:41

makason
Member
From: Hilo, Hawaii
Registered: 2005-01-23
Posts: 34
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

How can I use the plugin functions to create a popup with title and added margins when using a custom image form?

This is the form with simple pop:

<code>
<div class=“img-right” style=“width:<txp:upm_img_thumb_width />px”>
<a href=“javascript:window.open(‘<txp:upm_img_full_url />’, ‘pop’, ‘name=Image,width=<txp:upm_img_full_width/>,height=<txp:upm_img_full_height/>,scrollbars,no-resizable’)”><img src=”<txp:upm_img_thumb_url />” width=”<txp:upm_img_thumb_width />” height=”<txp:upm_img_thumb_height />” alt=”<txp:upm_img_alt />” /></a><br />
<txp:upm_img_caption /></div>
</code>

Offline

#193 2007-08-06 08:31:22

guiguibonbon
Member
Registered: 2006-02-20
Posts: 296

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Hi Mary. Just thought i’d share this : in order to reduce the number of queries made to the database, i added an image_list tag (with new attribute id_list) to your plugin by adding the following code :

function upm_image_list ($atts, $thing = NULL) {
		$atts = lAtts(array(
			'class'				=> '',
			'form'				=> '',
			'id_list'		=> '',
			'show_width'	=> 'yes',
			'show_height' => 'yes',
			'show_alt'		=> 'yes',
			'show_title'	=> 'yes',
			'type'				=> 'image',
			'url'					=> '',
			'wrapform'			=> '',
			'wraptag'			=> '',
			'offset'			=> '',
			'limit'			=> '',
			'xhtml'				=> 'yes'
		), $atts);
		return upm_article_image_list($atts['id_list'], $atts, $thing);
}

Perhaps this might be worth adding to a new release?

Also, just a quick idea, another way to reduce the number of queries, in case the tag is called more than once on a page, would be to add a global array (images_to_fetch for instance), and to make use of the two textile passes. The tags could fill that array on the first pass but make no query and just return the same tag again with a new attribute (second_pass="true" for instance), in such way that during the second pass, the query is made for all images at once as soon as it comes across that attribute. Edit: stupid me, I forgot about $pretext['secondpass']. So, basically, on the first past, the tag would just return itself and add the id or name to images_to_fetch, on the second pass, at the first occurrence of the tag it would make the query for all images at once, save the result in another global variable, ready for output for the next occurrences of the tag.

Last edited by guiguibonbon (2007-08-06 08:54:32)

Offline

#194 2007-08-07 06:25:21

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Perhaps this might be worth adding to a new release?

The details might differ for internal organizational purposes, but sure. :)

Yes, if you’re calling the same images multiple times on a page, it could marginally benefit from caching the image data, reducing the number of redundant queries.

I don’t think that’s what you meant, but $pretext has nothing to do with Textile; the secondpass refers to the fact that Textpattern tags are parsed for twice, to catch anything not caught the first time ‘round.

I wouldn’t make use of that though, since it is far simpler and less likely to cause bugs by checking for an image in a static variable on first run and either use it or set it if it does not yet exist. Look at how the built-in image and thumbnail functions work, and you’ll see how it’s done.

I can likely work that in as well, it’s just a matter of getting the time to actually work on my own plugins. 8s

Offline

#195 2007-08-07 09:13:57

guiguibonbon
Member
Registered: 2006-02-20
Posts: 296

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Doh. Yes, no, no textile, all that parsing must have confused me. Glad you understood what I meant. And static variables are a thing I never really cared to understand. Glad I do now :)

What I didn’t mean though was the occurrence of one unique image multiple times (which is pretty rare). I was thinking of when an article is illustrated with 20+ different images spread all over. In such case it would make sense to collapse all those queries somehow.

Wet’s plugin is another case of an absurd number of queries. In a perfect world your plugin should be able to use its query data.

Edit : suddenly wondering how it comes safe_row and the like aren’t storing results. And perhaps a fetch_images function would make a useful addition to the core.

Last edited by guiguibonbon (2007-08-07 12:17:34)

Offline

Board footer

Powered by FluxBB