Changes

Jump to navigation Jump to search
m
Fixed case in template name
Line 29: Line 29:     
This script sets the <var class="LITERAL">ExternalIP</var> value and the <var class="LITERAL">IPAddress</var> property of the <var class="LITERAL">ExternalInterface</var> record in the configuration database to the value provided as a parameter. The <var class="LITERAL">$event</var> parameter is not used in this particular script.
 
This script sets the <var class="LITERAL">ExternalIP</var> value and the <var class="LITERAL">IPAddress</var> property of the <var class="LITERAL">ExternalInterface</var> record in the configuration database to the value provided as a parameter. The <var class="LITERAL">$event</var> parameter is not used in this particular script.
 
+
{{Note box|msg=The two records exist due to an partial migration from simple to complex entries in the configuration database. Setting both values in this script avoids the need to perform database migration in the ip-change event.}}
<div class="NOTE"><blockquote class="NOTE">
+
<div class="SECT2">
 
  −
'''Note: '''The two records exist due to an partial migration from simple to complex entries in the configuration database. Setting both values in this script avoids the need to perform database migration in the ip-change event.
  −
 
  −
</blockquote></div><div class="SECT2">
   
----
 
----
   Line 98: Line 94:     
You should normally link your action scripts in the range <var class="LITERAL">S10</var> to <var class="LITERAL">S80</var> so that they occur after <var class="LITERAL">templates2expand</var> and before <var class="LITERAL">services2adjust</var>.
 
You should normally link your action scripts in the range <var class="LITERAL">S10</var> to <var class="LITERAL">S80</var> so that they occur after <var class="LITERAL">templates2expand</var> and before <var class="LITERAL">services2adjust</var>.
 
+
{{Note box|msg=The <tt>generic_template_expand</tt> action is currently run at <var class="LITERAL">S05</var> and <tt class="FILENAME">adjust-services</tt> is run at <var class="LITERAL">S90</var>. The order of action scripts within an event is subject to change between releases.}}
<div class="NOTE"><blockquote class="NOTE">
+
</div></div><div class="SECT2">
 
  −
'''Note: '''The <tt class="FILENAME">generic_template_expand</tt> action is currently run at <var class="LITERAL">S05</var> and <tt class="FILENAME">adjust-services</tt> is run at <var class="LITERAL">S90</var>. The order of action scripts within an event is subject to change between releases.
  −
 
  −
</blockquote></div></div></div><div class="SECT2">
   
----
 
----
   Line 124: Line 116:     
But how is the action code to know which user was just added? The new username is passed as an argument to the user-create event. This way the action programs triggered by the user-create event have a choice. They can either ignore the username argument and regenerate their output based on the updated list of accounts, or they can pay attention to the username argument, retrieve the rest of the information about the new user from the <tt class="FILENAME">accounts</tt> database, and perform the incremental work to add the user.
 
But how is the action code to know which user was just added? The new username is passed as an argument to the user-create event. This way the action programs triggered by the user-create event have a choice. They can either ignore the username argument and regenerate their output based on the updated list of accounts, or they can pay attention to the username argument, retrieve the rest of the information about the new user from the <tt class="FILENAME">accounts</tt> database, and perform the incremental work to add the user.
 +
{{Note box|msg=Reminder: action scripts should normally take at most two arguments. The first is always the event name. The second optional argument is a key into one of the databases. Events are not function calls.
   −
<div class="NOTE"><blockquote class="NOTE">
+
Events are not currently serialized. In most cases overlapping events will not cause issues, but caution should be exercised when events are signalled from programs.}}
 
+
</div><div class="SECT2">
'''Note: '''Reminder: action scripts should normally take at most two arguments. The first is always the event name. The second optional argument is a key into one of the databases. Events are not function calls.
  −
 
  −
Events are not currently serialized. In most cases overlapping events will not cause issues, but caution should be exercised when events are signalled from programs.
  −
 
  −
</blockquote></div></div><div class="SECT2">
   
----
 
----
   Line 137: Line 125:     
The table below summarises the key SME Server events and their argument if required. Remember, each action script is always called with the event name as the first argument. The arguments listed in this table are provided as the second argument.
 
The table below summarises the key SME Server events and their argument if required. Remember, each action script is always called with the event name as the first argument. The arguments listed in this table are provided as the second argument.
 
+
{{Note box|msg=Events which are not listed in this table are subject to change and may not appear in future releases of the SME Server.}}
<div class="NOTE"><blockquote class="NOTE">
+
<div class="TABLE">
 
  −
'''Note: '''Events which are not listed in this table are subject to change and may not appear in future releases of the SME Server.
  −
 
  −
</blockquote></div><div class="TABLE">
      
{| class="CALSTABLE" border="1"
 
{| class="CALSTABLE" border="1"

Navigation menu