Return to Snippet

Revision: 59386
at September 5, 2012 18:35 by mrjohnmain


Initial Code
<?xml version="1.0" ?>

<install version="1.5" type="module">
	<name>Mad Current Event</name>
	<creationDate>2nd September 2012</creationDate>
	<author>Chris Hallett, John Main</author>
	<copyright>Copyright (C) 2007, 2010 Chris Hallett</copyright>
	<license>http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or any later version</license>
	<authorEmail>[email protected], [email protected]</authorEmail>
	<authorUrl>www.madblanks.org, www.johnmain.co.uk</authorUrl>
	<!-- file version 3.0.0 20100414 -->
	<version>4.0</version>
	
	<description>Display the weekly or daily event, show, or other happening that is taking place right now. An example use is for a radio station schedule where the same shows air on a repeating basis, weekly or daily. Shows/events/happenings are stored in the module parameters. The module parameters must be saved before using the module.</description>

	<files>
		<filename module="mod_madcurrentevent">mod_madcurrentevent.php</filename>
	</files>
	<config>
		<fields name="params">
			<fieldset name="basic"
				addfieldpath="/modules/mod_madcurrentevent">
	    
				<field name="spacer" type="spacer" default="" label="" description="" />
		
				<field name="display_string_format" type="textarea" rows="5" cols="45"
				default="&lt;p&gt;The current event/show is &lt;b&gt;%1$s&lt;/b&gt;.&lt;/p&gt;"
				   label="Text/HTML to display; %1$s is replaced with name of event/show; %2$s is replaced with the date/time"
					description="" />
					
				<field name="nomatchoption" type="list" default="1"
					label="Do what if if no event/show matches the current time?" 
					description="">
										<option value="1">Display alternative text/HTML</option>
											<option value="0">Display nothing</option>
					</field>
		
				<param name="no_match_string" type="textarea" rows="5" cols="45"
				default="&lt;p&gt;&lt;em&gt;There is no current show or event.&lt;/em&gt;&lt;/p>"
				   label="Alternative text/HTML to display if no event/show matches the current time; %s is replaced with the date/time"
					description="" />
		
				<field name="eventorshowdata" type="textarea" rows="35" cols="45" default=""
				label="Event/show names one per line, with semicolon-delimited capitalized day name, hour (0 through 23), and optional minute range (startmin-endmin); examples follow:&lt;br /&gt;
				&lt;br /&gt;
				eventorshowname1;Dayname1;hour1&lt;br /&gt;
				eventorshowname2;Dayname2;hour2&lt;br /&gt;
				name3;Day3;hour3;startmin3-endmin3&lt;br /&gt;
				name4;Day4;hour4;startmin4-endmin4&lt;br /&gt;
				Knitting Circle;Saturday;10&lt;br /&gt;
				Hour Six O&apos;Clock News;Monday;18&lt;br /&gt;
				Half Hour Show 1;Tuesday;8;0-29&lt;br /&gt;
				Half Hour Show 2;Tuesday;8;30-59"
					description="" />
				
				<field name="spacer" type="spacer" default="" label="Date/Time settings" description="" />
				
				<field name="datetime_format" type="text" size="63" default=""
				   label="The date/time format when using %2$s in the text/HTML to display or %s in the alternative text/HTML; syntax is according to PHP&apos;s strftime function (see http://php.net/strftime); default is _DATE_FORMAT_LC2 if available, or %d %b %Y %I:%M&amp;nbsp;%p"
					description="" />
		
		
				<field name="timeadjustment" type="text" size="45" default=""
				   label="Plain English time adjustment (offset) via PHP&apos;s strtotime function (see http://php.net/strtotime); useful if server is in different time zone than your website or server clock is incorrect and out of your control; default is blank&lt;br /&gt;
				   &lt;br /&gt;
				   Examples:&lt;br /&gt;
				   -5 hours&lt;br /&gt;
				   +2min +25sec"
					description="" />
		
				<field name="showservertime" type="radio" default="0"
					label="Show a message containing the time according to the web server and the adjusted time? (useful for debugging)" 
					description="">
						<option value="1">Yes</option>
						<option value="0">No</option>
				</field>
		
				<field name="spacer" type="spacer" default="" label="" description="" />
				
				<field name="moduleclass_sfx" type="text" default=""
						   label="Module Class Suffix"
						   description="A suffix to be applied to the css class of the module
								   (table.moduletable); this allows individual module styling" />
		
				<field name="spacer" type="spacer" default="" label="" description="" />
			</fieldset>
		</fields>
	</config>
</install>

Initial URL
http://extensions.joomla.org/extensions/calendars-a-events/events/events-management/3522

Initial Description
I've updated Mad Current Event to work with Joomla vs 2.5.6.
Just replace the contents of mod_madcurrentevent.xml with the following code.

Initial Title
Mad Current Event Update for Joomla vs 2.5.6

Initial Tags
joomla

Initial Language
XML