Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[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
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
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
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
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
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
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
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.
Offline
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
Re: [plugin] [ORPHAN] dru_random_image: Random image from image category
Raveoli I’m currently using it in RC3 r344 at the moment though it is within an article as the front-page for my Albums (4 instances of it actually). Having said that I have also used it recently on someone else’s site in a menu form template without problem, though it wasn’t as up-to-date a revision as mine. (somewhere around r250 or so)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#12 2005-05-08 17:22:34
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] dru_random_image: Random image from image category
Raveoli, there’s another plugin, dca_random_image. Don’t know if it will work with rc3 though. I’ve been using it for a while on g1.19.
Offline