{"id":110,"date":"2004-09-20T23:43:10","date_gmt":"2004-09-20T21:43:10","guid":{"rendered":"http:\/\/frenchfragfactory.net\/ozh\/archives\/2004\/09\/20\/keeping-my-downloadplugins-directory-synched\/"},"modified":"2007-05-09T23:38:14","modified_gmt":"2007-05-09T21:38:15","slug":"keeping-my-downloadplugins-directory-synched","status":"publish","type":"post","link":"https:\/\/planetozh.com\/blog\/2004\/09\/keeping-my-downloadplugins-directory-synched\/","title":{"rendered":"Keeping my download\/plugins directory synch&#8217;ed"},"content":{"rendered":"<p>Just a tip I&#39;m posting here, more as a reminder for myself when I publish my next plugin, maybe it can be useful to a few :<\/p>\n<p>My actual wordpress plugins directory (wp-content\/plugins) contains plugins I&#39;m working on, and plugins I&#39;ve published. Here is my way of creating in my download directory (download\/plugins) a synched unprocessed .php highlighted copy of a plugin, as well as a .txt version. For example, my download directory contains a live non-working replica of my ip2nation plugin :<\/p>\n<ol>\n<li>In my \/download\/plugins dir, I create a file with the same name as the plugin : <a href=\"\/download\/plugins\/wp_ozh_ip2nation.php\">wp_ozh_ip2nation.php<\/a>\n<div id=\"ig-sh-1\" class=\"syntax_hilite\">\n\n\t\t<div class=\"toolbar\">\n\n\t\t<div class=\"view-different-container\">\n\t\t\t\t\t\t<a href=\"#\" class=\"view-different\">&lt; View <span>plain text<\/span> &gt;<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t<div class=\"language-name\">php<\/div>\n\n\t\t\n\t\t<br clear=\"both\">\n\n\t<\/div>\n\t\n\t<div class=\"code\">\n\t\t<ol class=\"php\" style=\"font-family:monospace\"><li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #000000;font-weight: bold\">&lt;?php<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #000088\">$file<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #0000ff\">&quot;\/home\/physical\/path\/to\/wp-content\/plugins\/wp_ozh_ip2nation.php&quot;<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #990000\">highlight_file<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #000088\">$file<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #000000;font-weight: bold\">?&gt;<\/span><\/div><\/li>\n<\/ol>\t<\/div>\n\n<\/div>\n\n<\/li>\n<li>Then the <a href=\"\/download\/plugins\/wp_ozh_ip2nation.txt\">.txt<\/a> version :\n<div id=\"ig-sh-2\" class=\"syntax_hilite\">\n\n\t\t<div class=\"toolbar\">\n\n\t\t<div class=\"view-different-container\">\n\t\t\t\t\t\t<a href=\"#\" class=\"view-different\">&lt; View <span>plain text<\/span> &gt;<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t<div class=\"language-name\">code<\/div>\n\n\t\t\n\t\t<br clear=\"both\">\n\n\t<\/div>\n\t\n\t<div class=\"code\">\n\t\t<ol class=\"code\" style=\"font-family:monospace\"><li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">ln -s \/home\/path\/to\/wp-content\/plugins\/wp_ozh_ip2nation.php wp_ozh_ip2nation.txt<\/div><\/li>\n<\/ol>\t<\/div>\n\n<\/div>\n\n<\/li>\n<\/ol>\n<p>This way, changes I make to the real plugin are automatically duplicated to the non-working version anyone can see and download. Another way would be of course to use some file to show source like for example at <a href=\"http:\/\/www.huddledmasses.org\/wp-content\/plugins\/source.php?file=image-headlines.php\">Huddled Masses<\/a>, but I wanted something more minimalistic (beware of his source.php, it&#39;s not compatible with most PHP installation and needs a few rewrite)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to keep my download dir up to date<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[2,3,10,76,245],"class_list":["post-110","post","type-post","status-publish","format-standard","hentry","tag-code","tag-linux","tag-php","tag-tips","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/comments?post=110"}],"version-history":[{"count":0,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/110\/revisions"}],"wp:attachment":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/media?parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/categories?post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/tags?post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}