K2 for details. Installing the K2 component on Joomla. Separating additional fields

The component appeared a long time ago, at the time when Joomla version 1.5 was the most up-to-date. The idea behind the K2 developers is that K2 brings the best of WordPress and Drupal to Joomla. The K2 component allows you to easily create full-featured directories, news portals, blogs, shops, etc. based on Joomla.

The K2 component is a content constructor that completely duplicates the organization of materials and categories and provides its own control panel as an alternative to the Joomla admin panel.
So, what can the K2 component do which the default component for working with materials cannot do, which is built into Joomla by default:

  • Comments (1)... K2 has a built-in commenting system, it is quite reliably protected by captcha from Google. In Joomla itself, there is no basic commenting system, and if necessary, the JComments component is installed, or whatever else.
  • Tags:... You can add tags to articles published through K2 just like in WordPress. To display the cloud on the site, a special module is intended, which, in addition to the direct cloud, allows you to display breadcrumbs, an archive of materials, a blog-style calendar, a list of categories (menu), a search box, etc. on the Joomla site.
  • Photo... In the K2 component, you can add photos, images to an article or category. It seems to be as usual, and in Joomla it is also possible, but the difference is that the images will be automatically resized. This is very handy for authoring blogs by your site users. After all, they do not know your standards and publish the material as best they can.
  • Gallery... In the template for each article added through the K2 component, there is a place to insert an image gallery. Important - the gallery is added to the article via K2 as simply as possible, literally in a couple of clicks - you just need to specify the path to the zip archive with images and select the option to display the photo gallery. In Joomla, you can also insert a photo gallery into the material, but through additional extensions, for example, the Phoca Gallery Plugin plugin, and still the process of inserting a gallery into an article will be much more complicated than when using the K2 component.
  • Video... As in the situation with the photo gallery, in the admin panel of an article published in K2, there is a place for a video attachment. Video insertion takes place in one click. For example, to insert a YouTube video, you only need to enter the video code.
  • Files... Also in K2, you can attach files for download to articles.
  • Fields... In addition, when writing an article, it is possible to add an additional field by selecting the value of the additional field from the drop-down list. Additional fields in K2 are configured in the corresponding sections of the K2 admin panel. Thus, in the article you can fill in additional fields, this can be useful, for example, when creating a product catalog in Joomla. This is similar to the item cards in VirtueMart, because VirtueMart- this is also a catalog of goods.
  • Social buttons... Also, in the K2 component article template, there is a place for displaying social media buttons, this is very convenient, and you do not have to screw the buttons yourself using third-party extensions.

All these advantages are available for you, as well as for registered users. Add your articles, videos, galleries, insert images, files, moderate comments on your articles, register additional fields.

Well, in general, this is probably all that the K2 component can provide us to extend the standard features of Joomla.

In principle, some of the capabilities provided by the K2 component are now implemented in new versions of Joomla... Once upon a time the slogan on the K2 website said precisely that one should not wait for the release of the new Joomla, but now use this component. Here and opportunities - here and problems.
If you translate all content into K2, then when it becomes large it will be very difficult to abandon the component. You may not have to refuse. But when the next version of Joomla is released, some of the advantages presented can be implemented as standard. Something similar has already happened. Some points, such as the number of category attachments, are already implemented as standard. Something is very well implemented by third-party plugins and with them it is also easy to refuse in favor of another plugin.

The free K2 component will help make your recordings more interesting and informative. I'll tell you in detail for novice bloggers how to install and russify K2 on Joomla.

Installation K2

The K2 component is installed from the official site http://getk2.org/. This is how the main page of the site looks like. Download the application to your computer by clicking on the "Download K2" button. You can get acquainted with the capabilities of K2 on the demo site of the JoomlaWorks developers. Each material can include a photo gallery, customize the display of additional fields. Additional fields are the output of meaningful information next to the image. This is especially useful for online stores, real estate agencies or directory sites. To upload K2 to your website, go to "Extensions" - "Extension manager" "Installation" - "Upload package file". Select the file on your computer and install it on the site.

Russification K2

