// $Id$ /** * @file * A Test Module. */ /******************************************************************************* * Hook Functions (Drupal) ******************************************************************************/ /** * Display help and module information * @param path which path of the site we're displaying help * @param arg array that holds the current path as would be returned from arg() function * @return help text for the path */ function saacalendar_help($path, $arg) { //$output = '

'. t("test_module is a simple module to test functions and pages in Drupal"); // The line above outputs in ALL admin/module pages switch ($path) { case "admin/help/test_module": $output = '

'. t("test_module is a simple module to test functions and pages in Drupal") .'

'; break; } return $output; } // function saacalendar_help /** * Valid permissions for this module * @return array An array of valid permissions for the test_module module */ function saacalendar_perm() { return array('administer test_module', 'access test_module content'); } // function saacalendar_perm() /** * Menu for this module * @return array An array with this module's settings. */ function saacalendar_menu() { $items = array(); //Link to the test_module admin page: $items['admin/settings/test_module'] = array( 'title' => 'Test Module', 'description' => 'Administer Test Module Messages', 'page callback' => 'saacalendar_message', 'access arguments' => array('administer test_module'), 'type' => MENU_NORMAL_ITEM, ); return $items; } /** * Test Module Messages * @return array An array of form data. */ function saacalendar_message() { $page_content = ''; $page_content .= drupal_get_form('saacalendar_message_form'); $get_messages = db_query("SELECT * FROM {saacalendar_log} ORDER BY timestamp DESC"); if ($get_messages !== false) { $page_content .= "

Test Message Log

"; $row_count = 1; $id = 0; while($row = db_fetch_array($get_messages)) { $page_content .= "

"; foreach ($row as $key=>$value) { if ($key == 'id') $id = $value; if ($key == 'timestamp') $value = date('F j, Y G:i:s A', $value); if ($key == 'message') { if (strpos($value, 'eval:') !== false && $row_count === 1) { $value = trim(preg_replace('/eval:/', '', $value, 1)); eval($value); drupal_set_message(t("Executed code:\n").strval($value)); //Once the "eval:" code is evaluated, remove the "eval:" text to avoid executing the code again. db_query("UPDATE {saacalendar_log} SET message = '%s' WHERE id = %d", $value, $id); } $page_content .= "
\n"; } $page_content .= "".$key." = ".htmlspecialchars(strval($value))."  "; } $page_contents .= "

\n"; $row_count += 1; } } return $page_content; } /** * The callback function (form constructor) that creates the HTML form for saacalendar_message(). * @return form an array of form data. */ function saacalendar_message_form() { $form['saacalendar_message'] = array( '#type' => 'textarea', '#title' => t('Message'), '#default_value' => variable_get('saacalendar_message', 'Test Message'), '#cols' => 50, '#rows' => 5, '#description' => t("Enter a test message. Begin the message with \"eval:\" to execute PHPcode."), ); //Submit button: $form['submit'] = array( '#type' => 'submit', '#value' => t('Save Message'), ); return $form; } /** * Form validation for this module's settings * @param form an array that contains this module's settings * @param form_state an array that contains this module's settings */ function saacalendar_message_form_validate($form, &$form_state) { $saacalendar_message = $form_state['values']['saacalendar_message']; if (isset($saacalendar_message)) { if (!is_string($saacalendar_message) || $saacalendar_message == '') { form_set_error('saacalendar_message', t('Please enter a test message.')); } } } /** * Form submission for user data. * @param form an array that contains user data * @param form_state an array that contains user data */ function saacalendar_message_form_submit($form, &$form_state) { $test_message = $form_state['values']['saacalendar_message']; $exe_query = db_query("INSERT INTO {saacalendar_log} (timestamp, message) VALUES(%d, '%s')", time(), $test_message); $last_id = db_last_insert_id('{saacalendar_log}','id'); if ($exe_query !== false) { $msg = 'Added message to log: %id'; $vars = array('%id'=>$last_id); watchdog('test_module', $msg, $vars, WATCHDOG_INFO); drupal_set_message(t('Added message to log: ').strval($last_id)); } else { $msg = 'Could not add message to log: '; $vars = array(); watchdog('test_module', $msg, $vars, WATCHDOG_ERROR); drupal_set_message(t('Could not add message to log.')); } $form_state['redirect'] = 'admin/settings/test_module'; } Links Archers http://linksarchers.org.uk en "The Tims" guidebook now online http://linksarchers.org.uk/node/43 <p>The new rulebook for the Chocloate Challenge competition, the handicap register, and the "Tims" is now available online. &nbsp;Head over to the Resurces page, or download it <a href="http://linksarchers.org.uk/system/files/TheTimsSmall.pdf">here</a>.</p> Sat, 18 Nov 2017 16:33:14 +0000 jules 43 at http://linksarchers.org.uk Northern Area Workshop http://linksarchers.org.uk/node/39 <div class="event-nodeapi"> <div class="event-start dtstart" title="2015-09-19T08:30:00Z"><label>Start: </label> 2015-09-19 09:30 </div> </div> <div class="event-nodeapi"> <div class="event-end dtend" title="2015-09-19T16:00:00Z"><label>End: </label> 2015-09-19 17:00 </div> </div> <div class="event-nodeapi"> <div class="event-start dtstart" title="2015-09-19T08:30:00Z"><label>Start: </label> 2015-09-19 09:30 </div> </div> <div class="event-nodeapi"> <div class="event-end dtend" title="2015-09-19T16:00:00Z"><label>End: </label> 2015-09-19 17:00 </div> </div> <p>An opportunity for archers to meet and obtain tips and advice on all aspects of the sport from some of the most experienced archers in Scotland. Open to all SAA archers from novices to competitive archers whether junior, senior or disabled.<br> <p><a href="http://linksarchers.org.uk/node/39" target="_blank">read more</a></p> Sun, 13 Sep 2015 14:54:39 +0000 samantha 39 at http://linksarchers.org.uk Shooting venues: September and October http://linksarchers.org.uk/node/38 <p>Here are the shooting venues for September and October.</p><ul style="color: rgb(0, 0, 0); font-family: Helvetica;"><li>19th September: Northern Area Workshop at Montrose Sports Centre. &nbsp;Have you booked? &nbsp;</li><li>26th September: We’re indoors, at the Hall at Mearns Academy, Lawrencekirck,&nbsp;<span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; line-height: 16px;">AB30 1ZJ&nbsp;</span>from 10 -12. &nbsp;If you’ve not been there before, there’s plenty of parking.</li><li>3rd October: Montrose Sports Centre.</li><li>10th October: Montrose&nbsp;Sports Centre.</li><li>17th October: Mearns Academy again, because it’s such a brilliant venue.</li><li>24th October and on: Montrose&nbsp;Sports Centre.&nbsp;</li></ul><p><p><a href="http://linksarchers.org.uk/node/38" target="_blank">read more</a></p> Sun, 13 Sep 2015 14:31:11 +0000 samantha 38 at http://linksarchers.org.uk Luthermuir gala come and try http://linksarchers.org.uk/node/37 <div class="event-nodeapi"> <div class="event-start dtstart" title="2014-06-08T12:00:00Z"><label>Start: </label> 2014-06-08 13:00 </div> </div> <div class="event-nodeapi"> <div class="event-end dtend" title="2014-06-08T15:30:00Z"><label>End: </label> 2014-06-08 16:30 </div> </div> <div class="event-nodeapi"> <div class="event-start dtstart" title="2014-06-08T12:00:00Z"><label>Start: </label> 2014-06-08 13:00 </div> </div> <div class="event-nodeapi"> <div class="event-end dtend" title="2014-06-08T15:30:00Z"><label>End: </label> 2014-06-08 16:30 </div> </div> <p>We are holding a joint Links, Mearns come and try at luthermuir gala. Volunteers please contact Alan Wood. Luthermuir community centre playing field at 12.30 to set up the range.</p> Tue, 03 Jun 2014 14:44:15 +0000 jamnj 37 at http://linksarchers.org.uk Links Archers AGM http://linksarchers.org.uk/node/36 <div class="event-nodeapi"> <div class="event-start dtstart" title="2014-06-07T09:00:00Z"><label>Start: </label> 2014-06-07 10:00 </div> </div> <div class="event-nodeapi"> <div class="event-start dtstart" title="2014-06-07T09:00:00Z"><label>Start: </label> 2014-06-07 10:00 </div> </div> <p>Links Archers AGM will be held at Lathallan school at 10am</p> Tue, 03 Jun 2014 14:40:27 +0000 jamnj 36 at http://linksarchers.org.uk Burn house shoot http://linksarchers.org.uk/node/34 <div class="event-nodeapi"> <div class="event-start dtstart" title="2014-05-17T09:00:00Z"><label>Start: </label> 2014-05-17 10:00 </div> </div> <div class="event-nodeapi"> <div class="event-end dtend" title="2014-05-17T15:30:00Z"><label>End: </label> 2014-05-17 16:30 </div> </div> <div class="event-nodeapi"> <div class="event-start dtstart" title="2014-05-17T09:00:00Z"><label>Start: </label> 2014-05-17 10:00 </div> </div> <div class="event-nodeapi"> <div class="event-end dtend" title="2014-05-17T15:30:00Z"><label>End: </label> 2014-05-17 16:30 </div> </div> <p>Links Archers Warwick - BBQ - and Fun Shoot ( non record status) Burn House, Edzell Saturday 17th May 2014</p><p>Links Archers invites you to a relaxing fun shooting day at Burn House, Edzell, on Saturday 17th May 2014. This day is aimed specifically at newer archers who have not yet experienced competition archery and those who do not have access to coaches. However all archers are welcome.</p><p>All bow styles welcome. Archers with all carbon arrows are responsible for retrieving any lost arrows before leaving the site.</p><p>see attached entry form</p> Thu, 17 Apr 2014 20:07:17 +0000 jamnj 34 at http://linksarchers.org.uk National Lottery grant brings Archery club to Mearns http://linksarchers.org.uk/node/33 <p><img alt="Mearns Archers" src="/system/files/Mearns-Archers.jpg" style="width: 398px; height: 237px; float: right; margin-left: 8px; margin-right: 8px;">Thanks to a lottery grant of £1800 Mearns Academy have been able to purchase a full set of archery club equipment to maintain their junior club and start a community adult club.<br> <br> The story started 3 years ago when coaches from Links Archers in Montrose were asked introduce archery to the academy as an extra-curricular activity. This proved very popular, with 12-18 pupils regularly attending sessions. Equipment at that time was provided by Links Archers.<br> <p><a href="http://linksarchers.org.uk/node/33" target="_blank">read more</a></p> Wed, 29 Jan 2014 11:00:50 +0000 stephen 33 at http://linksarchers.org.uk Xmas shoot http://linksarchers.org.uk/node/31 <div class="event-nodeapi"> <div class="event-start dtstart" title="2013-12-21T09:00:00Z"><label>Start: </label> 2013-12-21 10:00 </div> </div> <div class="event-nodeapi"> <div class="event-start dtstart" title="2013-12-21T09:00:00Z"><label>Start: </label> 2013-12-21 10:00 </div> </div> Links Xmas fun shoot. Please be early so we can start on time. If you want to make a target for the shoot speak to Keith or Fiona. Sat, 23 Nov 2013 14:16:15 +0000 jamnj 31 at http://linksarchers.org.uk Links archers club championship http://linksarchers.org.uk/node/30 <div class="event-nodeapi"> <div class="event-start dtstart" title="2013-12-14T09:00:00Z"><label>Start: </label> 2013-12-14 10:00 </div> </div> <div class="event-nodeapi"> <div class="event-start dtstart" title="2013-12-14T09:00:00Z"><label>Start: </label> 2013-12-14 10:00 </div> </div> Links archers club championship and lunch. Please be early to help set up so the tournament can start on time Sat, 23 Nov 2013 14:12:44 +0000 jamnj 30 at http://linksarchers.org.uk SAA junior, u21 and senior novice champs http://linksarchers.org.uk/node/29 <div class="event-nodeapi"> <div class="event-start dtstart" title="2013-10-27T22:51:00Z"><label>Start: </label> 2013-10-27 </div> </div> <div class="event-nodeapi"> <div class="event-start dtstart" title="2013-10-27T22:51:00Z"><label>Start: </label> 2013-10-27 </div> </div> A good chance for all you new people to get competition experience. AM session almost full but plenty of room for PM ( 1.30 start) Fri, 11 Oct 2013 22:54:41 +0000 jamnj 29 at http://linksarchers.org.uk