Hosted Content Importer (HCI)
It imports third party hosted contents within WordPress blog. You can define from which url/resource to fetch the content. The original source may be editable by anyone else whom you trust. Thus, it logically empowers you to allow other users to externally edit a particular section of your blogs. And, you do not have to give them any access credentials of your website. After installation, use shortcode tag [third] with few parameters as: [third source="markdown" id="https://goo.gl/UpclKH" section=""] source is a content processor type. id is a URL or ID given by the third parties. section is an optional parameter to access deeper content. cache is a boolean directive whether to reuse the cached content. It will then embed remote markdown content inside your blog. Additionally, it will convert the text into HTML using Parsedown. Parameters source: Where to seek the data (eg. Content Hosting Server). Examples: analytics: ✔ implemented (Google Analytics) file: ✔ implemented (Read from local file) gist: ✔ implemented (Embed Gist Snippets) jotform: ✔ implemented (Embed Web Forms) markdown: ✔ implemented (Parse remote markdown files) qr: ✔ implemented For Custom Data, For current page’s URL youtube: ✔ implemented (Embeds a YouTube Video) database: Partially implemented, and left for developers url, api: Work in progress wikipedia: Work in progress, Strategy: Content JSON to Data Section The list is not limited, you expand it. Join/Fork Development id: Content ID (unique identifier) of the data you want. Often: Full URLs Database IDs Resource IDs provided by Service Providers eg. YouTube Video ID, JotForm Form ID, … Full Path of a Local File section: Additional parameter to identify the specific section of the content. Example: Parsing a remote .md file [third source="markdown" id="https://goo.gl/UpclKH" section=""] Learn to write your .md file. Example: Embedding a gist code from GitHub [third source="gist" id="000000000000" section="filename.php"] Create your gists at GitHub. Example: Embedding a JotForm [third source="jotform" id="000000000000" section=""] Create your own web form at JotForm website. Example: Reading a server’s local file [third source="file" id="/tmp/readme.txt" section=""] It has to be a static file for security reasons. For example, if you read the .php file, it will NOT process it, rather read its contents only. Your can contain valid HTML data, css and javascripts. Example: Accessing database – Expand it yourself [third source="database" id="0" section="recent"] Detailed implementations are left for the developers because of the nature. It is a proof of concept work. Please feel free to modify/expand it. Example: Custom QR Code [third source="qr" id="YOUR DATA" section=""] Example: QR Code for Current Page (Full URL) [third source="qr" id="url" section="internal"] The above example is a full code. If you embed it anywhere, it lets your users copy that page’s URL into their mobile. Example: Embedding a YouTube Video [third source="youtube" id="v00000000000" section=""] Choose your video from YouTube. Personalized Content Processors You may often consider writing your own Content Processor. Refer to Custom Content Processor section in [Other Notes] tab. Custom Content Processors If you want to develop your own Content Processor, it is much easier now. Just create a tiny class file inside classes/processors as like one of the existing one. Simple examples are YouTube, JotForm and Gist processors. Minimum requirements File name: class.processor_YOURNAME.inc.php Method: public function fetch($form_id = null, $section = null). Process your content. Return HTML string. For references, see class.processor_none.inc.php Use as: [third source="YOURNAME" section=""] Click for real examples. Just that much easy drop-in replacement. Banner Image Used from unsplash.com Cable Cars and Rope: Represents contents coming from various sources.
Top keywords
- section17×2.77%
- id16×2.61%
- content15×2.44%
- source13×2.12%
- third13×2.12%
- file11×1.79%
- example10×1.63%
- third source10×1.63%
- implemented8×1.30%
- url7×1.14%
- youtube7×1.14%
- data6×0.98%
WP Github Gist
WP Github Gist WordPress Plugin, provides the ability to embed gist and files from Github in your blog posts or pages. Even though Github doesn’t provide a way to embed files, this Plugin still works by using the gist-it service. Features Embed Gist To embed a gist you have to use the following shortcode [gist id = "{GIST_ID}" file = "{GIST_FILE}" width = "{WIDTH}" height = "{HEIGHT}"] The following are the different attributes that you can use in the shortcode id – Id of your gist. file – File inside gist that you want to display. If there is only one file in the gist, then you can ignore this. width – Width of the code wrapper. Default is 100%. height – Height of the code wrapper. Default is 100%. eg: [gist id = "12345" file = "myfile" width = "100%" height = "100%"] Embed Github files To embed a github file you have to use the following shortcode [github file = "{GITHUB_FILE}" start_line = "{START_LINE}" end_line = "{END_LINE}"] {GITHUB_FILE} – full path to your github file. eg: If you want to embed https://github.com/sudar/MissileLauncher/blob/master/MissileLauncher.cpp then {GITHUB_FILE} would be /sudar/MissileLauncher/blob/master/MissileLauncher.cpp {START_LINE} – If you want to embed only part of the file, then you can specify the starting line number (optional) {END_LINE} – If you want to embed only part of the file, then you can specify the ending line number (optional) eg: [github file = "/sudar/MissileLauncher/blob/master/MissileLauncher.cpp"] if you want to embed only part of the file, then you can specify the start and end line as well [github file = "/sudar/MissileLauncher/blob/master/MissileLauncher.cpp" start_line = "10" end_line = "20"] Changing Gist-it server By default, this Plugin uses my own gist-it server which is hosted on a free Google App Engine account. If you expect significant amount of traffic to your blog, then do consider using your own gist-it server. You can follow the instructions to deploy your own gist-it server and then go to the settings page to change the url. Translation The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know. I will add it to the Plugin after giving credit to you. Support Support for the Plugin is available from the Plugin’s home page. If you have any questions or suggestions, do leave a comment there or contact me in twitter. Readme Generator This Readme file was generated using wp-readme, which generates readme files for WordPress Plugins.
Top keywords
- file20×4.58%
- github13×2.97%