Site links

The module allows you to specify a link that is automatically substituted in the texts on the site with a given keyword or phrase. Module refers to the part of the CMS "Interactive" and can be installed optionally.

Module "Site links" is connected to the other modules. The standard DIAFAN.CMS "Site links" is integrated with the following modules: Photogallery, News, Articles, Question-Answer, Online shop, Files, Site pages, Ads. The module is connected to a specific perelinkovka module settings.


Подключаемая часть – файл modules/keywords/ В нем описан класс Keywords_inc. В модуле к объекту класса можно обратиться через переменную $this->diafan->_keywords. Экземпляр класса создается при первом вызове переменной.


void get (string &$text) – Подставляет ключевые слова.

  • string $text: исходный текст


// replace keywords to site links in text

If the module is connected module settings "Site links" the links are inserted in the text, processed function htmleditor.

How to add site links to the module

In the file of module settings (modules/модуль/admin/модуль.admin.config.php) you must add the parameter 'keywords':


public $variables = array(
'main' => array(
'keywords' => 'module',



Site links

List of site links

Key words and references to them can be edited directly from the list.

Edit of site link

Site links have the following characteristics.



The import file must have the following format:


keyword 1
link 1
keyword 2
link 2
keyword 3
link 3

You can also download a file with keywords on the site in the above link format "Export".



In the settings you can specify:


{keywords} – Ключевые слова для перелинковки


  1. modules/keywords/admin/keywords.admin.php – Редактирование ключевых слов;

  2. modules/keywords/admin/keywords.admin.config.php – Module settings;

  3. modules/keywords/admin/keywords.admin.importexport.php – Импорт и экспорт ключевых слов;

  4. modules/keywords/admin/ – Connecting the module to the administrative part of other modules;

  5. modules/keywords/keywords.export.php – Экспорт ключевых слов;

  6. modules/keywords/ – Подключение модуля;

  7. modules/keywords/keywords.install.php – Module installation.