ååãªçç±ã«ããã Lurkmore.ruã«ããéé£ã«ããããããã Herb Sutter ã Mark Shuttleworth ãããã³ä»ã®å€ãã®äººãWordpressã䜿çšããŠããŸãã ããšãã°ãç§ã
ç§ã®æçš¿ã§ã¯ãä»ã®äººã®ããã°ãé »ç¹ã«åç §ããŠããŸãã ãããŠãã¢ã€ãã¢ãæãã€ãã-ããã¯ããŒã ã®é£ã«ãç§ã玹ä»ãã人ã圌ã®ãµãŒãã¹ã®ã¢ã€ã³ã³ãèŠããŠã¿ãŸãããïŒ ããšãã°ãTwitterããã®é³¥ãããã°ã¹ãããããã®æçŽBã§ããããïŒ ãŠã£ãããã£ã¢ãªã©ã«ãåæ§ã®æ©èœããããå€ãã®ããã°ãã¹ãããããèš±å¯ããŠããŸãïŒDreamwidthãªã©ïŒã
ãã®ãããWordpress Rikkiã®WP Social Iconsã®ãã©ã°ã€ã³ãèªçããŸããã ããŠã¹ã1åã¯ãªãã¯ããã ãã§ããœãŒã·ã£ã«ãããã¯ãŒã¯ããGitHubãŸã§ããããããµãŒãã¹ã®ã¢ã«ãŠã³ãã«ãªã³ã¯ãè¿œå ã§ããŸãã
ãªãã§ïŒ
Wordpressçšã®ãã©ã°ã€ã³ã®äœææ¹æ³ã«é¢ããèšäºã¯å€æ°ãããŸãããäœæ¥äžã«ééãããã°ã«ã€ããŠã®èšäºã¯ãããŸããã§ããã ãããã£ãŠãç§ã¯ç§ã®å°è±¡ãæžãçããŠããŸã-çªç¶èª°ããåããã®ã«åºããããŸããã圌ã¯æ±ºå®ããæ¹æ³ãç¥ããŸããã ãããŠããã¬ãŒãã³ã°äŸã§ã¯éåžžçç¥ãããŠãããã¹ãŠã®æ¹åç¹ã瀺ããŸãã
äœæ¥äžãç§ã¯ä»ã®äººã®ãã©ã°ã€ã³ã®ãœãŒã¹ã³ãŒããšJenyayã®éçºã®å€ãã䜿çšããŸããïŒåœŒã®äžé£ã®èšäºãžã®ãªã³ã¯ã¯ä»é²ã«ãããŸãïŒã ãããããè·äººçããªå®è£ ã§ã¯äžååã§ããã ãã©ã°ã€ã³ã¯ãåãšã³ããŠãŒã¶ãŒãèªåã§å€æŽã§ãããã䟿å©ã§ãã ãããã£ãŠãæ°ãããµãŒãã¹ã®ãµããŒããè¿œå ããã«ã¯ã5åãš1åã®åã€ã³ã¹ããŒã«ã ãã§æžã¿ãŸãã
ç¹ã«ä»äºã¯ãç§ããã®ãã©ã°ã€ã³ãèªåã§äœ¿çšããã®ã«åœ¹ç«ã¡ãŸããïŒã€ãŸããã¢ã¡ãªã«ã®ååãèšãããã«ã ããã°ããŒããé£ã¹ã ïŒã ãããŠãã©ãã§äœãæ¹åã§ããããæããŠãããã®ã¯ãæåã®ã¹ã±ããã«å¯ŸããèŠçã§ããã
ããã°ã©ã å¯èœ
èšèšäž
ãããããWordpressçšã®ãã©ã°ã€ã³ã®äœæã¯ç°¡åã§ã¯ãããŸãããã éåžžã«ç°¡åã§ãã äœãããç¶æ¿ãããã¯ã©ã¹ãäœæãããããã©ãŒããããè³¢ãããããããã€ãã®ããªãããŒãªä»æ§ã«åŸãå¿ èŠã¯ãããŸããã ãã€ãã³ããã¯ãã倧ãã¢ããªã±ãŒã·ã§ã³ã®ã€ãã³ããšã»ãŒåæ§ã«æ©èœããç¹å¥ãªãªããžã§ã¯ãã«é 眮ãããŸãã
æåã«ãå¿ èŠãªãã®ã«ã€ããŠæ éã«èããå¿ èŠããããŸãã ãŸããåã ã®åèªãããŒã¯ããæ¹æ³ãå¿ èŠã§ããããã¯ãç·šéæã«è¡šç€ºãããæçš¿ãããŒãžãRSSã®ãªã³ã¯ã«èªåçã«å€æãããŸãã
ã·ã§ãŒãã³ãŒãã¯éåžžã«ãã䌌ãŠããŸã-è§æ¬åŒ§ã§å²ãŸãããã©ã°ã€ã³ã«ããåŠççšã«ç¹å¥ã«èª¿æŽãããç¹å¥ãªã¿ã°ã§ãã 圌ãã¯2008幎ã«ãªãªãŒã¹ãããå¥ã®ããŒãžã§ã³2.5ãç»å Žããã®ã§ãäºææ§ã«é¢ããç¹å¥ãªåé¡ã¯ç§ãã¡ãè ãããŠããŸããã
ãŠãŒã¶ãŒããã©ã®åœ¢åŒãåãå ¥ããå¿ èŠããããŸããïŒ ãªããªã æçµçãªHTMLã³ãŒãã¯ã¢ã€ã³ã³ãšURLã®ã¿ãç°ãªããŸãããããåŠçããã·ã§ãŒãã³ãŒããšé¢æ°ã1ã€ããã®ã¯è«ççã§ãã ãã©ã¡ãŒã¿ãä»ããŠè¿œå æ å ±ãéä¿¡ããããšãã§ããããã¯éåžžã«äŸ¿å©ã§ãã ããã«ãäœæããã·ã§ãŒãã³ãŒããå°ãªãã»ã©ãä»ã®ãã©ã°ã€ã³ãšç«¶åããå¯èœæ§ãäœããªããŸãã
ç§ã®ã·ã§ãŒãã³ãŒãã¯æ¬¡ã®ããã«ãªããŸããã
[ãŠãŒã¶ãŒID]
ãã®ãã©ã¡ãŒã¿ãŒã¯æ¬¡ã®ãšããã§ãã
ãidãã¯ãªãã·ã§ã³ã®ãã©ã¡ãŒã¿ãŒã§ãã idãããŒããŒã¯ãµãŒãã¹ã«ç»é²ãããŸãã ããšãã°ã ããŒãã«ãºå®¶æã
ãã¿ã€ãã-ãµãŒãã¹
ãurlãã¯ãªãã·ã§ã³ã®ãã©ã¡ãŒã¿ãŒã§ãã åç §ããURLïŒããšãã°ããããã¡ã€ã«ãŸãã¯å¥ã®ããã°æçš¿ïŒã
ãããŠã次ã®ããã«äœ¿çšããŸãã
[userid type="blogspot" id="torvalds-family"]Linus Torvalds[/userid]
ãŸãã¯ïŒ
[userid type="blogspot" url="http://blogspot.com"]blogspot[/userid]
ã«ãŒãã«ãæžã
ãã©ã°ã€ã³ã®æ§é ãäœæãïŒ GitHubãåç §ïŒãrikkis-wp-social-icons.phpã§ãããã¥ã¢ã«ãŒãã«ã®æŠèŠã説æããŸãã
class socialusers { var $options = array( "blogspot" => "http://%s.blogspot.com/", "ljuser" => "http://%s.livejournal.com/", "ljcomm" => "http://livejournal.com/community/%s", "liruboy" => "http://www.liveinternet.ru/users/%s/", "lirugirl" => "http://www.liveinternet.ru/users/%s/", "vk" => "http://vk.com/%s", "twitter" => "http://twitter.com/#!/%s/", "facebook" => "http://www.facebook.com/%s", "google_plus" => "https://plus.google.com/%s", "wordpress" => "http://%s.wordpress.com/", "habrahabr" => "http://%s.habrahabr.ru/", "github" => "http://github.com/users/%s/" ); function socialusers(){ if (!function_exists ('add_shortcode') ) return; add_shortcode('userid', array (&$this, 'icon_func') ); } function icon_func($atts, $content="") { if (!$content) return ""; extract( shortcode_atts ( array('id' => null, 'type' => null, 'url' => null), $atts ) ); if (!$type || !array_key_exists($type, $this->options) ) return $content; if (!$id) $id = $content; $userinfo_url = esc_url(($url) ? $url : sprintf($this->options[$type], trim($id))); $userpic_url = esc_url(plugins_url( "js/img/$type.gif" , __FILE__ )); return "<span style='white-space: nowrap; display: inline !important;'><a href='$userinfo_url' ref='nofollow'><img src='$userpic_url' alt='[info]' width='17' height='17' style='vertical-align: bottom; border: 0; padding-right: 1px;vertical-align:middle; margin-left: 0; margin-top: 0; margin-right: 0; margin-bottom: 0;' /></a><a href='$userinfo_url' ref='nofollow'><b>$content</b></a></span>"; } } $socialusers = new socialusers();
å€æ°åã®ç«¶åãåé¿ããããã«ããã¹ãŠã®åŒã³åºãããœãŒã·ã£ã«ãŠãŒã¶ãŒã®1ã€ã®ã¯ã©ã¹ã«å ¥ããŸãã optionså€æ°ã¯ãåç §ãããµãŒãã¹ã®idãšURLãæ ŒçŽãããŠãŒã¶ãŒåãïŒ sã«çœ®ãæããŸãã js / imgãã©ã«ããŒã«ã察å¿ããã¢ã€ã³ã³ãšãšãã«gifãé 眮ããŸãã
ã³ã³ã¹ãã©ã¯ã¿ãŒã§ãWordpressãã·ã§ãŒãã³ãŒãããµããŒãããŠãããã©ããã確èªãããµããŒãããŠããªãå Žåã¯äœãããŸããã ãŠãŒã¶ãŒãå€ãããŒãžã§ã³ã䜿çšããŠãããšããçç±ã ãã§ãWordpresså šäœããŠãŒã¶ãŒã«å ¬éããã®ã¯è¯ããããŸããã
ãã¹ãŠãæ£åžžãªå Žåããã³ãã©ãŒãšåãã¯ã©ã¹ã€ã³ã¹ã¿ã³ã¹ããicon_funcé¢æ°ãæå®ããŠãæ°ããã·ã§ãŒãã³ãŒããè¿œå ããŸãã
icon_func-éåžžã«çããéåžžã«èå³æ·±ãã 2ã€ã®ãã©ã¡ãŒã¿ãŒãå«ãŸããŸãã
$ atts-å±æ§ã®é å
$ content-ã¿ã°éã®ããã¹ã
ã·ã§ãŒãã³ãŒãã®ä»£ããã«ããŠãŒã¶ãŒã«ã¯ãã®é¢æ°ãè¿ããã®ã衚瀺ãããŸãã ãããã¯ã®æçµã³ãŒãã圢æãããã®ã¯ããïŒæåŸã®æ»ãå€ïŒã§ãã
ã³ã¡ã³ãããã®ã¢ããã€ã¹ã«ãããšããå ¥åãã«ãªã£ããã¹ãŠã®è¡ã¯ãã»ãã¥ãªãã£ããŒã«ããªãããã«esc_urlãä»ããŠãã§ãã¯ãããŸãã
次ã®2è¡ã«æ³šæããŠãã ããã
extract( shortcode_atts ( array('id' => null, 'type' => null, 'url' => null), $atts ) ); </<source> $atts <source lang="php"> plugins_url( "js/img/$type.gif" , __FILE__ );
çŸåšã®ãã£ã¬ã¯ããªãåºæºã«ããŠãã¿ã€ãå¥ã«ã¢ã€ã³ã³ã®URLãååŸããŸãã ããã__FILE__å±æ§ã®ç®çã§ãã ããã§ãªãå ŽåïŒããã³ããã€ãã®ãã©ã°ã€ã³ãšäŸã®äœæè ãæããã«èããŠããªãå ŽåïŒããã©ã°ã€ã³ãã£ã¬ã¯ããªã®ååãæ¿å ¥ããå¿ èŠããããŸãããããã§ãæ©èœããªãå¯èœæ§ããããŸãã
$ idã«å¯ŸããŠtrimïŒïŒãå®è¡ããããšãåæ§ã«éèŠã§ãã å®éã®ãšãããWordpressã®ãšãã£ã¿ãŒã§åèªãããã«ã¯ãªãã¯ãããšããã®åèªã®åŸã«ã¹ããŒã¹ãä»ããŠåŒ·èª¿è¡šç€ºãããŸã ã ãã®çµæãå®å šã«äžé©åãªã¹ããŒã¹ãæã€ã¢ã«ãŠã³ãåãååŸããããªã³ã¯ã¯æ©èœããŸããã
ååãšããŠããã§ã«ãã®åœ¢åŒïŒ17è¡ã®ã³ãŒã+ 14è¡ã®èšå®ïŒã§ããã©ã°ã€ã³ãã€ã³ã¹ããŒã«ããŠäœ¿çšã§ããŸãã æ¬ç©ã®ããã«ãŒããŠã£ã³ããŠã€ã³ã¿ãŒãã§ãŒã¹ã軜spiããŠããŸã:)ã éåžžã®ãã©ã°ã€ã³ãã€ã³ã¹ããŒã«ããã®ã§ãphpãšç»åãzipã§ããã¯ããwordpressã«ã€ã³ã¹ããŒã«ããŠã¿ãŠãã ããã
ãã®ãããªå®éšã«ã¯ããŒã«ã«ã®Apache + PHP + mySQLãããããŠãããã«å ããŠWordpressã眮ãããšã匷ããå§ãããŸãã ãããã°ã¯ãã£ãšæ¥œãããªããŸã-ããšãã°ãã€ã³ã¹ããŒã«ãšåã€ã³ã¹ããŒã«ã®ä»£ããã«ã察å¿ãããã£ã¬ã¯ããªã®ãã¡ã€ã«ãåçŽã«çœ®ãæããããšãã§ããŸãã
ãã¿ã³ãè¿œå
Wordpressã¯ãå¥ã®tinyMCEã³ã³ããŒãã³ãã§æçš¿ãšããŒãžãç·šéããŸãã ã¡ã€ã³ã®PHPããååŸããã«ã¯ãå ã®ãã©ãŒã ããããã«æ¡åŒµããå¿ èŠããããŸãã
class socialusers { var $options = array( "blogspot" => "http://%s.blogspot.com/", "ljuser" => "http://%s.livejournal.com/", "ljcomm" => "http://livejournal.com/community/%s", "liruboy" => "http://www.liveinternet.ru/users/%s/", "lirugirl" => "http://www.liveinternet.ru/users/%s/", "vk" => "http://vk.com/%s", "twitter" => "http://twitter.com/#!/%s/", "facebook" => "http://www.facebook.com/%s", "google_plus" => "https://plus.google.com/%s", "wordpress" => "http://%s.wordpress.com/", "habrahabr" => "http://%s.habrahabr.ru/", "github" => "http://github.com/users/%s/" ); function socialusers(){ if (!function_exists ('add_shortcode') ) return; add_shortcode('userid', array (&$this, 'icon_func') ); add_filter( 'mce_buttons_3', array(&$this, 'mce_buttons') ); add_filter( 'mce_external_plugins', array(&$this, 'mce_external_plugins') ); } function icon_func($atts, $content="") { if (!$content) return ""; extract( shortcode_atts ( array('id' => null, 'type' => null, 'url' => null), $atts ) ); if (!$type || !array_key_exists($type, $this->options) ) return $content; if (!$id) $id = $content; $userinfo_url = esc_url(($url) ? $url : sprintf($this->options[$type], trim($id))); $userpic_url = esc_url(plugins_url( "js/img/$type.gif" , __FILE__ )); return "<span style='white-space: nowrap; display: inline !important;'><a href='$userinfo_url' ref='nofollow'><img src='$userpic_url' alt='[info]' width='17' height='17' style='vertical-align: bottom; border: 0; padding-right: 1px;vertical-align:middle; margin-left: 0; margin-top: 0; margin-right: 0; margin-bottom: 0;' /></a><a href='$userinfo_url' ref='nofollow'><b>$content</b></a></span>"; } function mce_external_plugins($plugin_array) { $plugin_array['rikkisocialicons'] = plugins_url ('js/rikkis-wp-social-icons-editor_plugin.js', __FILE__ ); return $plugin_array; } function mce_buttons($buttons) { return array_merge($buttons, array_keys($this->options)); } } $socialusers = new socialusers();
ããã§ã¯ãã¹ãŠãç°¡åã§ã-mce_external_pluginsã¯JavaScriptãããŒããããã¿ã³ãçæãããŸããmce_buttonsã¯ããã«ãªãã·ã§ã³èŸæžãããã¹ãŠã®ããŒãé 眮ããŸãã
次ã«ããã¿ã³çšã®JavaScriptãäœæããå¿ èŠããããŸãã æ®å¿µãªãããtinyMCEã¯Wordpressã«éåžžã«ãã£ãããšçµã¿èŸŒãŸããŠãããããPHPããWordpressãã©ã°ã€ã³ã®JavaScriptã«ãã©ã¡ãŒã¿ãŒãæž¡ãæšæºçãªæ¹æ³ã¯ããã§ã¯æ©èœããŸããã ãã¡ãããJSonã䜿çšããŠããããååŸããå®éã«1ãæã§ã®ã¿ä¿®æ£ãè¡ãå¿ èŠãããããšã確èªã§ããŸãã ããããããã¯äºçŽ°ãªå©äŸ¿æ§ãé倧ãªåé¡ãåŒãèµ·ããå¯èœæ§ãããå Žåãšåãã§ãã
tinyMCEãã©ã°ã€ã³ã®ãã¬ãŒãã³ã°ã¯ããªãæšæºçã§ãïŒ
(function() { tinymce.create('tinymce.plugins.RikkiSocialIconsPlugin', { init : function(ed, url) { // } }, getInfo : function() { return { // , }; } }); tinymce.PluginManager.add('rikkisocialicons', tinymce.plugins.RikkiSocialIconsPlugin); })();
éžæããããã¹ããã©ã°ã¡ã³ããã·ã§ãŒãã³ãŒãã®ã·ã§ãŒãã³ãŒãã§ãã¬ãŒã åãããã¿ã³ã1ã€è¿œå ãããšã次ã®ããã«ãªããŸãã
ed.addCommand('mce-blogspot', function() { var newcontent = '[userid type="blogspot"]' + tinyMCE.activeEditor.selection.getContent({format : 'raw'}) + '[/userid]'; tinyMCE.activeEditor.selection.setContent(newcontent); }); ed.addButton('blogspot', { title : 'blogspot', md : 'mce-blogspot', image : url + '/img/blogspot.gif' });
ãã¡ããããã©ã°ã€ã³ãããèªäœãæ§æãããšããäºå®ã«ãã§ã«æ £ããŠãããŠãŒã¶ãŒã¯ãã«ãŒãå ã§ãã¿ã³ãçæããããšããŸãã
(function() { tinymce.create('tinymce.plugins.RikkiSocialIconsPlugin', { var newButtons = ["ljuser", "ljcomm", "liruman", "lirugirl", "ljr", "vk", "twitter"]; tinymce.create('tinymce.plugins.LjusersPlugin', { init : function(ed, url) { var newButtonsLength = newButtons.length, i = 0; while(i < newButtonsLength){ var itemTitle = newButtons[i]; var itemCommand = 'mce'+itemTitle; ed.addCommand(itemCommand, function() { var newcontent = '[userid type="'+itemTitle+'"]' + tinyMCE.activeEditor.selection.getContent({format : 'raw'}) + '[/userid]'; tinyMCE.activeEditor.selection.setContent(newcontent); }); ed.addButton(itemTitle, { title : itemTitle, cmd : itemCommand, image : url + '/img/'+itemTitle+'.gif' }); i++; } }, getInfo : function() { return { longname : 'Rikki\'s WP Social Icons', author : 'Rikki Mongoose', authorurl : 'http://rikkimongoose.ru', infourl : 'http://rikkimongoose.ru/projects/rikkis-wp-social-icons/', version : "1.0" }; } }); tinymce.PluginManager.add('rikkisocialicons', tinymce.plugins.RikkiSocialIconsPlugin); })();
ãããŠãããã§ã-ããããã¯ããã°ã©ããŒã®ããã«åãã¹ãã§ã¯ãããŸãããïŒ
ãã®æ¹æ³ã§ãã¿ã³ãçæããŠãããšãã£ã¿ãŒã«åãæ¿ãããšãããã«ã¹ãã«ã«èªããæããã§ãããã é åã«ç€ºãããŠãããã¿ã³ã¯äžŠãã§ãããåãã¿ã³ã«ã¯ãµã€ã蚪åè ãŸãã¯RSSãã£ãŒããªãŒããŒã«è¡šç€ºããããã®ãšåãã¢ã€ã³ã³ããããŸãã ãšãŠãå¿«é©ã§ãïŒ
ãã®ã³ãŒãã¯çŽ æŽãããèŠããŸããã1ã€ã®æ¬ ç¹ããããŸã-æ©èœããŸãã ã ããã¯ãtinyMCEã§ããªããåŸ ã£ãŠããæåã®ãã°ã§ãã äžèŠããã¿ã³ã¯æãæ®éã®ããã«èŠããŸã-ããããã¯ãªãã¯ãããšã ãããããæåŸã®èŠçŽ ãæã€ã·ã§ãŒãã³ãŒããæ¿å ¥ããããšãããããŸã -ç§ãã¡ã®å Žåãtwitterã
ã³ã¡ã³ãã§ææ¡ãããŠããããã«ãã¯ããŒãžã£ãŒãä»ããŠãã¹ãŠ
(function() { var newButtons = ["ljuser", "google_plus", "wordpress", "habrahabr", "github"]; tinymce.create('tinymce.plugins.RikkiSocialIconsPlugin', { init : function(ed, url) { for ( i in newButtons) { var itemTitle = newButtons[i]; (function(itemTitle) { var itemCommand = 'mce'+itemTitle; ed.addCommand(itemCommand, function() { var newcontent = '[userid type="'+itemTitle+'"]' + tinyMCE.activeEditor.selection.getContent({format : 'raw'}) + '[/userid]'; tinyMCE.activeEditor.selection.setContent(newcontent); }); ed.addButton(itemTitle, { title : itemTitle, cmd : itemCommand, image : url + '/img/'+itemTitle+'.gif' }); })(itemTitle); } }, getInfo : function() { return { longname : 'Rikki\'s WP Social Icons', author : 'Rikki Mongoose', authorurl : 'http://rikkimongoose.ru', infourl : 'http://rikkimongoose.ru/projects/rikkis-wp-social-icons/', version : "1.0" }; } }); tinymce.PluginManager.add('rikkisocialicons', tinymce.plugins.RikkiSocialIconsPlugin); })();
ãã¹ãã«ããããã®ãªãã·ã§ã³ãé©åã«æ©èœããããšã瀺ãããŸããã ã³ã¡ã³ããŒã¿ãŒã«æ å ãïŒ
ãã®ãªãã·ã§ã³ã¯ãã§ã«ã¯ããã«åªããŠããŸã-åãã¿ã³ã¯ãã®å Žæãç¥ã£ãŠãããå¿ èŠãªåäœãããŸãã
æåŸã«ãããªãã«å®å šã«äŸåãã2çªç®ã®ãã°ããããŸãã ãŸããWordpressãtinyMCEãããã³Internet Explorerã§ãããéåžžã«äŸ¿å©ã§ã¯ãªããšã©ãŒåŠçãé€ããŠéé£ãããŸããã倧éã®è¡æ¶²ãå°ç¡ãã«ããå¯èœæ§ããããŸãã
èãããããšã©ãŒã¯ãtinymce.PluginManager.addïŒparam1ãparam2ïŒé¢æ°ã«é¢ä¿ããŠããŸãã æ éã«æžããŠãã ããã
param1ã¯ãphpãã¡ã€ã«ã®æ°ãããã¿ã³ã®idé åãè¿œå ããããŒãšäžèŽããå¿ èŠããããŸãã ç§ã®å Žåã ' rikkisocialicons 'ãå¿ èŠã§ãïŒPHPã«ã¯$ plugin_array [' rikkisocialicons ']ãããããïŒã
param2ã¯ãtinymce.createïŒïŒã§äœæããããã®ãšäžèŽããå¿ èŠããããŸãã ç§ã®å Žåãããã¯tinymce.plugins.RikkiSocialIconsPluginã§ãïŒã¹ã¯ãªããã§ã¯tinymce.createïŒ ' tinymce.plugins.RikkiSocialIconsPlugin 'ïŒãšèšè¿°ããŠããããïŒ
ããã®ãããããäžèŽããªãå Žåããšãã£ã¿ãŒã¯ãã¿ã³ä»ãã®ããã«ã倱ããã³ã³ãœãŒã«ã¯çºçãã ' k is undefined 'ãšã©ãŒãå ±åããŸã...ãã¡ãããå§çž®ãããjQuery.min.jsã§ããããã°ãã³ãŒã«ãèŠãŠã¯ãããããªæ©äŒã§ã¯ãããŸããã
ãµãŒãã¹Xã®ã¢ã€ã³ã³ãè¿œå ããæ¹æ³ã¯ïŒ
ãŸãã GitHubã«ã¢ã¯ã»ã¹ã㊠ãæ£ããã¢ã€ã³ã³ã®ãã©ãŒã¯ãæ¢ã«è¡šç€ºãããŠãããã©ããã確èªããŸããïŒ ããã§ãªãå Žåã¯ãèªåã§å®è¡ããŠãã ããã
- æ®ãã®ã¢ã€ã³ã³ãããåããã£ã¬ã¯ããªã«gif圢åŒã§ä¿åããŸã
- ããŒãgifã®ååãšäžèŽãããURLã眮æããURLãšäžèŽããããŠãŒã¶ãŒåãïŒ sã«çœ®ãæããŸãïŒãã®æ©äŒã«ããã®æç¹ã§ãã¹ãŠã®C ++ããã°ã©ããŒã«æšæ¶ãéããŸãïŒããã£ãšæããããæããã§ãããïŒã
- ãã¿ã³ãJavaScriptã«ç§»åããå Žåã¯ãåãIDãæã€èŠçŽ ãnewButtonsé åã«è¿œå ããŸã
- ãã¹ãŠãZIPã§æ¢±å
- ãã©ã°ã€ã³ã®å€ãããŒãžã§ã³ãåæããŠåé€ããŸãã æçš¿ã®ã·ã§ãŒãã³ãŒãã¯åœ±é¿ãåããŸããã®ã§ãå®å¿ãã ããã
- æŽæ°ãããããŒãžã§ã³ãããŠã³ããŒãããã¢ã¯ãã£ããŒãããŠã楜ãã¿ãã ãã
ãã¿ã³ã®é åºã¯ãPHPãã¡ã€ã«ã®é åºã«ãã£ãŠç°ãªããŸãã
以äžã§ãïŒ
ãã©ã°ã€ã³ã¯Wordpressãã£ã¬ã¯ããªã«ãããŸãã ããã§ããŸãã¯GitHub㧠ãããªãã®ã¹ã¿ã³ãã¢ãã³ããã°ããã¬ã³ãã£ãªã¢ã€ã³ã³ã§è£ 食ããããšèšã£ãŠãèè ãåã°ããããšãã§ããŸãã ãŸããããªãŒã å¹ ã¢ã€ã³ã³ãŸãã¯ãã®ä»ã®xangaã§ãããžã§ã¯ããè£å®ã§ããŸãã
ã«ã¿ãã°ã«è¿œå ãã
æ®ã£ãæåŸã®ã¹ãããã¯ãæšæºã®æ€çŽ¢ã䜿çšããŠèŠã€ããããšãã§ããããã«ãWordpressãã£ã¬ã¯ããªã«ãã©ã°ã€ã³ãè¿œå ããããšã§ãã
ãã¡ãããäºåã«ãã©ã°ã€ã³ããããŒã«readme.txtãšæšæºã³ã¡ã³ããè¿œå ããããšãå¿ããªãã§ãã ããã ããããªããšããŠãŒã¶ãŒã¯èªåãèšå®ããŠãããã®ãèŠã€ããããšãã§ããŸããã
æé å šäœã«ã€ããŠã¯ã è±èªçã®å€§ããªããã¥ã¢ã«ã«è©³ãã説æãããŠããŸã ã
ãããŠãåŸ ã€ããšãã§ããªã人ã®ããã«-ããã«çãã¹ããããã€ã¹ãããã¬ã€ãããããŸãïŒ
- wordpress.orgã«ã¢ã¯ã»ã¹ããŠãããã«ã¢ã«ãŠã³ããäœæããŸã
- ãã¹ã¯ãŒããååŸããŸãã ãã®äžã«é²ã¿ããã©ã°ã€ã³ã®è¿œå ããŒãžã«ç§»åããŸã ã ZIPãžã®ãªã³ã¯ãããããããååãšèª¬æãæžããPostãéä¿¡ããŸãã
- ä»ãããªãã¯åŸ ããªããã°ãªããŸããã ããã¥ã¢ã«ããã®ãã©ã°ã€ã³ã¯18æéèæ ®ãããŸããããç§ã®ãã©ã°ã€ã³ã¯4æéããããŸãããã¬ãã¥ãŒãçµäºãããã¹ãŠãããŸããããšããµãŒããŒã«ç©ºã® SVNãã£ã¬ã¯ããªã衚瀺ãããŸãã
- ããŒã«ã«ã§ãã©ã«ããŒãäœæããããã§ãã§ãã¯ã¢ãŠããè¡ãããã©ã°ã€ã³ãåãæšãŠãŠã³ããŒããŸãã ZIPãå§çž®ããå¿ èŠã¯ãããŸãã ãtruncã§ã³ãããããåŸããµãŒããŒäžã®ã¹ã¯ãªããã¯ãã¹ãŠãèªåçã«å§çž®ããŸãã
- ã³ãããããŸãã
- http://wordpress.org/extend/plugins/rikkis-wp-social-icons/ããŒãžã«ã¢ã¯ã»ã¹ããŸã ã rikkis-wp-social-iconsã®ä»£ããã«ããã©ã°ã€ã³ã®ååã眮ãæããŸãã
- http://wordpress.org/extend/plugins/ããŒãžã«ã¢ã¯ã»ã¹ããææ°ã®ãã©ã°ã€ã³ã®ãªã¹ãã泚ææ·±ãèŠãŠãã ããã ããã«åœŒã¯ãç§ãã¡ã®ãã³ãµã ãªç·ã§ãïŒ
äœããæ©èœããªãã£ãå Žåã¯ã倧ããªããã¥ã¢ã«ãåç §ããŠãã ããã ããã«ã¯ãã¹ãŠãéåžžã«è©³ããæžãããŠããŸãã
ãã¡ããã芧ãã ãã
- Wordpressãã£ã¬ã¯ããªå
- GitHubå ¬åŒä»£è¡š
- GitHubããããŠã³ããŒã
- Jenyayã®ãªãªãžãã«èšäº- ããŒã1 ã ããŒã2 ã ããŒã3 ã
äœè ã¯ããããžã§ã¯ãã®githubããŒãžã§ã³ããæ顧ããã ããããã«çºå±ãããŠããããã¹ãŠã®äººã«æè¬ããŸãã