The plugin was last updated in Jan, 2010 (0.9.0rc2). At that time Start
and End PublicGroupNav hooks didn't work with just $action->raw but
worked with $action->action->raw for some reason. All other hooks
worked fine with just $action->raw.
The plugin needs updating so I'll check if this is still the case when I
update my dev instance to the latest statusnet version.
-Kyle
On 11/08/2010 11:37 PM, Evan Prodromou wrote:
That looks wrong; the Action class is a subclass of HTMLOutputter, which
has a raw() method. You should be able to do $action->raw(). I think
Kyle might have a typo there.
-Evan
On Sun, 2010-11-07 at 10:56 +0800, 橡树 wrote:
Hi, everyone
There is such a code snippet.
/**************************************/
/* Simplified from Kyle's Plugin Developer Helper Plugin*/
/* PlugA.php */
class PlugA extends Plug
{
function onStartPrimaryNav($action)
{
$hook = substr(__FUNCTION__, 2);
$this->_printHook($hook, $action);
}
function _printHook($hook, $action)
{
$action->action->raw("\n<!-- $hook -->\n");
}
}
/**************************************/
I think $action->raw("\n<!-- $hook -->\n"); is ok. Why it is
$action->action->raw("\n<!-- $hook -->\n"); ?
I'm also a PHP newbie, so I hope you will not mind my strange
questions.
Regards,
Blue
_______________________________________________
StatusNet-dev mailing list
StatusNet-dev@lists.status.net
http://lists.status.net/mailman/listinfo/statusnet-dev
_______________________________________________
StatusNet-dev mailing list
StatusNet-dev@lists.status.net
http://lists.status.net/mailman/listinfo/statusnet-dev