<?xml version="1.0" encoding="UTF-8"  standalone="yes" ?>
<rss version="2.0">
	<channel>
		<title>社群: Web Programming - 文件區(drupal)</title>
		<description>台灣數位學習數位教學平台 RSS feed provider</description>
		<language>zh-tw</language>
		<link>http://lms.xms.com.tw/board.php?courseID=100&amp;f=doclist&amp;folderID=1098</link>
	<item>
		<title>glossary</title>
		<link>http://lms.xms.com.tw/board.php?courseID=100&amp;f=doc&amp;cid=5355</link>
		<description>[hooks]
The places where code can be executed are called &quot;hooks&quot; and are defined by a fixed interface. A hook can be thought of as an event in the sense that an event triggers something. The event in Drupal, such as deleting a node, would trigger the hook &quot;hook_delete&quot;.
http://drupal.org/node/292&amp;nbsp;
&amp;nbsp;
&amp;nbsp; </description>
		<pubDate>Sat, 02 Apr 2011 18:56:51 +0800</pubDate>
	</item>
	<item>
		<title>form</title>
		<link>http://lms.xms.com.tw/board.php?courseID=100&amp;f=doc&amp;cid=4779</link>
		<description>function onthisdate_admin_validate($form, &amp;amp;$form_state){&amp;nbsp;&amp;nbsp;&amp;nbsp; $maxdisp = $form_state[&#039;values&#039;][&#039;onthisdate_maxdisp&#039;];&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!is_numeric($maxdisp))&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; form_set_error(&#039;onthisdate_maxdisp&#039;, t(&#039;You must enter an integer for the maximum number of links.&#039;));&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; else if ($maxdisp &amp;lt;= 0)&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; form_set_error(&#039;onthisdate_maxdisp&#039;, t(&#039;Maximum number of links must be positive.&#039;));&amp;nbsp;&amp;nbsp;&amp;nbsp; }} </description>
		<pubDate>Tue, 01 Mar 2011 11:43:04 +0800</pubDate>
	</item>
	<item>
		<title>Persistent variable table</title>
		<link>http://lms.xms.com.tw/board.php?courseID=100&amp;f=doc&amp;cid=4777</link>
		<description>儲存系統的設定, bootstrap.inc
/**&amp;nbsp;* Load the persistent variable table.&amp;nbsp;*&amp;nbsp;* The variable table is composed of values that have been saved in the table&amp;nbsp;* with variable_set() as well as those explicitly specified in the configuration&amp;nbsp;* file.&amp;nbsp;*/function variable_init($conf = array()) {&amp;nbsp; if ($cached = cache_get(&#039;variables&#039;, &#039;cache&#039;)) {&amp;nbsp;&amp;nbsp;&amp;nbsp; $variables = $cached-&amp;gt;data;&amp;nbsp; }&amp;nbsp; else {&amp;nbsp;&amp;nbsp;&amp;nbsp; $result = db_query(&#039;SELECT * FROM {variable}&#039;);&amp;nbsp;&amp;nbsp;&amp;nbsp; while ($variable = db_fetch_object($result)) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $variables[$variable-&amp;gt;name] = unserialize($variable-&amp;gt;value);&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; cache_set(&#039;variables&#039;, $variables);&amp;nbsp; }
&amp;nbsp; foreach ($conf as $name =&amp;gt; $value) {&amp;nbsp;&amp;nbsp;&amp;nbsp; $variables[$name] = $value;&amp;nbsp; }
&amp;nbsp; return $variables;}
&amp;nbsp;
function variable_get($name, $default) {&amp;nbsp; global $conf;
&amp;nbsp; return isset($conf[$name]) ? $conf[$name] : $default;}
&amp;nbsp;
function variable_set($name, $value) {&amp;nbsp; global $conf;
&amp;nbsp; $serialized_value = serialize($value);&amp;nbsp; db_query(&quot;UPDATE {variable} SET value = &#039;%s&#039; WHERE name = &#039;%s&#039;&quot;, $serialized_value, $name);&amp;nbsp; if (!db_affected_rows()) {&amp;nbsp;&amp;nbsp;&amp;nbsp; @db_query(&quot;INSERT INTO {variable} (name, value) VALUES (&#039;%s&#039;, &#039;%s&#039;)&quot;, $name, $serialized_value);&amp;nbsp; }
&amp;nbsp; cache_clear_all(&#039;variables&#039;, &#039;cache&#039;);
&amp;nbsp; $conf[$name] = $value;} </description>
		<pubDate>Tue, 01 Mar 2011 11:24:29 +0800</pubDate>
	</item>
	</channel>
	</rss>
