Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-18 20:10:08

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Multiple article images? / v. 4.0.5

Hello, was searching forums and Textbook extensively, but could not find info on:

How can i use multiple article images with one article? How ould i be able to use these in conjunction with the upm_image plugin?

Do i need to insert IDs of multiple article images in the one field :: comma-separated?
Given that this would work, how exactly do i use the multiple IDs in conjunction with the txp:article_image tag? How i get to display all of the specified images? And how would i do that, if i want to display a caption for each of thos specified images (in conjunction with up_image i suppose) ???

The general idea:
I am trying to display multiple images associated to an article next to its bodytext, displaying one single image at a time, with caption and with sequencially numbered links to subsequent images associated below (1/ 2/ 3/ etc.)

Any help or pointer into the right direction appreciated!


A hole turned upside down is a dome, when there’s also gravity.

Offline

#2 2007-12-18 21:04:31

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Multiple article images? / v. 4.0.5

Is hak_article_image any good for you?


BB6 Band My band
Gud One My blog

Offline

#3 2007-12-18 21:05:23

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Multiple article images? / v. 4.0.5

use plugin hak_article_image – it handles comma-separated list of images’ ids in article image field


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#4 2007-12-19 02:23:44

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: Multiple article images? / v. 4.0.5

i tried hak_article_image, now. Finally this post explains, that currently there is NO way to create a list of indices yet, which would point to each of multiple article images.
I also tried rewriting the plugin code, but now hang in somewhere now.
Hmm. Thanx for your suggestions in any case

Last edited by jayrope (2007-12-19 05:15:26)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#5 2007-12-19 04:49:16

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: Multiple article images? / v. 4.0.5

With the help of hak_article_image and some additional PHP here’s a
Solution to display multiple article images, one at a time to be selected from list of indexes

Preface: Multiple article image IDs appear comma-separated in the article_image field in CONTENT->WRITE.

Way to go then:
In your article form use code
<txp:hak_article_image urloverride="1" limit="1" /><p><txp:hak_article_image urloverride="1" limit="1" form="image_caption" /></p><p><txp:hak_article_image form="ordered_links" break=" / " /></p>

In form “image_caption” (type misc) use code
<txp:hak_image_caption />

In form “ordered_links” (type misc) use code
<txp:hak_article_image_link type="page"> <txp:php>global $imgndx;$imgndx +=1;echo $imgndx;</txp:php></txp:hak_article_image_link>

Style as desired with additional css.

Hope that helps anyone.


A hole turned upside down is a dome, when there’s also gravity.

Offline

Board footer

Powered by FluxBB