common.inc

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

Версия 1.611.2.24 (checked in on 2009/05/13 at 17:10:36 by drumm)

Common functions that many Drupal modules will need to reference.

The functions that are critical and need to be available even when serving a cached page are instead located in bootstrap.inc.

Константы

ИмяОписание
SAVED_DELETEDReturn status for saving which deleted an existing item.
SAVED_NEWReturn status for saving which involved creating a new item.
SAVED_UPDATEDReturn status for saving which involved an update to an existing item.

Функции

ИмяОписание
base_pathВозвращает базовый путь сайта.
check_file
check_urlПодготавливает URL для использования в качестве HTML-атрибута. Убирает вредоносные протоколы.
drupal_access_deniedГенерирует ошибку 403 если для просмотра страницы недостаточно прав.
drupal_add_cssAdds a CSS file to the stylesheet queue.
drupal_add_feedДобавляет URL фида для текущей страницы.
drupal_add_jsДобавляет JavaScript файл, настройки или код на страницу.
drupal_add_linkДобавляет тег в HEAD страницы.
drupal_attributesФорматирует строку с атрибутами для вставки в HTML тэг.
drupal_build_css_cacheОбъединяет и оптимизирует файлы CSS, размещая конечный файл в файловой директории.
drupal_clear_css_cacheУдаляет все файлы кэша CSS.
drupal_clear_path_cacheОбновляет static-переменные, в которых содержится кеш путей для данной страницы.
drupal_cloneОбеспечивает замену функции clone() для PHP4.
drupal_cron_cleanupShutdown function for cron cleanup.
drupal_cron_runПри вызове выполняет задачи cron
drupal_evalИсполнить строку кода на PHP.
drupal_final_markupMake any final alterations to the rendered xhtml.
drupal_get_breadcrumbПолучает хлебные крошки для текущей страницы.
drupal_get_contentGet assigned content.
drupal_get_cssReturns a themed representation of all stylesheets that should be attached to the page. It loads the CSS in order, with 'core' CSS first, then 'module' CSS, then 'theme' CSS files. This ensures proper cascading of styles...
drupal_get_destinationПодготавливает строку запроса перенаправления для использования совместно с функцией drupal_goto(). Используется для перенаправления пользователя назад к ссылающейся страницы после заполнения формы. По умолчанию возвращается текущий URL. Если путь назначения задан в предыдущем запросе, возвращается этот путь.Если путь назначения задан в предыдущем запросе, возвращается этот путь.
drupal_get_feedsGet the feed URLs for the current page.
drupal_get_headersGet the HTTP response headers for the current page.
drupal_get_html_headRetrieve output to be displayed in the head tag of the HTML page.
drupal_get_jsReturns a themed presentation of all JavaScript code for the current page. References to JavaScript files are placed in a certain order: first, all 'core' files, then all 'module' and finally all 'theme' JavaScript...
drupal_get_pathВозвращает адрес системного элемента (модуль, тема и т.п.)
drupal_get_private_keyГарантирует, что переменная персонального ключа, которая используется для генерации токенов установлена.
drupal_get_tokenГенерирует уникальное значение (токен), основанное на значении параметра $value, текущей сессии пользователя и приватного ключа сайта.
drupal_gotoПеренаправляет пользователя на другую страницу сайта на Друпале.
drupal_http_requestPerform an HTTP request.
drupal_mailSend an e-mail message, using Drupal variables and default settings. More information in the PHP function reference for mail()
drupal_map_assocФормирует ассоциативный массив из линейного массива.
drupal_not_foundГенерирует ошибку 404 (страница не найдена) если запрос не удалось обработать.
drupal_page_footerPerform end-of-request tasks.
drupal_query_string_encodeParse an array into a valid urlencoded query string.
drupal_renderФормирует HTML-код из структурированного массива.
drupal_set_breadcrumbУстанавливает хлебные крошки для текущей страницы.
drupal_set_contentДобавляет содержание в определенный регион.
drupal_set_headerSet an HTTP response header for the current page.
drupal_set_html_headAdd output to the head tag of the HTML page. This function can be called as long the headers aren't sent.
drupal_site_offlineGenerates a site off-line message
drupal_system_listingReturns an array of files objects of the given type from the site-wide directory (i.e. modules/), the all-sites directory (i.e. sites/all/modules/), the profiles directory, and site-specific directory (i.e. sites/somesite/modules/). The returned array...
drupal_to_jsConverts a PHP variable into its Javascript equivalent.
drupal_urlencodeWrapper around urlencode() which avoids Apache quirks.
drupal_valid_tokenПроверяет корректность соотношения уникального значения (токена) к ключу, основанному на параметре $value, сессии пользователя и приватного ключа сайта.
element_childПроверяет, является ли ключ структурированного массива атрибутом (начинается с '#') или дочерним элементом (все остальные ключи).
element_childrenВозвращает ключи структурированного массива, которые не являются атрибутами (т.е. не начинаются на '#').
element_propertiesGet properties of a structured array element. Properties begin with '#'.
element_propertyCheck if the key is a property.
error_handlerLog errors as defined by administrator Error levels: 0 = Log errors to database. 1 = Log errors to database and to screen.
fix_gpc_magicCorrect double-escaping problems caused by 'magic quotes' in some PHP installations.
flood_is_allowedCheck if the current visitor (hostname/IP) is allowed to proceed with the specified event. The user is allowed to proceed if he did not trigger the specified event more than $threshold times per hour.
flood_register_eventRegister an event for the current visitor (hostname/IP) to the flood control mechanism.
format_dateФорматирует дату в заданном формате или в формате настроек сайта.
format_intervalФорматирует временной интервал с заданной точностью.
format_pluralФорматирует и переводит строку, содержащую число.
format_rss_channelFormats an RSS channel.
format_rss_itemFormat a single RSS item.
format_sizeГенерирует строчное представление указанного количества байт.
format_xml_elementsFormat XML elements.
lОформляет ссылки.
locale_initializeInitialize the localization system.
page_set_cacheStore the current page in the cache.
parse_sizeParse a given byte count.
tПереводит строку на заданный язык или язык страницы.
urlГенерирует URL из указанного пути меню. Также поддерживает уже существующие URL.
valid_email_addressVerify the syntax of the given e-mail address.
valid_urlVerify the syntax of the given URL.
xmlrpcPerforms one or more XML-RPC request(s).
_drupal_add_jsHelper function for drupal_add_js().
_drupal_bootstrap_full
_element_sortFunction used by uasort in drupal_render() to sort structured arrays by weight.
_fix_gpc_magic
_fix_gpc_magic_filesHelper function to strip slashes from $_FILES skipping over the tmp_name keys since PHP generates single backslashes for file paths on Windows systems.
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему