📜 ⬆️ ⬇️

Webasyst Blogging Blog Review

One of the first applications that we developed based on the Webasyst framework was the Blog application, which allows you to keep personal, collective and corporate (closed by authorization) blogs. It is a blog, because using the example of this application, it was very convenient to implement many basic concepts in the framework: front-end, design editor, plug-ins, sitemap, etc. In addition, then we ourselves had to open a blog on the site. The application is free (LGPL), based on PHP / MySQL / Smarty / jQuery.



Demo : frontend , backend (enter any login and password to access the demo)
Download : in the archive (3.8 MB; the archive already includes the Webasyst framework) or on GitHub (the application itself is located in wa-apps / blog /)
')
Under the cat a detailed review of the application and a lot of screenshots.

Installation


The system requirements “classic”: PHP 5.2+ , MySQL 4.1+ , extensions mbstring, iconv, json, curl, gd / imagick — are placed on almost any shared hosting.

The application is part of the Webasyst framework . If you download the application from the link above, the framework will be installed immediately with the Blog application. If there is no “Blog” in the base delivery, then it can be easily installed via the built-in Installer application, which is always included in the basic framework (the Installer allows you to install updates and new applications with one click).

The installation takes place in several steps: copying files to the server via FTP and then entering the settings for connecting to MySQL via the web interface. Nothing unusual. Instructions . (If you don't want to install the script, you can try the application in the Webasyst cloud .)

Log in to the backend:



Backend


When you first start the application meets the user:


The backend interface is built around the list of posts.



The main division of posts - on blogs. Blogs are independent threads of posts and can be open - posts are automatically published on the site, and closed - posts are available only to backend users. Access to blogs is configured by users and user groups. Each blog can be assigned a different color, which makes maintaining a large number of independent blogs quite convenient. The screenshot above shows an example of a shared feed of three blogs at once, two of which (yellow and red) are closed — next to the title of posts belonging to these blogs, a small lock icon is displayed.



Post can be only in one blog. Additionally, for each post, you can assign tags, categories (for this you need to install free plugins). Everywhere in the lists lazy loading.

Design


By default, the default theme is connected to the frontend, which looks minimalistic:


“Default” can be easily changed to any other design theme directly in the design editor in the backend: choose the design theme, it is downloaded from the Webasyst site and installed.



So far, there are few basic themes, but all the themes - with a clean valid layout ( validator of the demo version), automatically adapt to the user's device (desktop, tablet, mobile), plus all the basic design themes use micromarking of posts and comments according to Schema.org standards .

Smarty template engine is used. Localization - based on gettext. The design of the storefront can be edited directly in the browser in the backend of the application. Through the web interface, you can edit all frontend templates: HTML / Smarty, CSS, and JavaScript (jQuery).



There are various Smarty-helpers that help in any design pattern to get data from the Blog application or other applications. For example, using the $wa->shop->products('tag/') construct, you can get a list of products with the “bestseller” tag from Shop-Script 5 (applications for creating online stores) and display them, say, in the sidebar blog (sidebar.html template):



Similarly, you can pull data from other applications : $wa->photos->photos('tag/') , $wa->shop->cart()->total() , $wa->blog->blogs() etc. The list of supported helpers can always be viewed in the cheat sheet here in the design editor.



Frontend


Subscribe to the blog in the frontend - RSS, to closed blogs in the backend - by email.

For CNC addresses of frontend records, you can use one of several options: only the address of the record or the address of the record along with the year, month, day.



On the basis of one application, you can maintain several independent blogs on different sites. For each front-end of the application (and there can be as many as you like and on different domains) you can attach a separate blog. Example: on the framework website, we blog in English (webasyst. Com / blog /) and Russian (webasyst .ru / blog /) in a single stream, posts are published on different domains and look independent from the outside.



In the front end, too, lazy loading everywhere. From the point of view of SEO, everything is OK: if there is no support for JavaScript, then pagination navigator is shown instead of lazy loading, so all posts are indexed normally.

The application also automatically creates and updates the blog sitemap ( example sitemap in a demo).

Writing post


There are three editing modes for writing posts:
- WYSIWYG , where without it: using the editor elRTE,
- HTML : based on Ace editor,
- Markdown : you need to install a free plugin.

For posts, you can edit the meta tags, title, tags, categories (plugin), the planned publication date and arbitrary key-value parameters, the values ​​of which are then transferred to the design template.



If you enable the 'can_use_smarty' => true option in the application settings, you can also use Smarty in the body of the post. This is convenient for working with data from other applications, for example, when you need to get a dynamic list of photos from the Photo application by any rule: tag, rating, album, etc.

Comments


The application has a tree structure of comments: the branching and the ability to respond to comments are similar in appearance to comments on Habré.



In the framework, right out of the box there are OAuth authorization adapters for popular services, so in the settings (in the web interface) you can easily connect authorization via Google, Facebook, Vkontakte and other services.

Discipline


The calendar of publications in the backend clearly displays the posts: already published and planned for publication in the future. It is easy to see when there are many posts planned, and when not. As shown by our own blogging experience, the calendar, planned publication and reminder dates are one of the most practical features of the application, which really helps to blog more disciplined.



You can turn on reminders for the planned entries, and the application will “knock” the application's author by email every day until the entry is either published or deleted.



Delayed publication of entries is also supported: you charge the date and time, and the post will be published automatically (to do this, you need to configure the cron scheduler).



Plugins


Several useful plugins are available for free download, for example:

- “Trollface” plugin, allowing to mark individual commentators with a troll interface,
- the Markdown plugin already mentioned above,
- import plugin from WordPress and LJ,
- plug-in filtering posts by categories and tags,
- antispam Akismet,
- The remaining plugins can be viewed here .



Own plugins are also easy to develop. Attached are many hooks to which you can attach your functionality. All existing plugins can be used as an example to develop your plugins.

API


The offer provides 13 external API methods for reading and writing data.

blog


post


Documentation for API methods of the application (with sandbox): http://www.webasyst.ru/developers/docs/api/explorer/blog/

WordPress, other engines, and why another bike


Based on the Webasyst framework, we mainly make applications for teamwork and business, and the main focus today at Webasyst is online shopping. We created the “Blog” application not to compete with WordPress and other bloggplayers, but, firstly, because it technically helped us a lot in developing the framework, and secondly, we wanted to make it possible and pleasant to blog on the basis of the framework , and therefore set the task to create a convenient, balanced tool, focused excluded blogging. In general, the framework extends its functionality to a full-fledged universal CMS, but only together with other applications.

The “Blog” application will be useful for those who are tired of their blog engine, for those who want to have, in addition to the blog, a lot of other tools in the backend of their site: a photo gallery, an online store and not related to the usual CMS tools like to-do lists contacts, mail, tasks, etc. In the Webasyst framework, there are many such tools, and we are constantly releasing more and more interesting new applications.

“Blog” is especially good in conjunction with the “ Photo ” application: after uploading photos to “Photo”, they can be exported to the blog one at a time or as a whole pack. Many of our clients also use the “Blog” to publish news from their online stores based on Shop-Script 5 .

Links to some examples of blogs: http://www.webasyst.ru/store/app/blog/examples/

For developers


If you are interested in the Blog application, we will be glad to see your pull requests on GitHub and applications for placing plug-ins and themes in the Webasyst store - we recently opened our own application store, plug-ins and themes in which independent developers can publish their own developments for a fee. or free of charge. Terms of publication published here . We will be glad to cooperate and jointly develop the platform!

GitHub: https://github.com/webasyst/webasyst-framework (the application itself is located in wa-apps / blog /)
License: LGPL (application is free)

Source: https://habr.com/ru/post/199028/


All Articles