In order for all K2 settings to be in Russian, let's return to the official website and download the Russification of the component. In the “K2 translations” section, select “Russian - Russia”, download the file and upload it to the site. You can make sure that the K2 menu is in Russian by opening "Components" - "K2".

In the "Info" tab there is a list of all available plugins and K2 modules. You can also find out the required version of the web server, PHP, MySQL, set folder permissions, and other useful information. Pay attention to the download limit. Sometimes users upload archives or photos of a larger size and cannot understand why the error is displayed. Large files must be uploaded directly to the hosting.

Additional plugins K2

K2 does not include gallery and video plugins. They need to be downloaded separately on the same site. Or open the "Extension Manager" - "Install from JED", type AllVideos into the search and download the plugin. The Simple Image Gallery PRO plugin is paid. On one of the sites I bought a template with a pre-installed K2 component and a paid gallery plugin. On another site I will install a free gallery from the same developer, Simple Image Gallery. We install the gallery in the same way from the Internet. Let's not forget to enable plugins in the Plugin Manager. I'll check how K2 works and if the paid plugin can be dispensed with. I will definitely write about the results.

Removing pre-installed pictures

First of all, I got rid of the pre-installed pictures in K2. They are not unique and will not be needed. Open “Media Manager”, and go through the folders. Select and delete unnecessary pictures. I deleted everything. We freed up some hosting space. How not to overpay and get all the features of modern hosting for minimal money I will write in the next article.

Hello dear readers of the blog site. Today I want to draw your attention to such an interesting component for Joomla as K2. If you remember, then, as a rule, they are a rather complex tool with great functionality and rich administration capabilities.

One of the most difficult can be considered the component, to which I have a whole section devoted. So K2 is quite close in its complexity to Virtuemart, but the new opportunities it provides are impressive and it's worth spending a little time to get acquainted with these capabilities (at least in the first approximation).

Features of the K2 component for organizing content in Joomla

