<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://naturalphilosophy.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ARexxS</id>
	<title>Module:RexxS - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://naturalphilosophy.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ARexxS"/>
	<link rel="alternate" type="text/html" href="http://naturalphilosophy.org/wiki/index.php?title=Module:RexxS&amp;action=history"/>
	<updated>2026-04-10T04:56:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://naturalphilosophy.org/wiki/index.php?title=Module:RexxS&amp;diff=260&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://naturalphilosophy.org/wiki/index.php?title=Module:RexxS&amp;diff=260&amp;oldid=prev"/>
		<updated>2016-12-28T04:23:16Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- &lt;br /&gt;
-- Lua functions for personal use&lt;br /&gt;
-- &lt;br /&gt;
&lt;br /&gt;
p = {}&lt;br /&gt;
&lt;br /&gt;
-- carousel returns one of a list of image filenames&lt;br /&gt;
-- the index of the one chosen increments every &amp;#039;switchsecs&amp;#039;&lt;br /&gt;
-- which is a parameter giving the number of seconds between switches&lt;br /&gt;
-- 3600 would switch every hour&lt;br /&gt;
-- 43200 would be every 12 hours (the default)&lt;br /&gt;
-- 86400 would be daily&lt;br /&gt;
-- {{#invoke:RexxS|carousel|switchsecs=&amp;lt;number-of-seconds&amp;gt;}}&lt;br /&gt;
-- {{#invoke:RexxS|carousel}} for 12 hours between switches&lt;br /&gt;
p.carousel = function(frame)&lt;br /&gt;
	local switchtime = tonumber(frame.args.switchsecs) or 43200&lt;br /&gt;
	if switchtime &amp;lt; 1 then switchtime = 43200 end&lt;br /&gt;
	local imgs = {&lt;br /&gt;
		&amp;quot;Pelicans 11.3.2007.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Great Blue Heron and immature Bald Eagle on the Platte River.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Green Heron4.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Canada Goose mating ritual2.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Flock of Cedar Waxwings3.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Lightning 7.11.2008.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Ursus americanus.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Stone Creek Nebraska.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Grus canadensis2.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Scaphirhynchus platorynchus 6.14.2014a.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Bison Bull in Nebraska.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Horses and thunderstorm1.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Lillypads at Desoto.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Steamboat Geyser.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Lake view from Beartooth Pass.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Tetons from Togwotee Pass.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Inspiration Point.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Flowers b grow to 6 feet.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Mantis Nebraska.jpg&amp;quot;,&lt;br /&gt;
		&amp;quot;Storm Front2.jpg&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
	local numimgs = #imgs&lt;br /&gt;
	local now = math.floor(os.time()/switchtime)&lt;br /&gt;
	local idx = now % numimgs +1&lt;br /&gt;
	return imgs[idx]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- wobble returns CSS which rotates the container&lt;br /&gt;
-- possible angles are -4, -2, 0, 2, 4 degrees&lt;br /&gt;
-- a different angle is selected every &amp;lt;switchtime&amp;gt; seconds - default is 4&lt;br /&gt;
-- {{#invoke:RexxS|wobble|switchsecs=&amp;lt;number-of-seconds&amp;gt;}}&lt;br /&gt;
-- {{#invoke:RexxS|wobble}} for 4 seconds between switches&lt;br /&gt;
p.wobble = function(frame)&lt;br /&gt;
	local switchtime = tonumber(frame.args.switchsecs) or 4&lt;br /&gt;
	if switchtime &amp;lt; 1 then switchtime = 4 end&lt;br /&gt;
	local now = math.floor(os.time()/switchtime)&lt;br /&gt;
	local angle = 2 * (now % 5 -2 )&lt;br /&gt;
	return &amp;quot;-moz-transform:rotate(&amp;quot; .. angle .. &amp;quot;deg);-webkit-transform:rotate(&amp;quot; .. angle .. &amp;quot;deg); transform:rotate(&amp;quot; .. angle .. &amp;quot;deg);&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- prevwarn returns a hatnote-style warning message in red&lt;br /&gt;
-- the customisable text of the warning is passed in the parameter &amp;#039;message&amp;#039;&lt;br /&gt;
-- it only returns the warning in preview mode&lt;br /&gt;
-- note that a blank {{REVISIONID}} is a way of identifying preview mode.&lt;br /&gt;
-- {{#invoke:RexxS|prevwarn|message=the religion parameter will be removed soon.}}&lt;br /&gt;
p.prevwarn = function(frame)&lt;br /&gt;
	local msg = frame.args.message&lt;br /&gt;
	if frame:preprocess( &amp;quot;{{REVISIONID}}&amp;quot; ) == &amp;quot;&amp;quot; then&lt;br /&gt;
		return &amp;#039;&amp;lt;div class=&amp;quot;hatnote&amp;quot; style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;Warning:&amp;lt;/strong&amp;gt; &amp;#039; .. msg .. &amp;#039; (this message is shown only in preview).&amp;lt;/div&amp;gt;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- sandyrock returns a pseudo-random message inline&lt;br /&gt;
-- the style is customisable with the &amp;#039;style&amp;#039; parameter&lt;br /&gt;
-- other messages may be added or substituted, just separate with a comma&lt;br /&gt;
-- {{#invoke:RexxS|sandyrock|style=color:#C00;}}&lt;br /&gt;
p.sandyrock = function(frame)&lt;br /&gt;
	local style = frame.args.style&lt;br /&gt;
	local msgs = {&lt;br /&gt;
		&amp;quot;You make [[Vogon]]s look frivolous&amp;quot;,&lt;br /&gt;
		&amp;quot;You&amp;#039;re the poster-child for the phrase &amp;#039;bureaucratic nightmare&amp;#039;&amp;quot;,&lt;br /&gt;
		&amp;quot;How much did they pay for your life-story when they were filming [[Brazil]]?&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	local idx = os.time() % #msgs +1&lt;br /&gt;
	return &amp;#039;&amp;lt;span style=&amp;quot;&amp;#039;.. style .. &amp;#039;&amp;quot;&amp;gt;&amp;#039; .. msgs[idx] .. &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>