Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

RE: [mv] 3.1x - Getting random items out of a loop-list



******    message to minivend-users from "Curt Hauge" <chc@mninter.net>     ******

This code loops throught the photos.txt and randomly picks photos for
display. photos.txt has a field called rand. If rand = 1, then the image may
be included for random display. If rand = 0, it will never display.

[loop random=1
	search= |
	fi=photos
	sf=rand
	se=1
	|]
<a href="http://www.your_domain.com/images/photos/[loop-data photos image]"
border=0 target="_blank"><img name="[loop-data photos Photo_name]"
src="photos/[loop-data photos image]" [if-loop-data photos
Photo_name]Alt="Click to enlarge this photo of [loop-data photos
Photo_name]"[else]Alt="Click to enlarge this random
photo"[/else][/if-loop-data] width="166" height="106" border="0"></a>[/loop]

Hope this helps.

Curt Hauge

-----Original Message-----
From: owner-minivend-users@minivend.com
[mailto:owner-minivend-users@minivend.com]On Behalf Of Marius Schäfer
Sent: Friday, October 27, 2000 12:25 PM
To: minivend-users@minivend.com
Subject: [mv] 3.1x - Getting random items out of a loop-list


******    message to minivend-users from "=?iso-8859-1?q?Marius_Sch=E4fer?="
<maillist@b-p-a.com>     ******

Hi,

has anybody of you created a sub or a method how to get out a specified
number randomly out of the result list?

[loop-search ...]

	[show-out-20-randomly-of-the-hole-result]

[/loop]

I tried to do some things in perl but there where some problems with making
a loop-search inside the [perl].

Regards,
Marius


-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: