{"id":3127,"date":"2008-06-09T06:53:03","date_gmt":"2008-06-09T06:53:03","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/file-inliner\/"},"modified":"2009-05-14T21:07:33","modified_gmt":"2009-05-14T21:07:33","slug":"file-inliner","status":"publish","type":"plugin","link":"https:\/\/bal.wordpress.org\/plugins\/file-inliner\/","author":557892,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.2.0","stable_tag":"1.2.0","tested":"2.7.1","requires":"2.0","requires_php":"","requires_plugins":"","header_name":"File Inliner","header_author":"Philip Abbet","header_description":"","assets_banners_color":"","last_updated":"2009-05-14 21:07:33","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.idiap.ch\/~pabbet\/personal-projects\/wordpress-file-inliner-plugin\/","header_author_uri":"http:\/\/www.idiap.ch\/~pabbet","rating":0,"author_block_rating":0,"active_installs":10,"downloads":3760,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.1.1","1.2.0"],"block_files":[],"assets_screenshots":{"screenshot-4.png":{"filename":"screenshot-4.png","revision":"1539224","resolution":"4","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1539224","resolution":"2","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1539224","resolution":"3","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1539224","resolution":"1","location":"plugin"}},"screenshots":{"1":"Inlining of a text file","2":"Inlining of a C++ file, with syntax highlighting (using CodeHighlighter)","3":"Inlining of a Python file, with syntax highlighting (using CodeHighlighter),\nand a download link","4":"Inlining of some lines of a Python file, with syntax highlighting (using\nCodeHighlighter), and a download link"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1214,88,3936,749],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-3127","plugin","type-plugin","status-publish","hentry","plugin_tags-code","plugin_tags-files","plugin_tags-inline","plugin_tags-text","plugin_committers-kanma"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/file-inliner.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/file-inliner\/trunk\/screenshot-1.png?rev=1539224","caption":"Inlining of a text file"},{"src":"https:\/\/ps.w.org\/file-inliner\/trunk\/screenshot-2.png?rev=1539224","caption":"Inlining of a C++ file, with syntax highlighting (using CodeHighlighter)"},{"src":"https:\/\/ps.w.org\/file-inliner\/trunk\/screenshot-3.png?rev=1539224","caption":"Inlining of a Python file, with syntax highlighting (using CodeHighlighter),\nand a download link"},{"src":"https:\/\/ps.w.org\/file-inliner\/trunk\/screenshot-4.png?rev=1539224","caption":"Inlining of some lines of a Python file, with syntax highlighting (using\nCodeHighlighter), and a download link"}],"raw_content":"<!--section=description-->\n<p>This plugin displays the content of a file in a post. The content of the file\n(called a \"snippet\") is put in a <code>&lt;pre&gt;&lt;\/pre&gt;<\/code> block by default.<\/p>\n\n<p>It has the following advantages over pasting the content of the file in your post\nyourself:<\/p>\n\n<ul>\n<li>When the file is modified, no need to modify the posts referring to it<\/li>\n<li>Indentation is preserved by default (useful to show code snippets)<\/li>\n<li>Can optionally provide a link to the file (no need to copy-paste your snippet)<\/li>\n<\/ul>\n\n<p>If requested (see the <code>preserveformat<\/code> parameter), the content of the file\nis put in a <code>&lt;div&gt;&lt;\/div&gt;<\/code> block, with each line (delimited by\nthe carriage return) in its own <code>&lt;p&gt;&lt;\/p&gt;<\/code> block.<\/p>\n\n<h4>Usage<\/h4>\n\n<p>Syntax: <code>[file lang=\"some_lang\" start=\"a_line_number\" end=\"a_line_number\" link=\"on_or_off\" style=\"some_style_properties\" preserveformat=\"on_or_off\"]path\/to\/your\/file[\/file]<\/code><\/p>\n\n<p>Note: The order of the attributes is mandatory!<\/p>\n\n<h4>Example: Inlining of a file<\/h4>\n\n<p>In your post, write <code>[file]path\/to\/your\/file[\/file]<\/code>. That's it!<\/p>\n\n<h4>Example: Using a syntax highlighter plugin<\/h4>\n\n<p>If you write <code>[file lang=\"cpp\"]path\/to\/your\/file[\/file]<\/code> (for instance),\nand if the syntax highlighter plugin you use supports\nthe <code>&lt;pre lang=\"*\"&gt;&lt;\/pre&gt;<\/code> syntax (most does), then the content\nof your file will be processed by the syntax highlighter plugin as usual.<\/p>\n\n<h4>Example: Provide a link to the file<\/h4>\n\n<p>If you write <code>[file link=\"on\"]path\/to\/your\/file[\/file]<\/code>, a link will\nbe automatically added to the top left of the text area.<\/p>\n\n<h4>Example: Inline a subset of a file<\/h4>\n\n<p>If you write <code>[file start=\"10\" end=\"20\"]path\/to\/your\/file[\/file]<\/code>,\nonly the lines 10 to 20 of the file will be displayed. You can omit the start\n(ie. \"from beginning to line 20\") or the end (ie. \"from line 10 to the end of\nthe file\") if you want.<\/p>\n\n<h4>Example: Set the color of the text to red<\/h4>\n\n<p>In your post, write <code>[file style=\"color: #FF0000;\"]path\/to\/your\/file[\/file]<\/code>.<\/p>\n\n<h4>Example: Prevent the plugin to process a [file][\/file] block<\/h4>\n\n<p>Just write <code>[file off]your content[\/file]<\/code>.<\/p>\n\n<p>Note: The 'off' attribute must come BEFORE any other ones.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>fileinliner.php<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How is the content of the file retrieved by the plugin?<\/dt>\n<dd><p>The PHP function\n<a href=\"http:\/\/fr.php.net\/manual\/en\/function.file-get-contents.php\"><code>file_get_contents<\/code><\/a>\nis used. Your file must be readable by the web server.<\/p><\/dd>\n<dt>Can I use a URL instead of a path to the file?<\/dt>\n<dd><p>From the <a href=\"http:\/\/fr.php.net\/manual\/en\/function.file-get-contents.php\"><code>file_get_contents<\/code><\/a>\ndocumentation: A URL can be used as a filename with this function if the\n<a href=\"http:\/\/fr.php.net\/manual\/en\/filesystem.configuration.php#ini.allow-url-fopen\">fopen wrappers<\/a>\nhave been enabled.<\/p>\n\n<p>Check your server configuration.<\/p><\/dd>\n\n<\/dl>","raw_excerpt":"This plugin displays the content of a file in a post.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/3127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=3127"}],"author":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/kanma"}],"wp:attachment":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=3127"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=3127"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=3127"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=3127"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=3127"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=3127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}