Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2004-10-18 05:08:08

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

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

#14 2004-10-18 07:53:16

nipponzine
New Member
From: Tokyo
Registered: 2004-10-15
Posts: 3
Website

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

#15 2004-10-21 16:02:17

pvicnan
New Member
Registered: 2004-10-05
Posts: 9
Website

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

#16 2004-10-21 20:40:14

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

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

#17 2005-05-09 06:22:09

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,028
Website GitHub Mastodon Twitter

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

#18 2005-06-13 20:01:23

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

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

#20 2005-09-29 20:30:56

kaline
Member
From: Plymouth, MN
Registered: 2005-07-18
Posts: 38
Website

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

#21 2005-10-18 12:20:42

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#22 2005-10-18 14:51:45

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

Re: mem_randimg: Random Image from category

I’ve been using this plugin for my site’s rotating header images… Works great. Thanks!

Offline

#23 2005-10-25 15:05:46

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

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

Board footer

Powered by FluxBB