Joomler!.net - Decided on Joomla!

デル株式会社

Jboard is Multiple Board!

Home » Blog » $publish_up
1 votes
Written by:Joomler! 3677 hits Wednesday, 10 December 2008 16:55

Joomla!1.5.8からでしょうか、1.5.7か1.5.6と比較するとそうでなさそうなのでたぶんそうでしょう。フロントエンドからの新規投稿時に公開終了日時が現在時刻で初期化された値がすでに表示されてしまっていて気づかずにそのまま保存すると、公開と同時に終了となってしまいます。

Joomla.orgのフォーラムでもあがっていました。Joomla!1.5.9で修正されると思います。

こういう仕様だと言われればそうなのかもしれないが、使い勝手が悪い。

なので少し変更してみました。

Root/components/com_content/views/article/tmpl/form.php

$config =& JFactory::getConfig();
$publish_up =& JFactory::getDate($this->article->publish_up);
//$publish_down =& JFactory::getDate($this->article->publish_down);
$publish_up->setOffset($config->getValue('config.offset'));
//$publish_down->setOffset($config->getValue('config.offset'));
$publish_up = $publish_up->toFormat();
//$publish_down = $publish_down->toFormat();
$publish_down = '';

上記のようにすることで解決します。

本体をさわりたくなければ、テンプレート側でオーバーライドしてやれば良いですね。

 

JContentPlus for Joomla!1.5 powered by Joomler!.net

デル株式会社
joomler.net is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla!(R) name is used under a limited license from Open Source Matters in the United States and other countries.
joomler.net is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.