Greek English
You are here Home » Using Elxis » Third party extensions » Mikro blog

Mikro blog

Last update by Elxis Team

Micro blog with multiple articles sources: User, RSS, Twitter, REST API.

Mikro is a micro blogging component for Elxis developed by Ioannis Sannos. It can fetch remote content automatically and create listings without user interfere. The content can be fetched from various Twitter accounts and RSS or ATOM XML feeds as well as from any web application like, mobile apps, or other sites via an JSON/XML REST API. Mikro also brings front-end authoring into Elxis CMS. The frontend section is fully AJAX driven. Supports categories, tags, articles rating, image galleries, YouTube videos, it has full statistics, uses lazy loading on images to reduce bandwidth, it has internal module positions, renders nicely on mobile devices and tablets, and many more. You can download Mikro for free from EDC.

Most important features

  • Fetch automatically messages from multiple Twitter accounts.
  • Fetch automatically messages from multiple RSS or ATOM feeds.
  • Post messages from site's frontend section.
  • Post messages from everywhere via an XML/JSON REST API.
  • Control who is allowed to post messages.
  • Upload images or use remote ones.
  • Upload images and create an image gallery on each article.
  • Display videos from YouTube.
  • User rating on articles.
  • Remote posts collector with configurable frequency (how often to check for new posts on remote sources).
  • Excellent display on mobile devices and tables
  • Lazy loading on images to save you bandwidth (images load as you scroll down).
  • Tags support for free articles grouping.
  • Unlimited categories (articles can belong to a category or not).
  • Option to put remote articles into specific categories.
  • Full traffic statistics in the administration section.
  • Frontend debug and administration report for Collector.
  • Control what kind of articles to display in Mikro frontpage.
  • Special pages: all articles, user submitted articles, articles from RSS sources, articles from Twitter, articles submitted vie the REST API
  • AJAX powered "more articles link" in listing pages.
  • User articles can be assigned to a specific language.

Frontpage

By default all messages are been displayed in Mikro frontpage. You can change that in component configuration parameters. Below are the available options.

source:all    (All articles - default)
source:user    (User submitted articles)
source:rss    (Articles from RSS/ATOM Feeds)
source:twitter    (Articles from Twitter)
source:api    (REST API submitted articles)
category:X    (Articles from category with ID X)
user:X    (Articles submitted by user with ID X)

User authoring

Mikro allows users to submit articles from frontend. Off course this can be disabled if you only what to fetch articles from remote sources. In component configuration you can set who is allowed to submit new articles. You can set access rules based on user access level or user ID. Multiple rules are supported by using a comma (,) as separator.

Examples

  • level:100 Users with a minimum access level of 100 (Administrators) are allowed to submit articles.
  • level:50 Users with a minimum access level of 50 (Administrators, Managers, Publishers) are allowed to submit articles.
  • level:2 Users with a minimum access level of 2 (All site users) are allowed to submit articles.
  • user:8 The user with ID 8 is allowed to submit articles.
  • user:8,user:12 Users with ID 8 and 12 are allowed to submit articles.
  • level:100,user:4,user:15 Administrators (level 100) and users with ID 4 and 15 are allowed to submit articles.

For users having access to submit articles Mikro displays a special toolbar on top of list pages. Login and then visit Mikro. Click on the pensil icon to display the new article submission form. Click it again to hide the form.


Things to note when you submit articles

Although Title is optional we highly recommend you to provide one. Text is limited to the maximum number of characters you have set in Mikro configuration (from 150 to 2000). Long Text, if enabled, has no length limitation. You can provide a link and a title for the link that points to more information about the article. This link can either be a full URL or an Elxis URI (example content:something/test.html). If you re-publish an article from an other site it is recommended to provide a link to the original article's source. If you dont provide a title for the link it will be used the word More. If you want to display a video from YouTube provide the video ID as seen on YouTube (example: o3sq1yq2-ao). For image you can either upload an image from your computer or copy-paste the full URL to an image on any site.

To convert any word of Text or Large Text to a tag just add the hash symbol infront of it. Example: Mikro is a component for #elxis CMS

When ready click Submit to save the article.On success the editing form slides up and the new post appears in top of the existing articles list.


Image galleries

You can upload images and create galleries to ANY article (even those from remote sources). To do so click on the small gallery icon in the bottom of the article. A pop-up window will show up with an image upload form (JPEG, JPG and PNG images are allowed, no GIFs). From the same window you can delete existing gallery images.

Mikro blog article's footer buttons explained
Mikro blog article's footer buttons explained

