{"id":5923,"date":"2009-06-21T17:21:13","date_gmt":"2009-06-21T17:21:13","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/external-files\/"},"modified":"2009-06-21T17:21:13","modified_gmt":"2009-06-21T17:21:13","slug":"external-files","status":"publish","type":"plugin","link":"https:\/\/th.wordpress.org\/plugins\/external-files\/","author":12889,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1","stable_tag":"trunk","tested":"2.8","requires":"2.5","requires_php":"","requires_plugins":"","header_name":"External file","header_author":"Adam Hopkinson","header_description":"","assets_banners_color":"","last_updated":"2009-06-21 17:21:13","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/adamhopkinson.co.uk\/","header_plugin_uri":"http:\/\/adamhopkinson.co.uk","header_author_uri":"http:\/\/adamhopkinson.co.uk","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2601,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1214,3986,2864],"plugin_category":[],"plugin_contributors":[96005],"plugin_business_model":[],"class_list":["post-5923","plugin","type-plugin","status-publish","hentry","plugin_tags-code","plugin_tags-highlight","plugin_tags-scripts","plugin_contributors-adamh","plugin_committers-adamh"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/external-files.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>External files provides a shortcode <em>[external]<\/em> which can be used to insert the contents of a file or url into the current post or page. The plugin will automatically format the text based on the extension (for files) or mime type (for urls), using Alex Gorbatchevs' <a href=\"http:\/\/alexgorbatchev.com\" title=\"More about Syntax Highlighter\">Syntax Highlighter<\/a> javascript.<\/p>\n\n<p>The shortcode can accept three optional parameters:<\/p>\n\n<ul>\n<li><em>format<\/em> can be used to specify a highlighting format, rather than letting the plugin decide which format to use<\/li>\n<li><em>start<\/em> specifies a line number to output from, so sections of a file\/url can be shown<\/li>\n<li><em>end<\/em> specifies the line to stop at<\/li>\n<\/ul>\n\n<p>See the installation page for usage examples.<\/p>\n\n<p>The available formats are:<\/p>\n\n<ul>\n<li>AS3<\/li>\n<li>Bash<\/li>\n<li>Cpp<\/li>\n<li>CSharp<\/li>\n<li>Css<\/li>\n<li>Delphi<\/li>\n<li>Diff<\/li>\n<li>Groovy<\/li>\n<li>Java<\/li>\n<li>JavaFX<\/li>\n<li>JScript<\/li>\n<li>Perl<\/li>\n<li>Php<\/li>\n<li>Plain<\/li>\n<li>PowerShell<\/li>\n<li>Python<\/li>\n<li>Ruby<\/li>\n<li>Scala<\/li>\n<li>Sql<\/li>\n<li>Vb<\/li>\n<li>Xml<\/li>\n<\/ul>\n\n<h3>Future features<\/h3>\n\n<p>Following is a list of ideas and features to add:<\/p>\n\n<ul>\n<li><em>BASE_PATH<\/em> and <em>BASE_URL<\/em> options that can be used in the shortcode to avoid typing the same long path\/url each time<\/li>\n<li>a list of available formats with the checkboxes to enable\/disable each individually, thus avoiding having to load all of them<\/li>\n<li>an option for changing the theme of the syntax highlighter<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin and activate<\/li>\n<li>In a post or page, type [external]\/path\/to\/your\/script.txt[\/external]<\/li>\n<\/ol>\n\n<p>Examples:<\/p>\n\n<p>[external]\/path\/to\/file.php[\/external]\n[external]http:\/\/my.website.com\/about.html[\/external]\n[external start=10 end=20]\/very\/long\/script.js[\/external]\n[external format=xml]\/not\/really\/a-php-document.php[\/external]<\/p>\n\n<!--section=faq-->\n<p><em>My code isn't being highlighted<\/em><\/p>\n\n<p>This might mean that the theme you are using doesn't call wp_footer before the closing body tag. The javascript that applies the highlighter is attached to the wp_footer action - either try another theme (the default wordpress theme will work) or add the theme by typing the following inside the closing body tag:<\/p>\n\n<pre><code>&lt;?php wp_footer(); ?&gt;\n<\/code><\/pre>\n\n<p><em>My code should be formatted as *x<\/em>, but is showing up as plain*<\/p>\n\n<p>If you are specifying a format, are you using one from the available formats list (see the Description page)? If you are not specifying a format, does the file have a correct extension for the file type or is the web page returning with the correct Content-Type header?<\/p>\n\n<p><em>I'm still stuck<\/em><\/p>\n\n<p>Get in touch, I'll see what I can do!<\/p>\n\n<!--section=changelog-->\n<h4>0.1<\/h4>\n\n<p><em>2009-06-21<\/em>\n* First version! Works for me, comments appreciated.<\/p>","raw_excerpt":"External files allows an author to insert the contents of an external file or url into a post, with the text automatically highlighted accordingly.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/5923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=5923"}],"author":[{"embeddable":true,"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/adamh"}],"wp:attachment":[{"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=5923"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=5923"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=5923"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=5923"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=5923"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/th.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=5923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}