Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2005-06-21 21:37:50

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: [plugin] [ORPHAN] zem_article_image

This doesn’t work if you have TXP installed in a sub-folder. This plugin uses a relative img src for the thumbnail, such as ‘/images/2t.gif’, which can cause problems.

I hacked it to work with the latest TXP Rc3 by changing this line (both occurances):

(ignore square brackets, BBCode isn’t on)

$out[]= “[img src=\”{$pfr}{$img_dir}/{$id}{$ext}\”“. “ alt=\”{$alt}\”“.”/]”;

I had to add the doman name and TXP install folder (http://www.mysite.com/tp/):

$out[]= “[img src=\“http://www.mysite.com/tp/{$pfr}{$img_dir}/{$id}{$ext}\”“.” alt=\”{$alt}\”“.”/]”;

Last edited by BlueMamba (2005-06-21 21:39:54)

Offline

#17 2005-06-29 15:54:16

RSL
Member
From: Decatur, GA
Registered: 2005-06-14
Posts: 15
Website

Re: [plugin] [ORPHAN] zem_article_image

zem, I hope you don’t mind but I made a minor modification to your plugin. I think it’s a rather useful one myself. I added the title attribute [which technically just mirrors the alt text]. I just added

“ title=\”{$alt}\”“. // RSL

after the line with the alt text in it. I added my name in the comment just to remember what I’ve markupped. Maybe other people don’t like using the title attribute but I’m nigh neurotic about it. :)

Offline

#18 2005-07-29 13:16:41

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

Re: [plugin] [ORPHAN] zem_article_image

zem_article_image ain’t working for me on RC4 [662]

should it be?

and would multiple article images be a feature considered by the developers?

Offline

#19 2005-07-29 17:52:32

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] zem_article_image

It’s working for me in rev 665.

Offline

#20 2005-07-30 06:26:00

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

Re: [plugin] [ORPHAN] zem_article_image

thanks doggiez – at least I know it should it work now

in my article form: <code><txp:zem_article_image /></code>
in my article – advanced options / article image: <code>5, 6, 7</code>

plugin is 0.1 – turned on

there are images with IDs of 5, 6 and 7

I’ve turned off every other plugin

I’m doing something kooky, somewhere

Offline

#21 2005-07-30 09:02:33

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] zem_article_image

I’m not using the multiple image option at the moment, but as far as I know <code><txp:zem_article_image /></code> outputs only the first image, if you want more use <code><txp:zem_article_image limit=“n” /></code>.

Offline

#22 2005-07-30 09:35:09

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

Re: [plugin] [ORPHAN] zem_article_image

yep, tried that too, but not outputting 1 or multiple images

Offline

#23 2005-07-30 09:51:41

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] zem_article_image

I just gave it a try and multiple images is working for me.

Article images: 29,3,4

In my form:
<code><txp:zem_article_image limit=“3” /></code><br />

All three of them are returned.

Offline

#24 2005-07-31 01:02:41

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

Re: [plugin] [ORPHAN] zem_article_image

nardo: try removing the spaces between each; 5,6,7 instead of 5, 6, 7. By the way: your request regarding this plugin and upm_img_popper shall be granted shortly. :)

Offline

#25 2005-07-31 01:21:59

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

Re: [plugin] [ORPHAN] zem_article_image

okay, so I think this post explains why zem_article_image ain’t working in my scenario -> paths (I’m in a subfolder localhost/testsite/ )

maybe BlueMamba’s fix (scroll up) does the trick, but my attempt to modify the plugin code was unsuccessful – I wonder if zem would consider adding his functionality to the default article_image tag?

and Mary, that’s great to hear

+ + +

reason for interest: a number of contributors on this development site – which means providing instruction on usage… and I would like to have a clear and simple distinction between

  • adding one or multiple images for an ‘article gallery’ (!important)
  • inserting a pic into a more textual post (using Mary’s class to default to a floated left img)

also gives me opportunity to style these differently – i.e. important images are displayed with captions, etc – images inserted into flow just get a title attribute to add meaning / show provenance

Offline

#26 2005-07-31 15:17:22

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: [plugin] [ORPHAN] zem_article_image

Hello zem, I dunno why but your plugin works on ly in messy mode.
with clean mode url it is not able to parse a proper path.
I’m using now rc4, but I had that problem with rc3 too…
anybody else?

thank you!


what was that again…?

Offline

#27 2006-10-26 15:00:28

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

Re: [plugin] [ORPHAN] zem_article_image

Has anyone a clue how to edit this to not barf if there is no article image? I have tried some various conditionals but none seem to be working in conjunction with this. I tried chh_if_data, tcm_if_article_image, and a few others that I cant remember at the moment. I would like to test if there is an article image and if there is then- output zem article_image_thimb and if not then disregard zem_article_image_tag. Any thoughts out there?

Offline

#28 2006-10-26 15:09:17

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

Re: [plugin] [ORPHAN] zem_article_image

Disregard my last post, instead of hacking on this I forgot about Patricks plugin hak_article_image that is working fine for me without conditionals and will pass a “rel’ attribute.

Offline

Board footer

Powered by FluxBB