PHP-Fusion
v.7.01
AP-Fusion
v7.02.03
Pimped-Fusion-AP
v0.09.03
февраля 12 2012 04:53:11
Навигация
· Новости
· Статьи
· Скачать
· Форум
· Ссылки
· Категории новостей
· Обратная связь
· Галерея
· Поиск
· Гостевая
· Коллекция аватар
· CMS AP-Fusion. Отличия от PHP-Fusion
· Javascript справочник
· Разное
Сейчас на сайте
· Гостей: 6

· Пользователей: 0

· Всего пользователей: 441
· Новый пользователь: yak21
Информеры
Загрузка файлов  +  -
Бытовая техника:  +  
Лента alipapa.ru
Карпаты. Верховина.
Карпаты. Драгобрат.
Карпаты. Яремче, Яблунецкий перевал.
dbForge Studio for MySQL вместо PHPMyAdmin
Облачные технологии - насколько это серьезно?
Как распределяется вес по сайту

Совместимость CMS
Solomono.ru - сервис для веб-мастера
Микроразметка веб-страниц.
АГС - не приговор.

Немного о политике.
Что такое АГС и как с ним бороться?
Долгожданный АП PR

PR Google: 9 месяцев без апдейта
Поведенческий фактор - модная тенденция?
Wi-Fi дома. Что делать, если 192.168.0.1 занято?

Ускоренная переиндексация страниц в Яндексе
Как я ставил винду на нетбук.
ROOKEE - инструмент оптимизатора.
Строим рейтинг-каталог
Ссылки  +  -
Блоги
Alipapa
» Блог Алипапы
lom
» Блог Лома
Последние активные темы форума
  Темы Просмотров Ответов Последние сообщения
Pimped-Fusion. Первые впеча...
Ошибки, баги, глюки
1771 83 Alipapa
10-02-2012 19:36
Произвольные Title на любой...
Вопросы по работе
47 1 Alipapa
07-02-2012 14:28
Мультикатегории в новостях
Моды, плагины
250 8 Alipapa
28-01-2012 00:47
AP-Fusion 7.02
Вопросы по работе
2734 29 Alipapa
18-01-2012 17:59
Расширенный каталог статей.
Моды, плагины
12124 167 Alipapa
14-12-2011 23:32

udm_load_ispell_data

(PHP 4 >= 4.0.5, PHP 5)

udm_load_ispell_data -- Load ispell data

Description

bool udm_load_ispell_data ( resource agent, int var, string val1, string val2, int flag )

udm_load_ispell_data() loads ispell data. Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

agent - agent link identifier, received after call to udm_alloc_agent().

var - parameter, indicating the source for ispell data. May have the following values:

After using this function to free memory allocated for ispell data, please use udm_free_ispell_data(), even if you use UDM_ISPELL_TYPE_SERVER mode.

