Plugin / Hosted Content Importer (HCI)

Bimal Poudel

Description

Description

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 Snippes)
  • jotform: ✔ implemented (Embed Web Forms)
  • markdown: ✔ implemented (Parse remote markdown files)
  • qr: ✔ implemented
    1. For Custom Data,
    2. 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: Embeding a gist code from GitHub

[third source="gist" id="000000000000" section="filename.php"]

Create your gists at GitHub.

Example: Embeding 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: Embeding 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

  1. File name: class.processor_YOURNAME.inc.php
  2. Method: public function fetch($form_id = null, $section = null).
    • Process your content.
    • Return HTML string.
    • For references, see class.processor_none.inc.php
  3. Use as: [third source="YOURNAME" section=""]

Click for real examples.

Just that much easy drop-in replacement.

Banner Image

Used from unsplash.com

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.