<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
  <title>aC forum: Module documentation</title>
  <link>http://www.activecollab.com/forums/topic/2992/</link>
  <description>Recent posts on topic: Module documentation</description>
  <dc:language>en-us</dc:language>
  <pubDate>Tue, 02 Dec 2008 18:16:38 CST</pubDate>
  
  <item>
    <link>http://www.activecollab.com/forums/post/13988/#post13988</link>
    <guid>http://www.activecollab.com/forums/post/13988/#post13988</guid>
    <title>Post #6 by Ilija Studen</title>
    <dc:creator>Ilija Studen</dc:creator>
    <description><![CDATA[<p><div class="postQuote"><blockquote><div class="quoteAuthor">joker:</div>As an aside, are the supported tags (quote/code/etc) documented anywhere?</blockquote></div><br />
<br />
For this forum? Usual UBB tags are enabled (in []'s) - b, i, u, url, img, code and quote.<br />
<br />
PS: JavaScript is just picking up on server side. Give them a couple of years and we'll have something cool to work with.</p>]]></description>
    <pubDate>Wed, 23 Jul 2008 08:22:25 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/13975/#post13975</link>
    <guid>http://www.activecollab.com/forums/post/13975/#post13975</guid>
    <title>Post #5 by joker</title>
    <dc:creator>joker</dc:creator>
    <description><![CDATA[<p>Indeed, Javascript is way more 'powerful' as a base language. You can modify a class once and have it effective for all future uses of it. It loses out on the lack of a good server side implementation.<br />
<br />
As an aside, are the supported tags (quote/code/etc) documented anywhere?</p>]]></description>
    <pubDate>Wed, 23 Jul 2008 06:19:44 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/13961/#post13961</link>
    <guid>http://www.activecollab.com/forums/post/13961/#post13961</guid>
    <title>Post #4 by Ilija Studen</title>
    <dc:creator>Ilija Studen</dc:creator>
    <description><![CDATA[<p>An interesting example. $this needs to be provided as argument (no way to apply it like in JavaScript for example). <br />
<br />
Main problem is that this method requires PHP5 and we are still supporting PHP4 (lowest supported version is PHP4.3.9).<br />
<br />
PHP is pretty dynamic, but there are some things that I would like to see added and that would change the game completely - named parameters and function as a type (like in JavaScript). That would be FUN! :)</p>]]></description>
    <pubDate>Tue, 22 Jul 2008 23:44:11 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/13960/#post13960</link>
    <guid>http://www.activecollab.com/forums/post/13960/#post13960</guid>
    <title>Post #3 by joker</title>
    <dc:creator>joker</dc:creator>
    <description><![CDATA[<p>Could theoretically bastardize the object overloading __call, __callstatic, __set, and __get methods to create modifiable classes, but that may come at a performance cost. For function calls, you'd not really be able to handle private/public, as the functions wouldn't be enclosed in the class. The class reference to the function, however, could be treated as either/or. The downside is that you'd need to re-extend each time you new(). As an example:<br />
<br />
<pre name="code" class="php">class Test {
  private $functions = array();
  private $objects = array();
  private $variables = array();

  public function extend($funcname,$function) {
    $this-&gt;functions[$funcname] = $function;
  }
  public function __call($func,$args) {
    if (isset($this-&gt;functions[$func])) {
      return $this-&gt;functions[$func]($args);
    }
  }
}

function joe() {
  echo &quot;hi&quot;;
}

$n = new Test();
$n-&gt;extend(&quot;bob&quot;,&quot;joe&quot;);
$n-&gt;bob();</pre></p>]]></description>
    <pubDate>Tue, 22 Jul 2008 20:58:13 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/13926/#post13926</link>
    <guid>http://www.activecollab.com/forums/post/13926/#post13926</guid>
    <title>Post #2 by Ilija Studen</title>
    <dc:creator>Ilija Studen</dc:creator>
    <description><![CDATA[<p><div class="postQuote"><blockquote><div class="quoteAuthor">joker:</div>I could do this via editing of _ticket_form.tpl and Ticket.class.php, but could not work out any module magics.</blockquote></div><br />
<br />
That's the only way. Due to nature of PHP there is no &quot;magic&quot; in modules. If it was Ruby, JavaScript or Python where you can change classes after they are defined without inheriting them you could add what you need from outside module. PHP is just not dynamic enough to support that so this type of tweak needs to be implemented as a hack to existing module.</p>]]></description>
    <pubDate>Sun, 20 Jul 2008 05:33:17 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/13922/#post13922</link>
    <guid>http://www.activecollab.com/forums/post/13922/#post13922</guid>
    <title>Post #1 by joker</title>
    <dc:creator>joker</dc:creator>
    <description><![CDATA[<p>Is there any actual on modules, such as events, properties, functions, etc? How about display modifiers, such as adding a new field to the ticket add/edit form (making use of integer_field_2)? One thing I would like to do is require a certain project's tickets to always have a category. I could do this via editing of _ticket_form.tpl and Ticket.class.php, but could not work out any module magics.</p>]]></description>
    <pubDate>Sat, 19 Jul 2008 18:58:37 CDT</pubDate>
  </item>
</channel>
</rss>