{"id":903,"date":"2010-04-16T01:34:09","date_gmt":"2010-04-15T16:34:09","guid":{"rendered":"http:\/\/www.kazu.tv\/blog\/?p=903"},"modified":"2010-04-16T01:34:09","modified_gmt":"2010-04-15T16:34:09","slug":"joomla_4","status":"publish","type":"post","link":"https:\/\/kazu.tv\/blog\/2010\/04\/16\/joomla_4\/","title":{"rendered":"Joomla\u306e\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba"},"content":{"rendered":"<p>Joomla\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5185\u3067\uff08\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3082\u826f\u3044\u3051\u3069\uff09\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u8868\u793a\u3055\u305b\u308b\u306e\u306f\u7c21\u5358\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3084\u308c\u3070\u3044\u3044\uff08\u305f\u3060\u3057\u6b63\u5f0f\u306a\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u898b\u3042\u305f\u3089\u305a\uff09\u3002<\/p>\n<pre class=\"brush: plain\">JHTML::_('calendar', ....);<\/pre>\n<p>Joomla\u306e\u30ab\u30ec\u30f3\u30c0\u30fc\u6a5f\u80fd\u306f<a href=\"http:\/\/www.dynarch.com\/projects\/calendar\/\" target=\"_blank\">\u3053\u306e\u30ab\u30ec\u30f3\u30c0\u30fc<\/a>\u3092\u4f7f\u3063\u3066\u3044\u308b\u3089\u3057\u3044\u3002<\/p>\n<p>\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30ab\u30ec\u30f3\u30c0\u30fc\u306e<a href=\"http:\/\/www.dynarch.com\/projects\/calendar\/doc\/\" target=\"_blank\">\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u898b\u308b\u3068\u8272\u3005\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u51fa\u6765\u308b\u307f\u305f\u3044\u3060\u3051\u3069\u3001Joomla\u304b\u3089\u3060\u3068\u4ee5\u5916\u306b\u9762\u5012\u3060\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002\u672c\u5bb6\u30d5\u30a9\u30fc\u30e9\u30e0\u3067\u3082<a target=\"_blank\" href=\"http:\/\/forum.joomla.org\/viewtopic.php?f=471&amp;t=432156&amp;view=next\">\u540c\u3058\u4e8b\u3092\u8cea\u554f<\/a>\u3057\u3066\u308b\u4eba\u304c\u3044\u305f\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u4f7f\u3044\u305f\u304b\u3063\u305f\u306e\u306fonSelect\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u3002\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u65e5\u4ed8\u3092\u9078\u629e\u3055\u308c\u305f\u6642\u306b\u3001\u4ed6\u306e\u30d5\u30a9\u30fc\u30e0\u306e\u5024\u3092\u5909\u66f4\u3059\u308b\u51e6\u7406\u3092\u52a0\u3048\u305f\u304b\u3063\u305f\u3002<\/p>\n<p>\u7d50\u5c40\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u884c\u3063\u305f\u3002<\/p>\n<ol>\n<li><a target=\"_blank\" href=\"http:\/\/api.joomla.org\/Joomla-Framework\/HTML\/JHTML.html\">JHTML<\/a>\u306e\u5b50\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3002<\/li>\n<li>calendar\u30e1\u30bd\u30c3\u30c9\u3092JHTML\u3088\u308a\u30b3\u30d4\u30fc\u3057\u3066\u304d\u3066\u4fee\u6b63\u3002onSelect\u3092\u5f15\u6570\u3067\u53d6\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/li>\n<li>\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u4f7f\u3044\u305f\u3044\u3068\u3053\u308d\u3067\u3001JHTML\u306e\u4ee3\u308f\u308a\u306b\u305d\u306e\u30af\u30e9\u30b9\u3092\u547c\u3073\u51fa\u3057\u3002<\/li>\n<li>\u65e5\u4ed8\u304c\u9078\u629e\u3055\u308c\u305f\u6642\u306b\u884c\u3044\u305f\u3044\u51e6\u7406\u3092function\u306b\u3057\u3066\u3001\u305d\u308c\u3092\u5f15\u6570\u3067\u6e21\u3059\u3002<\/li>\n<\/ol>\n<p>1\u306f\u554f\u984c\u306a\u3044\u306f\u305a\u306a\u306e\u3067\u5272\u611b\u30022\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3002<\/p>\n<div class=\"code\">\n<pre class=\"brush: php\">\nclass FooJhtmlplus extends JHTML\n{\nfunction calendar($value, $name, $id, $format = '%Y-%m-%d', $attribs = null,\n$onselect = null)\n{\nJHTML::_('behavior.calendar'); \/\/load the calendar behavior\nif (is_array($attribs)) {\n$attribs = JArrayHelper::toString( $attribs );\n}\n$document =&amp; JFactory::getDocument();\n$document-&gt;addScriptDeclaration('\nwindow.addEvent('domready', function() {Calendar.setup({\ninputField     :    &quot;'.$id.'&quot;,     \/\/ id of the input field\nifFormat       :    &quot;'.$format.'&quot;,      \/\/ format of the input field\nbutton         :    &quot;'.$id.'_img&quot;,  \/\/ trigger for the calendar (button ID)\nalign          :    &quot;Tl&quot;,           \/\/ alignment (defaults to &quot;Bl&quot;)\nonSelect       :    '.$onselect.',\nsingleClick    :    true\n});});');\nreturn '&lt;input type=&quot;text&quot; value=&quot;'.htmlspecialchars($value, ENT_COMPAT, 'UTF-8').'&quot; id=&quot;'.$id.'&quot; name=&quot;'.$name.'&quot; \/&gt;'.\n'&lt;img id=&quot;'.$id.'_img&quot; alt=&quot;calendar&quot; src=&quot;'.JURI::root(true).'\/templates\/system\/images\/calendar.png&quot; class=&quot;calendar&quot; \/&gt;';\n}\n}\n<\/pre>\n<\/div>\n<p>3\u3082\u554f\u984c\u306a\u3044\u3068\u601d\u3046\u3093\u3060\u3051\u3069\u30014\u304c\u82e5\u5e72\u554f\u984c\u3002\u81ea\u5206\u304c\u3084\u308a\u305f\u3044\u51e6\u7406\u3092$onselect\u306b\u6e21\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u305d\u306e\u6a5f\u80fd\u3067\u30ab\u30ec\u30f3\u30c0\u30fc\u304c\u5143\u3005\u6301\u3063\u3066\u3044\u308b\u6a5f\u80fd\u3092\u4e0a\u66f8\u304d\u3057\u3066\u3057\u307e\u3063\u3066\u3001\u65e5\u4ed8\u304c\u9078\u629e\u3055\u308c\u305f\u6642\u306b\u305d\u306e\u65e5\u4ed8\u3092\u30c6\u30ad\u30b9\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u30b3\u30d4\u30fc\u3059\u308b\u306a\u3069\u306e\u672c\u6765\u306e\u6a5f\u80fd\u304c\u5931\u308f\u308c\u3066\u3057\u307e\u3046\u3002<\/p>\n<p>\u3068\u8a00\u3046\u3053\u3068\u3067\u3001onselect\u306b\u6e21\u3059function\u306f\u65e2\u5b58\u306efunctioin\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3001\u305d\u3053\u306b\u81ea\u5206\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u305f\u65b9\u304c\u3044\u3044\u3002\u3067\u3001\u65e2\u5b58\u306e\u6a5f\u80fd\u306f\u3069\u3053\u306b\u3042\u308b\u304b\u3068\u3044\u3046\u3068\u3001calendar-setup.js\u306b\u5b58\u5728\u3059\u308b\u3002\u666e\u901a\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3068\u3001\u5bb9\u91cf\u524a\u6e1b\u306e\u305f\u3081\uff08\uff1f\uff09\u30a4\u30f3\u30c7\u30f3\u30c8\u3068\u304b\u6539\u884c\u3068\u304b\u304c\u524a\u3063\u3066\u3042\u3063\u3066\u975e\u5e38\u306b\u898b\u306b\u304f\u3044\u3002<\/p>\n<p>\u3061\u3087\u3063\u3068\u691c\u7d22\u3057\u305f\u3089<a target=\"_blank\" href=\"http:\/\/www.koders.com\/javascript\/fid97D90C77C5090774887B23FD7DA6AA118ECB3A03.aspx\">\u6574\u5f62\u6e08\u307f\u306e\u30bd\u30fc\u30b9<\/a>\u304c\u3042\u3063\u305f\u3002\u305d\u3053\u306eonSelect\u3092\u30b3\u30d4\u30fc\u3057\u3066\u4fee\u6b63\u3057\u3066\u3001\u5148\u306eFooJhtmlplus.calendar\u306e$onselect\u306b\u6e21\u3057\u3066\u3084\u308c\u3070\u3088\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Joomla\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5185\u3067\uff08\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3082\u826f\u3044\u3051\u3069\uff09\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u8868\u793a\u3055\u305b\u308b\u306e\u306f\u7c21\u5358\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3084\u308c\u3070\u3044\u3044\uff08\u305f\u3060\u3057\u6b63\u5f0f\u306a\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u898b\u3042\u305f\u3089\u305a\uff09\u3002 JHTML::_(&#8216;calendar&#8217;, &#8230;.); Joom&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[592],"tags":[589,666,667],"class_list":["post-903","post","type-post","status-publish","format-standard","hentry","category-joomla-2","tag-joomla","tag-onselect","tag-667"],"_links":{"self":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/comments?post=903"}],"version-history":[{"count":0,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/903\/revisions"}],"wp:attachment":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/media?parent=903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/categories?post=903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/tags?post=903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}