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.

Connection

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

Методы

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

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

Example:

// replace keywords to site links in text
$this->diafan->_keywords->get($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':

Example:

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.

Import/export

Import/export

The import file must have the following format:

Example:

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".

Settings

Settings

In the settings you can specify:

Database

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

Files

  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/keywords.admin.inc.php – Connecting the module to the administrative part of other modules;

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

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

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