But let's try to present all the features of K2 as a list:

  1. Unlimited nesting of materials in categories (you can forget about the sections and directories in which version 1.5 was originally compressed).
  2. K2 has an integrated commenting system, which, if desired, can be protected by a fairly reliable captcha from Google (in Joomla, there is no commenting system initially, but it is possible, which is de facto the best option available at the moment).
  3. For articles written in K2, you can add tags similar to those used in WordPress (you can use a pretty visual tag cloud, an example of which is given on the developer's demo site). A tag cloud from K2 is displayed using a special module, which, in addition to it, can display bread crumbs, an archive of materials, a blog-style calendar, a list of categories (menu), a search box, etc. on the pages of a website, blog or catalog.
  4. In this component, you can add images to them when writing articles or creating a category. It seems that there is nothing like that in this, because initially this can also be done in the engine, but the difference lies in the unification of the added images, which will be automatically reduced to the standard size (very convenient when using author blogs by users of your resource).
  5. In the template for each article written in the K2 admin area, there will be a place to insert image galleries... Moreover, the gallery is added to the article in just a couple of clicks - you only need to specify the path to the zip archive with several images and select the display option.

    In Joomla, of course, you can also insert photo galleries into articles, although for this you have to use third-party extensions (for example, a plugin), and still the insertion process will be an order of magnitude more complicated than in the case of using the K2 component. Oh how.

  6. Just like in the case of photo galleries, the template for an article written with K2 will provide space for a video. It will be possible to insert a video into an article literally in one click (for example, to insert a video with it will be enough to enter only the video code).
  7. Even in K2, you can attach files for downloading to articles again in one click when writing or editing materials through the component's control panel
  8. When writing an article through the K2 admin panel, you will be able to specify or select from the drop-down list the values ​​of certain additional fields. They are set and configured in the corresponding sections of the admin panel of this component, and then tied to a specific category of materials.

    Thus, when adding materials, you can fill in additional fields that may, for example, be needed when creating a catalog based on the K2 component. In general, all this is very reminiscent, which is not surprising, because VirtueMart is also a catalog of goods.

    Also, the K2 article template provides a place for displaying social media buttons (usually called "Social Sharing"), which is very convenient, because you do not have to screw up using third-party extensions or scripts.

    Only the buttons that come by default with K2 are focused on the bourgeoisie, but with the help of not tricky manipulations with the code, they can be replaced with a set that is relevant for the Runet, for example, take them all from the same service.

  9. When using K2 in Joomla (and if you wish), registered users will be able to add their articles, using all the capabilities of this component (inserting images, galleries, videos, files, writing additional fields, etc.), moderating comments (if comments are moderated using AJAX), left to their published materials, as well as fill out their profile pages.

In general, this is probably all that K2 can provide us to expand the standard capabilities of Joomla. But even these modest possibilities can change the look and feel of your site so much that it will be almost difficult to recognize it. I repeat that this component is incredibly popular in the bourgeoisie, at least in comparison with Runet.

Installing the K2 component on Joomla

But let's move from theory directly to practice and see where we can download K2 and how to install it on Joomla. So, in order to download it, you need to click on the big button "Download K2" on the main page of the developer site. The latest current version is currently v2.6.7.

Installing its component in Joomla is no different from the typical one. You will need to select from the top menu "Extensions" - "Install / Remove" in the admin panel, as a result of which the manager window will open on the "Install" tab.

To install K2, you need to click the Browse button in the "Download the package file" area and find the K2_v2.6.7.zip file on your computer. Then click on the "Download file & Install" button, after a while everything will be completed and you will see a message about this, as well as a report about the installed extensions:

If you have any problems, try using this material -.

Russian translation K2 (Russification)

The fact is that the K2 component, modules and plugins have a lot of settings (probably even more than VirtueMart) and therefore, if everything is not right with your English (like, for example, mine), then you will not be able to get a Russian translation or, in other words, establish its Russification.

This is not at all difficult to do, but first you will need to download Russification K2... There is no need to unpack these archives with Russian translation, it will be enough just to install them from the Joomla admin panel as usual extensions (Extensions - "Install / Remove" - ​​"Upload package file"). After that, the K2 component will be fully translated into Russian.

After installing and Russifying it, going to the Joomla admin panel (Control Panel), in addition to the tools already available there, you will find just below a large number of tools that the K2 component added there. You can also access the admin panel of this component by selecting from the top menu:

I suggest watching a series of 14 video tutorials on K2 for Joomla... They will be played one after another automatically, and if you want, you can switch to the next lesson using the corresponding button on the player panel or select the desired lesson from the drop-down menu in the upper left corner of the player window:

Happy viewing!

Good luck to you! See you soon on the pages of the blog site

You may be interested

Creating a map for a Joomla site using the Xmap component
Themes and russification of the SMF forum, as well as installing the JFusion component in Joomla
Extensions for Joomla - what is it and where to download components, modules and plugins for Joomla, how to install and uninstall them
JComments - free commenting component with captcha for Joomla, its installation and configuration
ARTIO JoomSEF - setting up CNC (SEF) links and Title in Joomla, as well as creating a 404 error page using this extension
JoomShopping - installation of a free component of an online store on Joomla and its initial configuration
Comments for Joomla with auto moderation and spam protection
Photo Gallery Phoca Gallery (Plugin) - installation, creation of galleries and slideshows in Joomla, watermarks and insert photos into articles Photo Gallery for Joomla - Part 3 - Creating galleries in Joomla 1.5 using Phoca Gallery component - adding categories and uploading images to the photo gallery
Akeeba Backup (former JoomlaPack) - create a backup of a site on Joomla and restore from a backup in two clicks
Contacts for the site and feedback form using the built-in Joomla component

K2 is a content component for Joomla! CMS with some additional functions reminiscent of CCK (Content Construction Kit - in Russian it can be interpreted as "component-creating-any-content-type"). Its developers are the Greek portal JoomlaWorks.

It allows the user to manage the content of the site in a more convenient and modern way. You can create a blog, a catalog of goods or services, a file archive, a multimedia gallery, an online magazine using just one component! Development of this powerful rhenium began in 2006, but unfortunately no documentation has been published on it by this time. There are only a few articles and videos in English.

This short step-by-step tutorial is written for those who want to try and learn K2 in action, but literally don't know where to start.

Step 1. Download the latest version of K2 from the official developer site. Step 2. Install K2 using the Joomla Extension Manager.

Step 3. Download and install according to the instructions the latest translation of the K2 component

Step 4. Open the K2 control panel through the "Components" menu item, or use it through the module on the main page of the admin panel.

Step 5. Create groups of additional fields. Name them according to their purpose: Blog, Catalog, Directory or whatever you like.

Note: Additional fields implement the unification of the presentation of materials, that is, when creating a new material in a category to which a group of additional fields is assigned, you can fill in these fields. And thus, all materials in this category will have this "field - value" information. This is absolutely essential when creating a product catalog.

For example, you create a group of additional Catalog fields and add fields there:

b) Dimensions

