Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-04-04 20:25:21

Drew
Plugin Author
From: Red pillar box, Baker St.
Registered: 2004-02-15
Posts: 52
Website

[plugin] [ORPHAN] dru_random_image: Random image from image category

A little like Dean’s random image plugin, except this picks an image from those already uploaded through TXP.

Accepts a single attribute: category. Set this to the name of the image category the images should be picked from. Without specifying, the default behaviour is to pick from all images.

<txp:dru_random_image category="donkies" />

Download dru_random_image.tgz

For some reason, the extended help text isn’t showing up, but it’s no trilling read so don’t sweat it.

Last edited by Drew (2004-04-04 20:26:23)


drew mclellan

Offline

#2 2004-04-06 21:08:34

bjorn
Member
From: sweden
Registered: 2004-02-24
Posts: 10
Website

Re: [plugin] [ORPHAN] dru_random_image: Random image from image category

wow, nice one!

just a question; is it possible to add a “recursive” parameter, so that I can choose a parent category and also get randomisation for its children?

possibly also return the caption and title for the image…

Offline

#3 2004-04-06 21:12:59

Drew
Plugin Author
From: Red pillar box, Baker St.
Registered: 2004-02-15
Posts: 52
Website

Re: [plugin] [ORPHAN] dru_random_image: Random image from image category

Now you’re talkin!

I actually wrote this before the categories were supercharged, but yes I could probably do that.

How would you like the caption and title returned? Would we need to invoke a form of some kind?


drew mclellan

Offline

#4 2004-04-06 21:42:01

bjorn
Member
From: sweden
Registered: 2004-02-24
Posts: 10
Website

Re: [plugin] [ORPHAN] dru_random_image: Random image from image category

:)

well yeah, maybe a form for maximum consistency… don’t really know what the options are right now, txp has been evolving way too fast for me to keep updated, (been too busy at work)

I’m gonna use it like so…

<pre><code>
<img src=”/images/1.jpg” alt=”“ />
<div class=“box”> <h5>Title here</h5> <p> Description text.. <cite> Photographer (manually added… and included in desc) </cite> </p>
</div>
</code></pre>

Offline

#5 2004-04-11 17:19:31

zarprey
Member
From: Minneapolis, MN
Registered: 2004-04-11
Posts: 13
Website

Re: [plugin] [ORPHAN] dru_random_image: Random image from image category

Is there any way to have it display the thumbnail instead of the large version of the image?

Offline

#6 2004-04-11 20:04:36

Drew
Plugin Author
From: Red pillar box, Baker St.
Registered: 2004-02-15
Posts: 52
Website

Re: [plugin] [ORPHAN] dru_random_image: Random image from image category

Not yet. Neither is it table-prefix safe yet (g118). I’ll post an update shortly.


drew mclellan

Offline

#7 2004-04-12 00:38:10

zarprey
Member
From: Minneapolis, MN
Registered: 2004-04-11
Posts: 13
Website

Re: [plugin] [ORPHAN] dru_random_image: Random image from image category

I’ll be looking forward to the update.

Thanks.

Offline

#8 2004-09-16 08:40:13

Roughy
New Member
From: Melbourne
Registered: 2004-07-05
Posts: 7

Re: [plugin] [ORPHAN] dru_random_image: Random image from image category

Hi Drew,

Is there any way I can get this to output not only the image tag but the caption text (that can be entered in the image tab) perhaps in a paragraph tag?

Last edited by Roughy (2004-09-16 08:40:51)

Offline

#9 2004-09-17 17:29:20

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: [plugin] [ORPHAN] dru_random_image: Random image from image category

There is a plugin that already handles random images from a category. it’s been out for a few months and supports outputting all of the content accessible to Txp.

Look Here

Offline

#10 2005-05-08 12:29:22

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: [plugin] [ORPHAN] dru_random_image: Random image from image category

I cannot make this plugin work with rc3. It has worked fine for me on other sites based on older TXP installs.

Is there any way to make it work?

PS: Manfre wrote a similar plugin, but I cannot find the download on his page, and this (Drew’s) plugin does exactly what I wan’t – no more, no less – a clean, nice plugin.

Any hope? Or has the feature been included in the TXP core?

Offline

Board footer

Powered by FluxBB