{"id":46281,"date":"2013-05-22T09:49:49","date_gmt":"2013-05-22T09:49:49","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/parsnip\/"},"modified":"2015-05-15T11:01:13","modified_gmt":"2015-05-15T11:01:13","slug":"parsnip","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/parsnip\/","author":2128996,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"1.0.1","tested":"4.2.39","requires":"3.4","requires_php":"","requires_plugins":"","header_name":"Parsnip","header_author":"Zingiri","header_description":"","assets_banners_color":"","last_updated":"2015-05-15 11:01:13","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.zingiri.com\/donations","header_plugin_uri":"http:\/\/www.zingiri.com","header_author_uri":"http:\/\/www.zingiri.com\/","rating":5,"author_block_rating":0,"active_installs":10,"downloads":892,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"":"<p>Standard plugin upgrade method applies.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1539408","resolution":"2","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1539408","resolution":"3","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1539408","resolution":"1","location":"plugin"}},"screenshots":{"1":"First level parsing example","2":"Second level parsing example, following the links here above","3":"Example short code set-up"}},"plugin_section":[],"plugin_tags":[246,24416,5411,9309],"plugin_category":[],"plugin_contributors":[81344],"plugin_business_model":[],"class_list":["post-46281","plugin","type-plugin","status-closed","hentry","plugin_tags-html","plugin_tags-parse","plugin_tags-parser","plugin_tags-snippet","plugin_contributors-zingiri","plugin_committers-choppedcode","plugin_committers-erikpbogaerts"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/parsnip.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/parsnip\/trunk\/screenshot-1.png?rev=1539408","caption":"First level parsing example"},{"src":"https:\/\/ps.w.org\/parsnip\/trunk\/screenshot-2.png?rev=1539408","caption":"Second level parsing example, following the links here above"},{"src":"https:\/\/ps.w.org\/parsnip\/trunk\/screenshot-3.png?rev=1539408","caption":"Example short code set-up"}],"raw_content":"<!--section=description-->\n<p>This plugin allows you to parse HTML snippets from other websites in your own site.<\/p>\n\n<p>This is useful if you have for example a FAQ running on one of your systems and want to display the content in your Wordpress website.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>parsnip<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory or install via the Wordpress plugins menu.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Use [parsnip] short codes as explained in the FAQ section.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>There is no general configuration, the plugin works simply with short codes.\nIn the following example we will demonstrate how to parse a FAQ section of our own FAQ running on WHMCS into our Wordpress site.<\/p>\n\n<p>You can use shortcodes in the following format:<\/p>\n\n<p>[parsnip level=\"...\" url=\"...\" pre=\"...\" selectors=\"...\" nofollow=\"1\"]<\/p>\n\n<ul>\n<li>url: the URL you want to get a HTML snippet from, for example \"http:\/\/go.zingiri.com\/knowledgebase\/1019\/Bookings\"<\/li>\n<li>pre: the first part of the URL \"http:\/\/go.zingiri.com\"<\/li>\n<li>selectors: the jQuery style selectors to retrieve the portion of the HTML page that we want, for example \".contentpadded .row\". They can be comma separated in case you want to use multiple selections on the page. We use the <a href=\"http:\/\/code.google.com\/p\/phpquery\/\" title=\"phpQuery\">phpQuery<\/a> library for this, you will find more example on their site.<\/li>\n<li>level: parsing level, we'll come to this later<\/li>\n<li>nofollow: specifying nofollow=\"1\" will disable any links on the page you are retrieving<\/li>\n<\/ul>\n\n<p>So this would give:<\/p>\n\n<p>[parsnip url=\"http:\/\/go.zingiri.com\/knowledgebase\/1019\/Bookings\" pre=\"http:\/\/go.zingiri.com\/\" selectors=\".contentpadded .row\"]<\/p>\n\n<p>And this would display all the FAQ's for our Bookings plugin.<\/p>\n\n<p>Now we want to go a step further and be able to follow the links as well, for this we will use the 'level' attribute.<\/p>\n\n<p>[parsnip level=\"2\" url=\"http:\/\/go.zingiri.com\/knowledgebase\/1019\/Bookings\" pre=\"http:\/\/go.zingiri.com\/\" selectors=\".contentpadded h2,.contentpadded blockquote\"]<\/p>\n\n<p>Note that both [parsnip] short codes go together on the page like this:<\/p>\n\n<p>[parsnip url=\"http:\/\/go.zingiri.com\/knowledgebase\/1019\/Bookings\" pre=\"http:\/\/go.zingiri.com\/\" selectors=\".contentpadded .row\"]\n[parsnip level=\"2\" url=\"http:\/\/go.zingiri.com\/knowledgebase\/1019\/Bookings\" pre=\"http:\/\/go.zingiri.com\/\" selectors=\".contentpadded h2,.contentpadded blockquote\"]<\/p>\n\n<p>You will now be able to view the Bookings FAQs and also to open individual links.<\/p>\n\n<p>You can also set level=\"*\" in which case the same selectors are used on all pages.<\/p>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Verified compatibility with Wordpress 4.2.2<\/li>\n<li>Fixed issue with parsing of links<\/li>\n<li>Added new \"nofollow\" option<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release<\/li>\n<\/ul>","raw_excerpt":"Include HTML snippets from other sites in your own site","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/46281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=46281"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/erikpbogaerts"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=46281"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=46281"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=46281"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=46281"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=46281"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=46281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}