列出文章
|
頁: [1] 2 3
|
3
|
開發 / 外掛程式 / Re: 寻找mark wu
|
於: 九月 25, 2007, 10:37:06 上午
|
<?php include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" ); include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" ); include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" ); class PluginToday extends PluginBase { function PluginToday() { $this->PluginBase(); $this->desc = "Very simple plugin that will tell today's date."; $this->author = "The pLog team"; } function show() { $t = new Timestamp();
$todayDate = $t->getDay()."/".$t->getMonth()."/".$t->getYear();
return $todayDate; } } PluginManager::registerPlugin( "today", "PluginToday" ); ?>
我将这样的程序码存在today.class.php,放在plugin目录下,在后台管理中去没有办法发现这个插件
前台main模板中添加{$today->show()}又会报这个错误 Fatal error: Call to a member function show() on a non-object in D:\JOB\baby\root\tmp\1\%%AB^AB5^AB5C16A9%%main.template.php on line 27
|
|
|
4
|
開發 / 外掛程式 / 寻找mark wu
|
於: 九月 25, 2007, 10:13:13 上午
|
我想写一个个人博客的统计插件,请提供说明 我试验您写的today的例子并没有实验成功 请具体说明一下编写我这类插件程序的实现方式
|
|
|
|
|
|