Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-05-05 17:15:25

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Adding a “link” attribute to <txp:article_image />

What about adding a “link” attribute to the regular article_image tag please?
What I mean is that right now the article image tag always output a full <img> tag,
and in a lot of cases I only need the url of the image.
so adding an attribute as link=“0/1” will be really good thing to do.

right now I’m using smd_gallery as:
<txp:smd_gallery id=”?article_image”>{url}/{thumburl}</txp:smd_gallery>
which is fine and works good and have a lot of flexibility!
but kind of awkward o_O as it supposed to be a core feature.

Offline

#2 2010-05-05 21:25:14

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Adding a “link” attribute to <txp:article_image />

I tend to use Mary’s upm_image plugin for this with sites using 4.2.0 but Stef has already added new image tags to the SVN (which I would point you at but the site is giving an Error 500 at the moment) so if you can wait until the next release?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2010-05-05 21:56:08

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Re: Adding a “link” attribute to <txp:article_image />

Yes Stuart, Stef did create new image tags.
but they are for images lists, not for the regular use of article-image.
(he is the one who asked me to open this topic here as request, after I posted it before in his new image tags topic)
I will not use any other plugin then smd_gallery because this plugin got the most features of all, but thanks.

Offline

#4 2010-05-05 23:30:16

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Adding a “link” attribute to <txp:article_image />

Ah. Sorry Gil. For some reason I just missed the fact that you were talking about article_image but I would mention that I pointed out Mary’s plugin to Stef re individual and lists of article images as something to look at cuz it deals with them very nicely and Mary’s code is usually pretty efficient. Don’t know if he’s looked into it yet.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2010-05-06 07:26:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: Adding a “link” attribute to <txp:article_image />

thebombsite wrote:

Don’t know if he’s looked into it yet.

I haven’t, sorry. Slack-tastic. But if this notion of a link attribute is widely acceptable then it makes sense to look at article image when this is done and see if there are any other improvements that can be made based on Mary’s uber-useful plugin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2010-05-06 10:05:03

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

Re: Adding a “link” attribute to <txp:article_image />

By the way, if you can improve a little article_image by adding popup and link to full image option when viewing a thumbnail would be great.

Because when i need that feature i must put a code like this to work:

<txp:thumbnail id='<txp:custom_field name="article_image" />' popup="1" />

Cheers

Offline

#7 2010-05-06 10:22:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: Adding a “link” attribute to <txp:article_image />

Dragondz wrote:

improve a little article_image by adding popup and link to full image option when viewing a thumbnail

Although it’s not much consolation right now, the new image_list tag can be used like this:

<txp:image_list>
  <txp:thumbnail popup="1" />
</txp:image_list>

because the image_list tag reads the article_image by default if you don’t specify any filtering options. The advantage here is that if your article_image field contains more than one image, you get a gallery of thumbs. And you save about 14 characters of typing ;-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#8 2010-05-06 14:00:36

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

Re: Adding a “link” attribute to <txp:article_image />

Just for another example that does some of this stuff. hak_article_image handles a number of linking options, full image, popup, to a specific section, category or current page passing the image along through ?p so <txp:image_display /> can handle it.

Also handles forms which would go well with the new image tags.


Shoving is the answer – pusher robot

Offline

Board footer

Powered by FluxBB