Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: mem_randimg: Random Image from category
nipponzine, Clean urls shouldn’t affect this plugin.
roughy, txp:mem_randimg is the plugin tag, which is used as a place holder in a page or form. This tag should be specified with the form attribute, which tells the plugin to load the form and parse it for plugin data replacement tags. These tags are substituted for the meta data associated with the randomly chosen image; title, description, size, link, etc.
Offline
Re: mem_randimg: Random Image from category
Thanks for your explanation, Manfre.
Finaly I found out how to deal with plugins. I did exactly same way as trailgirl wrote.
Offline
Re: mem_randimg: Random Image from category
Hey! This plugin was a breeze to install. In fact, I (a complete green-horn to all this technical whizz) managed to tweak it a wee bit, to output the image id! I simply added <code>$out = str_replace(“<txp:mem_img_id />”, $id, $out);</code> to it. Heh, I did so, in order to “connect” the generated thumb-nail to its parent image in the gallery. created by Justin Palmer’s cgd_dynagallery.
Thanks for creating something so user-friendly, and educational!
Offline
Re: mem_randimg: Random Image from category
I’m glad that I could help. I will also add that tag to the next version of the plugin.
Offline
Re: mem_randimg: Random Image from category
I just cannot find the download link from your site manfre. Is it possible to post a direct link to your plugin from this forum. From all the random image txp plugins in here yours sounds like it will be the most interesting and i would love to try it out
Last edited by colak (2005-05-25 09:09:26)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: mem_randimg: Random Image from category
Hi, I started using this nice plug-in
I dont know if this is a dummy request, but I would like to add an attribute to the < txp:randimg > tag.
The attribute should be something like “style”, or more specific “float”.
So, with an “style” attribute, you can pass and add a simple css style inline to the random image.
You may ask: “hey, why dont you add that directly in the form you use or in your stylesheet?”.
Yes, this is a possible, but I just want to improve the plug-in.
The true is that is want to float some images to left and some to right, and I dont want to create multiple forms to float left or right.
And I use to add the float property inside the img tag (i mean, inline).
Did I explain myself?
is this a dummy/lazy request?
Offline
#19 2005-07-30 17:58:00
- Boogenstein
- Member
- From: Wausau, Wisconsin, USA.
- Registered: 2004-03-28
- Posts: 56
Re: mem_randimg: Random Image from category
Manfre, I once asked this question with respect to another plugin and with all the changes of late thought I would ask here.
Could a way be found to use this with background images in the CSS within TXP? Currently by random background images live outside of TXP and the CSS calls them using a php file like this:
background-image: url(../weblog/random/rotate.php);
It works real well so I am not overly concerned, just wondering.
Last edited by Boogenstein (2005-07-30 18:18:30)
“Keep a straight face and you’ll be laughing!”
Offline
Re: mem_randimg: Random Image from category
I think this plug-in needs a small update for recent 4.01 changes:
http://forum.textpattern.com/viewtopic.php?id=6515
Basically, I think $path_from_root needs to be changed to $siteurl, or something else. I’m running a ~tilde site right now and I had to hardcode it in, but I think the change might need to made, anyway. It sounded like $path_from_root was out.
Last edited by kaline (2005-09-29 20:32:40)
Offline
Re: mem_randimg: Random Image from category
Hi,
the plug-in works fine, but I just want to tell that, when in debugging status, this plugin returns the next message:
<pre>
Notice: Undefined variable: categories in /www/midimidi/public_html/textpattern/lib/txplib_misc.php(429) : eval()’d code on line 18
</pre>
I’m using official 4.0.1 TXP release.
Thanks!
Offline
Re: mem_randimg: Random Image from category
I’ve been using this plugin for my site’s rotating header images… Works great. Thanks!
Offline
Re: mem_randimg: Random Image from category
I posted a new version that silences “Notice: Undefined variable: categories” when not running txp in production mode. Upgrading is not needed as the functionality of the plugin has not changed in any way.
Offline
#24 2006-02-01 09:43:45
- Champak
- Member
- Registered: 2006-01-31
- Posts: 56
Re: mem_randimg: Random Image from category
I have my code set up as below like trailgirl, it shows the picture but I get an error saying <code>tag_error <txp:mem_img/> -> Textpattern Warning: unknown_tag </code>.
Then if I change the form code from <code><txp:mem_img /></code> to <code><txp:mem_randimg /></code> it starts spitting out two images and I don’t get the error, I suspect one image from the form and one from the page. Help please, I’m using the newest version.
> trailgirl wrote:
> blumie607, this is what I did,
Form <code><txp:mem_img /></code>.
where image <code><txp:mem_randimg form=“image” category=“random” /></code>
Last edited by Champak (2006-02-01 09:51:32)
Offline