Messages from RSS / ATOM feeds and Twitter

You can provide up to 3 RSS/ATOM feeds URLs and up to 3 Twitter accounts from which Mikro will collect articles. For each source you can set the Collector frequency from 15 minutes (higher) to 1 day (lowest). Don't set frequency too high if the remote source does not get frequently updated. Also note that gathering messages from remote sources is a slow process and you dont want this to happen too often without a good reason. Mikro has a special tool that handles gathering articles from remote sources, the Collector. The Collector is executed when someone visits Mikro frontpage. In order not to always run there is a percentage probability that determines if the Collector will finally run or not. By default this probability is 10%*. If your site has high traffic lower this value. If not, raise it. The Collector also has an internal timer which makes sure a remote source will not be requested unless a certain time has passed since the last request (based on given source update frequency). These information might seem too technical for some people but it is good to know how Mikro works in order to configure it better.

* A 10% probability means that if you click Mikro's frontpage 10 times the Collector will executed once. A 5% probability means that in order for the Collector to be executed you need 20 clicks on Mikro's frontpage (as probabilities are based on a random generator the number of clicks shown here are average).


What happens when the Collector runs?

When the Collector runs it gathers new articles from the remote source and saves them into Elxis database. So these messages exist localy even if the remote source deletes them (except from the article image with is saved as an external link). The Collector will request one source per time (to reduce page loading time). On next run the Collector will request the next source and so on. Mikro also gives you the option for each remote source to assign its articles to a local category.


Debug the Collector

Login as administrator and visit Mikro frontpage. Put ?debug=1 in Mikro's URL and click enter in your browser. This will force the Collector to be executed regardless the given probability. A report will be displayed with what the Collector did.

http://www.example.com/mikro/?debug=1

You can also see Collector's timer report in Mikro's control panel in administration area.


Submit messages via the REST API

You can create a simple HTML form, a mobile application, a computer program, or other, to submit messages to Mikro remotely. Mikro supports POST requests and replies back as XML document as a JSON formatted string. API requests should be addressed to inner.php/mikro/rest.

http://www.example.com/inner.php/mikro/rest

Parameter type is the only one that can be set via either GET or POST method. All others can be set only via POST. type controls the API response type and can be XML or JSON. In order to authenticate you must submit parameter restsecret which is the md5 value or the REST API Secret string as set in Mikro's configuration. You must also submit your username as the parameter uname.

restsecret = md5(REST API secret)

The article related POST elements are the following: title, message (required), longtxt, link, link_title, video, image (upload), imageurl, catid and lng. Mikro will reply to your request like this (XML example):

<mikro>
	<success>0 on error, 1 on success</success>
	<status>Error code or OK</status>
	<version>1.0</version>
	<time>server timestamp</time>
	<message><![CDATA[Response message]]></message>
	<link><![CDATA[Full URL to submitted article on success]]></link>
</mikro>

For more help on Mikro API please post your questions on Elxis forums.


Mikro public pages

Below are samples of Mikro's public URLs and a short description for each one.

http://www.example.com/mikro/   (Mikro frontpage)
http://www.example.com/mikro/all   (All articles)
http://www.example.com/mikro/rss   (articles from RSS sources)
http://www.example.com/mikro/twitter   (articles from Twitter)
http://www.example.com/mikro/user   (user submitted articles)
http://www.example.com/mikro/api   (articles submitted via the REST API)
http://www.example.com/mikro/tag/test   (articles tagged as test)
http://www.example.com/mikro/sample   (Category with SEO Title sample)
http://www.example.com/mikro/127.html   (Permanent page for article with ID 127)
http://www.example.com/inner.php/mikro/rest   (REST API interface)

Example of Elxis URI formatted Mikro URL (for your menus or internal linking)

mikro:all

Internal module positions

Mikro has a number of internal module positions which you can use to display modules inside Mikro. These module positions are automatically generated during component installation. Here is a list of them.

  • mik_fronttop Mikro front page, above articles.
  • mik_frontbottom Mikro front page, below articles.
  • mik_listtop Any Mikro listing page except front page, above articles.
  • mik_listbottom Any Mikro listing page except front page, below articles.
  • mik_arttop Mikro article page, above article.
  • mik_artbottom Mikro article page, below article.

License, author, support and download

Component Mikro is provided for free under the Elxis Public License license. The author of Mikro is Ioannis Sannos who grants you the right to use this extension for any purpose you like. For support please post your question at Elxis forums.

Download Mikro from Elxis Downloads Centre.



It has been read 9375 times
Mini Shop
Next article
Mini Shop