The fastest mode is UDM_ISPELL_TYPE_SERVER. UDM_ISPELL_TYPE_TEXT is slower and UDM_ISPELL_TYPE_DB is the slowest. The above pattern is TRUE for mnoGoSearch 3.1.10 - 3.1.11. It is planned to speed up DB mode in future versions and it is going to be faster than TEXT mode.

  • UDM_ISPELL_TYPE_DB - indicates that ispell data should be loaded from SQL. In this case, parameters val1 and val2 are ignored and should be left blank. flag should be equal to 1.

    Замечание: flag indicates that after loading ispell data from defined source it should be sorted (it is necessary for correct functioning of ispell). In case of loading ispell data from files there may be several calls to udm_load_ispell_data(), and there is no sense to sort data after every call, but only after the last one. Since in db mode all the data is loaded by one call, this parameter should have the value 1. In this mode in case of error, e.g. if ispell tables are absent, the function will return FALSE and code and error message will be accessible through udm_error() and udm_errno().

    Пример 1. udm_load_ispell_data()example

    <?php
    if (! udm_load_ispell_data ( $udm , UDM_ISPELL_TYPE_DB , '' , '' , 1 )) {
      
    printf ( "Error #%d: '%s'\n" , udm_errno ( $udm ), udm_error ( $udm ));
      exit;
    }
    ?>

  • UDM_ISPELL_TYPE_AFFIX - indicates that ispell data should be loaded from file and initiates loading affixes file. In this case val1 defines double letter language code for which affixes are loaded, and val2 - file path. Please note, that if a relative path entered, the module looks for the file not in UDM_CONF_DIR, but in relation to current path, i.e. to the path where the script is executed. In case of error in this mode, e.g. if file is absent, the function will return FALSE, and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno(), since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

    Пример 2. udm_load_ispell_data() example

    <?php
    if ((! udm_load_ispell_data ( $udm , UDM_ISPELL_TYPE_AFFIX , 'en' , '/opt/ispell/en.aff' , 0 )) ||
        (!
    udm_load_ispell_data ( $udm , UDM_ISPELL_TYPE_AFFIX , 'ru' , '/opt/ispell/ru.aff' , 0 )) ||
        (!
    udm_load_ispell_data ( $udm , UDM_ISPELL_TYPE_SPELL , 'en' , '/opt/ispell/en.dict' , 0 )) ||
        (!
    udm_load_ispell_data ( $udm , UDM_ISPELL_TYPE_SPELL , 'ru' , '/opt/ispell/ru.dict' , 1 ))) {
        exit;
    }
    ?>

    Замечание: flag is equal to 1 only in the last call.

  • UDM_ISPELL_TYPE_SPELL - indicates that ispell data should be loaded from file and initiates loading of ispell dictionary file. In this case val1 defines double letter language code for which affixes are loaded, and val2 - file path. Please note, that if a relative path entered, the module looks for the file not in UDM_CONF_DIR, but in relation to current path, i.e. to the path where the script is executed. In case of error in this mode, e.g. if file is absent, the function will return FALSE, and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno(), since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

    <?php
         
    if ((! Udm_Load_Ispell_Data ( $udm , UDM_ISPELL_TYPE_AFFIX , 'en' , '/opt/ispell/en.aff' , 0 )) ||
            (!
    Udm_Load_Ispell_Data ( $udm , UDM_ISPELL_TYPE_AFFIX , 'ru' , '/opt/ispell/ru.aff' , 0 )) ||
            (!
    Udm_Load_Ispell_Data ( $udm , UDM_ISPELL_TYPE_SPELL , 'en' , '/opt/ispell/en.dict' , 0 )) ||
            (!
    Udm_Load_Ispell_Data ( $udm , UDM_ISPELL_TYPE_SPELL , 'ru' , '/opt/ispell/ru.dict' , 1 ))) {
          exit;
          }
    ?>

    Замечание: flag is equal to 1 only in the last call.

  • UDM_ISPELL_TYPE_SERVER - enables spell server support. val1 parameter indicates address of the host running spell server. val2 ` is not used yet, but in future releases it is going to indicate number of port used by spell server. flag parameter in this case is not needed since ispell data is stored on spellserver already sorted.

    Spelld server reads spell-data from a separate configuration file (/usr/local/mnogosearch/etc/spelld.conf by default), sorts it and stores in memory. With clients server communicates in two ways: to indexer all the data is transferred (so that indexer starts faster), from search.cgi server receives word to normalize and then passes over to client (search.cgi) list of normalized word forms. This allows fastest, compared to db and text modes processing of search queries (by omitting loading and sorting all the spell data).

    udm_load_ispell_data() function in UDM_ISPELL_TYPE_SERVER mode does not actually load ispell data, but only defines server address. In fact, server is automatically used by udm_find() function when performing search. In case of errors, e.g. if spellserver is not running or invalid host indicated, there are no messages returned and ispell conversion does not work.

    Замечание: This function is available in mnoGoSearch 3.1.12 or later.

    Example:

    <?php
    if (! udm_load_ispell_data ( $udm , UDM_ISPELL_TYPE_SERVER , '' , '' , 1 )) {
        echo
    "Error loading ispell data from server<br />\n" ;
        exit;
    }
    ?>

Все функции PHP:
Авторизация
Логин

Пароль



Вы не зарегистрированы?
Нажмите здесь для регистрации.

Забыли пароль?
Запросите новый здесь.
Мини-чат
Вы должны авторизироваться, чтобы добавить сообщение.

04/02/2012 09:08
Еще раз прошу всех. Если вопрос не личный, пишите в форум. В личке, аське, скайпе, мейле и т.д. не консультирую




14/01/2012 18:45
avisei, пиши в форум, а не шли мне личные посланья

31/12/2011 16:01
С праздником Нового Года! Успехов, счастья, богатства!


08/12/2011 16:13
MySQL нужен. Инструкция вот: [url]http://ap-fus
ion.ru/downloads.p
hp?download_id=58[
/url]

08/12/2011 16:03
Я канеш дико извиняюсь, но где на этом сайте статья по установке fusion, нужен ему MySql или нет? Smile


07/12/2011 11:03
ОК)

07/12/2011 11:02
этот - для 7.0

07/12/2011 11:00
Я устанавливаю, как в инструкции. Куча ошибок. Не могу сделать upgrade!

07/12/2011 10:56
Для какой стандартной подходит, для такой же и ap-fusion подойдет


07/12/2011 10:54
Для какой версии AP-FUSION подходит "extended-do
wnloads
"? Shock

24/10/2011 20:48
Валиор, я не поленился и проверил еще раз - в трех файлах этот фрагмент есть, в одном из них - дважды. Так что я не ошибся, это Вы так искали.

24/10/2011 16:06
Ну Вам удалось, значит в принципе возможно. А вообще не рекомендую, но если очень хочется, придется смириться с некоторыми неудобствами. На этом сайте поддержка реализована частично.







24/10/2011 16:05
Возможно ли регистрировать кирилические ники? В письме с регистрацией не указан логин.



21/10/2011 17:03
Занимаюсь. Локаль в порядок привожу. Сегодня или завтра что-нибудь выложу.



20/10/2011 16:09
да бог с ним, ты лучше пимпедом займись, а я не буду в этой сборке использовать основной каталог.



18/10/2011 21:54
Papich, плагин проверю обязательно, мб неисправленный в сборку поставил


22/09/2011 20:47
http://tools.dynam
icdrive.com/favico
n/ - фавиконка быстро и удобно

12/08/2011 21:09
Потому что не осознали еще всего того удобства, что он предоставляет.


10/08/2011 10:20
Почему никого не интересует мой новый чат?

13/06/2011 12:13
Самому не нравится. Пробовал по всякому. Вдобавок ещё и таблицу обрезает, остаётся процентов 40. http://www.cqham.s
umy.ua/viewpage.ph
p?page_id=44 - вариант вставки таблицы




Анонс
Последние статьи
· СМС и Вебмани
· TinyMCE для пользова...
· PCRE (Perl Compatibl...
· PCRE (Perl Compatibl...
· 510
4,252,971 уникальных посетителей Iceberg by Harly