And then, when creating each new material, you will already create a product card in fact, because when the product is displayed under the article-description in the additional plate, these fields will be displayed neatly, in tabular form (by default).

Step 6. Add additional fields to your custom field groups

Note: By default, any material already has a Title, Text and Main image. Therefore, if you need to use K2 only as an advanced article engine (for News, Blogs), then you can not use additional fields (as is the case in most cases). Use additional fields to create File archives, Catalogs, Galleries.

Note: You can import all existing Joomla! Categories and content. using one button (in the upper right corner "Import"). This way, your transition from a regular material component to K2 will be virtually painless. This is one of the properties that gave K2 its current popularity so quickly.

Step 8. Add user groups. Registered and Site Owner are present by default. You can restrict the access rights of various groups to publish materials (generally or in certain categories), view, edit materials and some other functions.

Step 9. Assign the existing joomla users to the appropriate K2 user group. Set their gender, add a description and upload an avatar. This minimal blog questionnaire is included in the basic K2 package. The details of the author will be displayed after the article or news published by him.

Step 10. Add tags. The tag system is not only a modern fashionable "trick", but it really gives a breakthrough for the usability of your site, allows you to implement pseudo-multi-category, enhances linking for SEO, brings order to chaos.

Step 11. Assign the corresponding K2 elements (categories, materials, user pages) to the menu items.

Note: It is this stage that causes the most questions for beginners. Often, an inexperienced user sets up K2, makes an import of old materials, writes new additional materials to the corresponding categories, but does not see the result. This is because the menu items still link to Joomla! Articles. Therefore, I paid special attention to Step 11!

Step 12. Publish the K2 LOGIN module in the module manager if you nevertheless decide to create an interactive site. You can also publish other K2 modules comments, K2 content or K2 tools. I will touch on them in separate articles.

Step 13. Add content to each category. If you followed step 8 and then 12, then you can do it right from the front panel of the site. Otherwise, you can always work through the admin. Joomla! Panel

There are still many unconsidered points, but I will certainly sanctify them in the following articles. The name is on the hands of this instruction, any beginner can not only install K2, but also already feel all its power, and then it’s a matter of creativity and perseverance.

Based on materials from JoomlaWorks

Component files are in the path components / com_k2 /

But template developers can override and add their own component along the way templates / your template / html / com_k2 /

A little lesson about the component K 2

1. An error was noticed, when opening a material for editing, additional fields (extraFields) are not available for editing until the category to which this material belongs (that is, you need to reset or change to any other category, and then select the initial one).

To fix it, we follow the pathand open the file itemform.php

We are looking for such a code (about 532 lines)

type = "header"):?>

and change to this code

type == "header"):?>

2. If, when adding material from the site (Front-End), the category in which you are located is not automatically added to you, we do this

We go ro paths components / com_k2 / templates / default / and open the file category.php

We are looking for such a code (I cannot tell the line because our file has been greatly changed, look for the class = "catItemAddLink")

addLink; ?>

and change to this code

addLink . "& catid =". $ this-> category-> id; ?>

Now, when adding an element in the editor, the current category will be immediately selected.

Removing unnecessary from the Front-End

We decided to sketch out how to remove some functions and text when editing or adding material from the site

Let's start with the file itemform.php we follow the pathcomponents / com_k2 / templates / default

Delete or comment the code

1. Remove the logo, heading Add material

2. Remove the side panel

3. Remove the inscription user permissions

permissionsMessage; ?>

4. Remove the title alias

!}

5. Remove tags

params-> get ("taggingSystem")):?>