{"id":27,"date":"2008-01-31T01:15:00","date_gmt":"2008-01-30T17:15:00","guid":{"rendered":"http:\/\/amjet.dyndns.biz\/blog\/IT\/?p=27"},"modified":"2013-03-01T19:50:47","modified_gmt":"2013-03-01T11:50:47","slug":"xoops-%e6%a8%a1%e7%b5%84%e5%85%a7%e4%bd%bf%e7%94%a8-javascript","status":"publish","type":"post","link":"https:\/\/blog.amjet.biz\/IT\/?p=27","title":{"rendered":"XOOPS \u6a21\u7d44\u5167\u4f7f\u7528 javascript"},"content":{"rendered":"<p><a href=\"http:\/\/www.xoops.org\/\">XOOPS<\/a> \u9019\u500b CMS (Content Management System) \u5df2\u7d93\u98a8\u884c\u597d\u4e45\u4e86\uff0c\u6700\u8fd1\u624d\u6709\u6a5f\u6703\u4ed4\u7d30\u7684\u8a55\u4f30\u4e00\u4e0b\uff0c\u611f\u89ba\u4e0a\u6bd4 <a href=\"http:\/\/www.mamboserver.com\/\">Mambo<\/a>\u3001<a href=\"http:\/\/www.joomla.org\/\">Joomla<\/a> \u66f4\u6709\u5f48\u6027\uff0c\u5b98\u65b9\u7db2\u7ad9\u4e5f\u9ede\u51fa\u672a\u4f86\u7684\u65b9\u5411\u662f\u671d\u5411 Framework \u767c\u5c55\u3002\u5728\u5c08\u6848\u88e1\u7528\u4f86\u4f5c\u5f8c\u53f0\u61c9\u8a72\u4e0d\u932f\uff0c\u6bcf\u500b\u5ba2\u6236\u8981\u6c42\u7684\u529f\u80fd\u4ee5 module \u65b9\u5f0f\u958b\u767c\uff0c\u901f\u5ea6\u5feb\u3001\u7a0b\u5f0f\u78bc\u4e5f\u5bb9\u6613\u7dad\u8b77\u3002<\/p>\n<p>\u7531\u65bc\u73fe\u5728\u5ba2\u6236\u7684\u80c3\u53e3\u90fd\u88ab\u990a\u5927\u4e86\uff0c\u8981\u6c42\u7684\u529f\u80fd\u5e38\u5e38\u8981\u7528\u5230 AJAX\uff0c\u4ee5\u5e38\u898b\u7684 <a href=\"http:\/\/developer.yahoo.com\/yui\/\">Yahoo UI<\/a> \u70ba\u4f8b\uff0c\u9019\u662f\u4e00\u500b javascript base \u7684 framework\uff0c\u5982\u4f55\u6574\u5408\u5728\u4e00\u8d77\u7684\u78ba\u662f\u82b1\u4e86\u9ede\u6642\u9593\u7814\u7a76\u3002<\/p>\n<p>\u9996\u5148\u6211\u5011\u8981\u89e3\u6c7a\u5982\u4f55\u5d01\u5165\u6211\u5011\u7684 css \u53ca js \u6a94\uff0c\u6211\u5011\u4ee5\u9810\u8a2d\u7684 theme \u70ba\u4f8b\uff1a<\/p>\n<p>\u5728 themes\/default\/theme.html \u88e1\u6709\u4ee5\u4e0b2\u884c<\/p>\n<p>&lt;!&#8211; customized header contents &#8211;&gt;<br \/>\n&lt;{$xoops_module_header}&gt;<\/p>\n<p>\u6211\u5011\u53ef\u4ee5\u5229\u7528\u7b2c2\u884c\u7684 smarty \u6a23\u677f\u5f15\u64ce\u8b8a\u6578\u52a0\u5165\u6211\u5011\u6240\u9700\u8981\u7684 css \u53ca javascript \u6a94\uff0c\u4ee5\u4e0b\u662f\u500b\u7c21\u55ae\u7684\u7bc4\u4f8b<\/p>\n<p>&lt;?php<br \/>\nrequire(&#8216;..\/..\/mainfile.php&#8217;);<br \/>\nrequire(XOOPS_ROOT_PATH.&#8217;\/header.php&#8217;);<\/p>\n<p><span style=\"color: red\"><br \/>\n$xoops_module_header=&lt;&lt;&lt;HEADER<br \/>\n&lt;!&#8211; datatable includes below &#8211;&gt;<br \/>\n&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text\/css&#8221; href=&#8221;js\/yui\/build\/datatable\/assets\/skins\/sam\/datatable.css&#8221;&gt;<br \/>\n&lt;script src=&#8221;js\/yui\/build\/yahoo-dom-event\/yahoo-dom-event.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;script src=&#8221;js\/yui\/build\/element\/element-beta-min.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;script src=&#8221;js\/yui\/build\/datasource\/datasource-beta-min.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;script src=&#8221;js\/yui\/build\/datatable\/datatable-beta-min.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;!&#8211; loading panel includes below &#8211;&gt;<br \/>\n&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text\/css&#8221; href=&#8221;js\/yui\/build\/container\/assets\/container.css&#8221;&gt;<br \/>\n&lt;script src=&#8221;js\/yui\/build\/utilities\/utilities.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;script src=&#8221;js\/yui\/build\/container\/container.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;!&#8211; connection manager includes below &#8211;&gt;<br \/>\n&lt;script src=&#8221;js\/yui\/build\/yahoo\/yahoo-min.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;script src=&#8221;js\/yui\/build\/event\/event-min.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;script src=&#8221;js\/yui\/build\/connection\/connection-min.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;!&#8212; module javascript &#8211;&gt;<br \/>\n&lt;script src=&#8221;js\/module.js&#8221;&gt;&lt;\/script&gt;<br \/>\nHEADER;<\/span><\/p>\n<p><span style=\"color: red\"><strong><br \/>\n$xoopsTpl-&gt;assign(&#8216;xoops_module_header&#8217;,$xoops_module_header);<\/strong><br \/>\n<\/span><\/p>\n<p><span style=\"color: red\">$html=&lt;&lt;&lt;HTML<br \/>\n&lt;script language=&#8221;javascript&#8221;&gt;<br \/>\nshowDownloadCountHTML();<br \/>\n&lt;\/script&gt;<br \/>\n&lt;h2&gt;AJAX HTML output&lt;\/h2&gt;<br \/>\n&lt;div id=&#8221;DownloadTableHTML&#8221;&gt;&lt;\/div&gt;<br \/>\n&lt;h2&gt;AJAX YUI datatable&lt;\/h2&gt;<br \/>\n&lt;div id=&#8221;DownloadTableYUI&#8221;&gt;&lt;\/div&gt;<br \/>\nHTML;<\/span><\/p>\n<p><span style=\"color: red\">echo $html;<br \/>\n<\/span><\/p>\n<p>require(XOOPS_ROOT_PATH.&#8217;\/footer.php&#8217;);<br \/>\n?&gt;<\/p>\n<p><strong> 2008.2.15 \u52a0\u8a3b:<\/strong><\/p>\n<p>\u6700\u8fd1\u5728\u5beb admin \u7684\u6a21\u7d44\uff0c\u7531\u65bc admin \u9810\u8a2d\u7684\u6a23\u677f header \u5927\u90e8\u4efd\u90fd\u662f hard code\uff0c\u8981 customize \u7684\u8a71\uff0c\u5982\u679c client \u7aef\u662f Firefox \uff0c\u9019\u4e9b css\u3001js \u5916\u90e8 include \u6a94\u653e\u5728 body \u5167\u7684 script \u4e5f\u53ef\u4ee5\u6b63\u5e38\u904b\u4f5c\u3002\u5982\u679c\u8981\u540c\u6642\u76f8\u5bb9 Firefox\u3001Internet Explorer \u5247\u8981\u900f\u904e DOM \u52d5\u614b\u5c07 css\u3001js \u8f09\u5165\u653e\u9032 header\uff0c\u6709\u6a5f\u6703\u518d\u63d0\u4f9b\u8a73\u7d30\u7684\u7bc4\u4f8b\u3002<\/p>\n<p><strong>[ratings]<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>XOOPS \u9019\u500b CMS (Content Management System) \u5df2\u7d93\u98a8\u884c\u597d\u4e45\u4e86\uff0c\u6700\u8fd1\u624d\u6709\u6a5f\u6703\u4ed4\u7d30\u7684\u8a55\u4f30\u4e00\u4e0b\uff0c\u611f\u89ba\u4e0a\u6bd4 Mambo\u3001Joomla \u66f4\u6709\u5f48\u6027\uff0c\u5b98\u65b9\u7db2\u7ad9\u4e5f\u9ede\u51fa\u672a\u4f86\u7684\u65b9\u5411\u662f\u671d\u5411 Framework \u767c\u5c55\u3002\u5728\u5c08\u6848\u88e1\u7528\u4f86\u4f5c\u5f8c\u53f0\u61c9\u8a72\u4e0d\u932f\uff0c\u6bcf\u500b\u5ba2\u6236\u8981\u6c42\u7684\u529f\u80fd\u4ee5 module \u65b9\u5f0f\u958b\u767c\uff0c\u901f\u5ea6\u5feb\u3001\u7a0b\u5f0f\u78bc\u4e5f\u5bb9\u6613\u7dad\u8b77\u3002 \u7531\u65bc\u73fe\u5728\u5ba2\u6236\u7684\u80c3\u53e3\u90fd\u88ab\u990a\u5927\u4e86\uff0c\u8981\u6c42\u7684\u529f\u80fd\u5e38\u5e38\u8981\u7528\u5230 AJAX\uff0c\u4ee5\u5e38\u898b\u7684 Yahoo UI \u70ba\u4f8b\uff0c\u9019\u662f\u4e00\u500b javascript base \u7684 framework\uff0c\u5982\u4f55\u6574\u5408\u5728\u4e00\u8d77\u7684\u78ba\u662f\u82b1\u4e86\u9ede\u6642\u9593\u7814\u7a76\u3002 \u9996\u5148\u6211\u5011\u8981\u89e3\u6c7a\u5982\u4f55\u5d01\u5165\u6211\u5011\u7684 css \u53ca js \u6a94\uff0c\u6211\u5011\u4ee5\u9810\u8a2d\u7684 theme \u70ba\u4f8b\uff1a \u5728 themes\/default\/theme.html \u88e1\u6709\u4ee5\u4e0b2\u884c &lt;!&#8211; customized header contents &#8211;&gt; &lt;{$xoops_module_header}&gt; \u6211\u5011\u53ef\u4ee5\u5229\u7528\u7b2c2\u884c\u7684 smarty \u6a23\u677f\u5f15\u64ce\u8b8a\u6578\u52a0\u5165\u6211\u5011\u6240\u9700\u8981\u7684 css \u53ca javascript \u6a94\uff0c\u4ee5\u4e0b\u662f\u500b\u7c21\u55ae\u7684\u7bc4\u4f8b &lt;?php require(&#8216;..\/..\/mainfile.php&#8217;); require(XOOPS_ROOT_PATH.&#8217;\/header.php&#8217;); $xoops_module_header=&lt;&lt;&lt;HEADER &lt;!&#8211; datatable includes below &#8211;&gt; &lt;link [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[44,90],"class_list":["post-27","post","type-post","status-publish","format-standard","hentry","category-php","tag-javascript","tag-xoops"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27"}],"version-history":[{"count":4,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":737,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions\/737"}],"wp:attachment":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}