{"id":2296,"date":"2011-08-17T00:42:17","date_gmt":"2011-08-16T16:42:17","guid":{"rendered":"https:\/\/www.wopus.org\/?p=2296"},"modified":"2011-08-17T00:42:17","modified_gmt":"2011-08-16T16:42:17","slug":"%e4%b8%bawordpress%e4%b8%bb%e9%a2%98%e6%b7%bb%e5%8a%a0%e5%9b%be%e7%89%87%e6%9a%97%e7%ae%b1%e7%89%b9%e6%95%88","status":"publish","type":"post","link":"https:\/\/wopus.org\/?p=2296","title":{"rendered":"\u4e3aWordPress\u4e3b\u9898\u6dfb\u52a0\u56fe\u7247\u6697\u7bb1\u7279\u6548"},"content":{"rendered":"<p>\u6240\u8c13\u7684\u6697\u7bb1\uff0c\u5c31\u662f\u70b9\u51fb\u5c0f\u56fe\u7247\u5f39\u51fa\u7a97\u53e3\u5e76\u663e\u793a\u5927\u56fe\u7247\uff0c\u7c7b\u4f3c\u7684Wordpress\u63d2\u4ef6\u4f17\u591a\uff0c\u6bd4\u5982\uff1awp-slimbox2\u3001jQuery Lightbox\u3001jQuery Colorbox\u3001Gameplorer`s WPColorBox\u3001shadowbox-js\u3001Auto Highslide\u7b49\u7b49\uff0c\u529f\u80fd\u6548\u679c\u90fd\u76f8\u4f3c\u3002\u5176\u5b9e\u4e0d\u7528\u63d2\u4ef6\u7b80\u5355\u51e0\u6b65\u5c31\u53ef\u5c06\u8fd9\u4e00\u7279\u6548\u96c6\u6210\u5230WordPress\u4e3b\u9898\u4e2d\uff0c\u800c\u4e14\u52a0\u8f7d\u7684\u6587\u4ef6\u4e5f\u6bd4\u63d2\u4ef6\u5c0f\u7684\u591a\u3002\u559c\u6b22\u6298\u817e\u7684\u7ae5\u978b\u53ef\u4ee5\u53c2\u7167\u4e0b\u9762\u7684\u65b9\u6cd5\u64cd\u4f5c\uff1a<\/p>\n<p><strong>\u9996\u5148\uff0c<\/strong>\u4e0b\u8f7d\u6240\u9700\u6587\u4ef6\uff0c\u89e3\u538b\u540e\u5c06pirobox\u6587\u4ef6\u5939\u5185\u7684\u6240\u6709\u6587\u4ef6\u653e\u5230\u4f60\u6240\u4f7f\u7528\u4e3b\u9898\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n<p>\u6587\u4ef6\u4e0b\u8f7d\uff1a<a href=\"http:\/\/www.wopus.cn\/wp-content\/uploads\/2011\/08\/pirobox.zip\">pirobox<\/a><\/p>\n<p><strong>\u5176\u6b21\uff0c<\/strong>\u6253\u5f00\u4e3b\u9898header\u6a21\u7248\u6587\u4ef6\uff0c\u5728&lt;\/head&gt;\u524d\u9762\uff0c\u5206\u522b\u6dfb\u52a0\uff1a<\/p>\n<p><span style=\"color: #800000;\">\u6240\u9700\u6837\u5f0f\uff1a<\/span><\/p>\n<p><code>&lt;link rel=\"stylesheet\" href=\"&lt;?php bloginfo('template_url'); ?&gt;\/img\/style.css\" \/&gt;<\/code><\/p>\n<p><span style=\"color: #800000;\">\u5fc5\u987b\u7684jquery.min.js\u53ca\u7279\u6548pirobox.min.js\u6587\u4ef6:<\/span><br \/>\n<code>&lt;script type=\"text\/javascript\" src=\"&lt;?php bloginfo('stylesheet_directory'); ?&gt;\/js\/jquery.min.js\" &gt;&lt;\/script&gt;<br \/>\n&lt;script type=\"text\/javascript\" src=\"&lt;?php bloginfo('template_directory'); ?&gt;\/js\/pirobox.min.js\"&gt;&lt;\/script&gt;<br \/>\n&lt;script type=\"text\/javascript\"&gt;<br \/>\n$(document).ready(function() {<br \/>\n$().piroBox({<br \/>\nmy_speed: 400, \/\/animation speed<br \/>\nbg_alpha: 0.3, \/\/background opacity<br \/>\nslideShow : true, \/\/ true == slideshow on, false == slideshow off<br \/>\nslideSpeed : 4, \/\/slideshow duration in seconds(3 to 6 Recommended)<br \/>\nclose_all : '.piro_close,.piro_overlay'\/\/ add class .piro_overlay(with comma)if you want overlay click close piroBox<br \/>\n});<br \/>\n});<br \/>\n&lt;\/script&gt;<\/code><\/p>\n<p>\u5982\u679c\u4f60\u6240\u4f7f\u7528\u7684\u4e3b\u9898\u5df2\u52a0\u8f7d\u4e86jquery.js\uff0c\u53ef\u4ee5\u514d\u53bbjquery.min.js\u6587\u4ef6\u52a0\u8f7d\u4ee3\u7801\u3002<\/p>\n<p><strong>\u6700\u540e\uff0c<\/strong>\u96c6\u6210\u8be5\u7279\u6548\u9664\u4e86\u52a0\u8f7d\u5fc5\u987b\u7684JS\u548c\u6837\u5f0f\u6587\u4ef6\uff0c\u5173\u952e\u662f\u4e3a\u65e5\u5fd7\u4e2d\u7684\u56fe\u7247\u94fe\u63a5\u81ea\u52a8\u6dfb\u52a0JS\u7279\u6548\u6240\u9700\u7684\u56fa\u5b9a\u6807\u7b7e\u5c5e\u6027\uff08class=&#8221;pirobox_gall&#8221;\uff09\u3002\u5c06\u4e0b\u9762\u4ee3\u7801\u6254\u5230\u4e3b\u9898functions.php\u4e2d<\/p>\n<p><code><br \/>\nadd_filter('the_content', 'pirobox_gall_replace');<br \/>\nfunction pirobox_gall_replace ($content)<br \/>\n{\u00a0\u00a0 global $post;<br \/>\n$pattern = \"\/&lt;a(.*?)href=('|\")([^&gt;]*).(bmp|gif|jpeg|jpg|png)('|\")(.*?)&gt;(.*?)&lt;\/a&gt;\/i\";<br \/>\n$replacement = '&lt;a$1href=$2$3.$4$5 class=\"pirobox_gall\"$6&gt;$7&lt;\/a&gt;';<br \/>\n$content = preg_replace($pattern, $replacement, $content);<br \/>\nreturn $content;<br \/>\n}<\/code><\/p>\n<p>\u5b8c\u6210\u6697\u7bb1\u7279\u6548\u96c6\u6210\uff0c\u7b80\u5355\u5427\u3002\u4e4b\u540e\uff0c\u70b9\u51fb\u65e5\u5fd7\u4e2d\u7684\u56fe\u7247\uff0c\u5c31\u4f1a\u534e\u4e3d\u5730\u5f39\u51fa\u7a97\u53e3\u5c55\u793a\u8be5\u65e5\u5fd7\u4e2d\u6240\u6709\u63d2\u5165\u7684\u56fe\u7247\uff0c\u53ef\u624b\u52a8\u64ad\u653e\u4e5f\u53ef\u4ee5\u81ea\u52a8\u64ad\u653e\u3002\u4e0b\u9762\u7684\u6f14\u793a\u662f\u901a\u8fc7shadowbox-js\u63d2\u4ef6\u5b9e\u73b0\u7684\uff0c\u771f\u6b63\u96c6\u6210\u540e\u7684\u6548\u679c\u8981\u6bd4\u8fd9\u4e2a\u70ab\u3002\u6216\u8005\u5230\u6211\u7684\u7ad9\uff1a<a href=\"http:\/\/zmingcx.com\/gallery\/enjoy\" target=\"_blank\">http:\/\/zmingcx.com\/gallery\/enjoy<\/a> \u67e5\u770b\u771f\u5b9e\u6548\u679c\u3002<\/p>\n<blockquote>\n<p style=\"text-align: center;\"><a class=\"pirobox_gall first\" href=\"http:\/\/photo.staticsdo.com\/a1\/264\/341\/278\/67171-772704496-8_765.jpg\" rel=\"1&amp;nbsp;of&amp;nbsp;4\" rev=\"0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/photo.staticsdo.com\/a1\/264\/222\/79\/67172-772704496-8_765.jpg\" alt=\"\" width=\"120\" height=\"75\" \/><\/a> <a class=\"pirobox_gall\" href=\"http:\/\/photo.staticsdo.com\/a1\/56\/129\/108\/67167-772704496-8_765.jpg\" rel=\"2&amp;nbsp;of&amp;nbsp;4\" rev=\"1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/photo.staticsdo.com\/a1\/376\/220\/244\/67168-772704496-8_765.jpg\" alt=\"\" width=\"120\" height=\"75\" \/><\/a> <a class=\"pirobox_gall\" href=\"http:\/\/photo.staticsdo.com\/a1\/312\/330\/421\/67169-772704496-8_765.jpg\" rel=\"3&amp;nbsp;of&amp;nbsp;4\" rev=\"2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/photo.staticsdo.com\/a1\/120\/394\/396\/67170-772704496-8_765.jpg\" alt=\"\" width=\"120\" height=\"75\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><a class=\"pirobox_gall last item\" href=\"http:\/\/photo.staticsdo.com\/a1\/184\/188\/304\/67166-772704496-8_765.jpg\" target=\"_blank\" rel=\"4&amp;nbsp;of&amp;nbsp;4\" rev=\"3\">\u65e0\u56fe\u50cf\u53ea\u6709\u56fe\u7247\u94fe\u63a5\u4e00\u6837\u4f1a\u663e\u793a\u7279\u6548\u70b9\uff08\u51fb\u94fe\u63a5\u67e5\u770b\u6548\u679c\uff09<\/a><\/p>\n<\/blockquote>\n<p style=\"text-align: left;\">\u53e6\u5916\uff0c\u96c6\u6210\u8be5\u63d2\u4ef6\u540e\uff0c\u5982\u679c\u65e5\u5fd7\u4e2d\u6709\u591a\u5f20\u56fe\u7247\uff0c\u53ea\u9700\u6b63\u5e38\u63d2\u5165\u4e00\u5f20\u5c31\u53ef\u4ee5\u4e86\uff0c\u5176\u5b83\u53ea\u9700\u63d2\u5165\u56fe\u7247\u94fe\u63a5\uff0c\u53ef\u4ee5\u52a0\u5feb\u9875\u9762\u6253\u5f00\u901f\u5ea6\u3002<\/p>\n<p style=\"text-align: left;\">\u4e3e\u4e00\u53cd\u4e09\uff0c\u4f60\u4e5f\u53ef\u4ee5\u5c1d\u8bd5\u5c06<a href=\"http:\/\/www.pirolab.it\/pirobox\/\" target=\"_blank\">http:\/\/www.pirolab.it\/pirobox\/<\/a>\u4e2d\u7684\u7279\u6548\u96c6\u6210\u5230\u4e3b\u9898\u4e2d\uff0c\u8fd9\u4e2a\u7279\u6548JS\u5f39\u51fa\u7a97\u53e3\uff0c\u53ef\u9002\u5e94\u5c4f\u5e55\u7684\u5927\u5c0f\uff0c\u5e76\u53ef\u79fb\u52a8\uff0c\u5173\u952e\u5c31\u662f\u4e3a\u56fe\u7247\u94fe\u63a5\u6dfb\u52a0\u4e0d\u540c\u7684\u6807\u7b7e\u5c5e\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6240\u8c13\u7684\u6697\u7bb1\uff0c\u5c31\u662f\u70b9\u51fb\u5c0f\u56fe\u7247\u5f39\u51fa\u7a97\u53e3\u5e76\u663e\u793a\u5927\u56fe\u7247\uff0c\u7c7b\u4f3c\u7684Wordpress\u63d2\u4ef6\u4f17\u591a\uff0c\u6bd4\u5982\uff1awp-slimbox2\u3001jQuery Lightbox\u3001jQuery Colorbox\u3001Gameplorer`s WPColorBox\u3001shadowbox-js\u3001Auto Highslide\u7b49\u7b49\uff0c\u529f\u80fd\u6548\u679c\u90fd\u76f8\u4f3c\u3002\u5176\u5b9e\u4e0d\u7528\u63d2\u4ef6\u7b80\u5355\u51e0\u6b65\u5c31\u53ef\u5c06\u8fd9\u4e00\u7279\u6548\u96c6\u6210\u5230WordPress\u4e3b\u9898\u4e2d\uff0c\u800c\u4e14\u52a0\u8f7d\u7684\u6587\u4ef6\u4e5f\u6bd4\u63d2\u4ef6\u5c0f\u7684\u591a\u3002\u559c\u6b22\u6298\u817e\u7684\u7ae5\u978b\u53ef\u4ee5\u53c2\u7167\u4e0b\u9762\u7684\u65b9\u6cd5\u64cd\u4f5c\uff1a \u9996\u5148\uff0c\u4e0b\u8f7d\u6240\u9700\u6587\u4ef6\uff0c\u89e3\u538b\u540e\u5c06pirobox\u6587\u4ef6\u5939\u5185\u7684\u6240\u6709\u6587\u4ef6\u653e\u5230\u4f60\u6240\u4f7f\u7528\u4e3b\u9898\u7684\u76ee\u5f55\u4e2d\u3002 \u6587\u4ef6\u4e0b\u8f7d\uff1apirobox \u5176\u6b21\uff0c\u6253\u5f00\u4e3b\u9898header\u6a21\u7248\u6587\u4ef6\uff0c\u5728&lt;\/head&gt;\u524d\u9762\uff0c\u5206\u522b\u6dfb\u52a0\uff1a \u6240\u9700\u6837\u5f0f\uff1a &lt;link rel=&#8221;stylesheet&#8221; href=&#8221;&lt;?php bloginfo(&#8216;template_url&#8217;); ?&gt;\/img\/style.css&#8221; \/&gt; \u5fc5\u987b\u7684jquery.min.js\u53ca\u7279\u6548pirobox.min.js\u6587\u4ef6: &lt;script type=&#8221;text\/javascript&#8221; src=&#8221;&lt;?php bloginfo(&#8216;stylesheet_directory&#8217;); ?&gt;\/js\/jquery.min.js&#8221; &gt;&lt;\/script&gt; &lt;script type=&#8221;text\/javascript&#8221; src=&#8221;&lt;?php bloginfo(&#8216;template_directory&#8217;); ?&gt;\/js\/pirobox.min.js&#8221;&gt;&lt;\/script&gt; &lt;script type=&#8221;text\/javascript&#8221;&gt; $(document).ready(function() { $().piroBox({ my_speed: 400, \/\/animation speed bg_alpha: 0.3, \/\/background opacity slideShow : true, \/\/ true == slideshow on, false == slideshow off slideSpeed : 4, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[543,747],"class_list":["post-2296","post","type-post","status-publish","format-standard","hentry","category-wordpress-deepin","category-diy-themes","tag-wordpress-theme","tag-747"],"_links":{"self":[{"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/posts\/2296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wopus.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2296"}],"version-history":[{"count":0,"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/posts\/2296\/revisions"}],"wp:attachment":[{"href":"https:\/\/wopus.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wopus.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wopus.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}