function perelinks_autoload($args = array()) { mso_hook_add('content_content', 'perelinks_custom'); # хук на админку mso_hook_add('admin_init', 'perelinks_admin_init'); # хук на админку }
function admin_page_autoload($args = array()) { mso_hook_add('admin_init', 'admin_page_admin_init'); if (mso_segment(1) == 'admin' and (mso_segment(2) == 'page_new' or mso_segment(2) == 'page_edit')) { mso_hook_add('admin_head', 'admin_page_hide_blocks'); } }
function tabs_autoload($args = array()) { mso_hook_add('body_end', 'tabs_head'); mso_hook_add('content', 'tabs_content'); mso_register_widget('tabs_widget', t('Табы (закладки)')); # регистрируем виджет }
function tweetmeme_com_autoload() { if (!is_feed() and (is_type('page') or is_type('home'))) { mso_hook_add('content_content', 'tweetmeme_com_content'); } # хук на вывод контента }
function guestbook_autoload($args = array()) { mso_hook_add('admin_init', 'guestbook_admin_init'); # хук на админку mso_hook_add('custom_page_404', 'guestbook_custom_page_404'); # хук для подключения к шаблону }
function paginator_autoload($a = array()) { mso_hook_add('head', 'paginator_head'); mso_hook_add('admin_head', 'paginator_head'); mso_hook_add('pagination', 'paginator_go', 10); return $a; }
function smiles_autoload($args = array()) { mso_hook_add('content', 'smiles_custom'); # хук на тексты mso_hook_add('comments_content', 'smiles_custom'); # хук на тексты }
function colorbox_autoload($args = array()) { mso_hook_add('admin_init', 'colorbox_admin_init'); mso_hook_add('head', 'colorbox_head'); mso_hook_add('admin_head', 'colorbox_head'); mso_hook_add('content_out', 'colorbox_content'); }
function feedburner_autoload($args = array()) { mso_hook_add('admin_init', 'feedburner_admin_init'); # хук на админку mso_hook_add('init', 'feedburner_init'); # хук на init }
function sitemap_autoload($args = array()) { mso_hook_add('content', 'sitemap_content'); # хук на обработку текста [sitemap] mso_hook_add('page_404', 'sitemap404'); # хук на 404-страницу }
function lightbox_autoload($args = array()) { mso_hook_add('head', 'lightbox_head'); mso_hook_add('admin_head', 'lightbox_head'); mso_hook_add('content_out', 'lightbox_content'); # хук на вывод контента после обработки всех тэгов }
function shjs_autoload() { mso_hook_add('head', 'shjs_head'); $options = mso_get_option('plugin_shjs', 'plugins', array()); if (isset($options['default_lang']) and $options['default_lang']) { mso_hook_add('content', 'shjs_content'); } }
function random_gal_autoload($args = array()) { mso_register_widget('random_gal_widget', t('Галерея')); # регистрируем виджет mso_hook_add('custom_page_404', 'random_gal_custom_page_404'); # хук для подключения к шаблону mso_hook_add('head', 'random_gal_head'); }
function template_options_autoload($args = array()) { mso_create_allow('template_options_admin', t('Доступ к настройкам шаблона')); if (is_type('admin')) { mso_hook_add('admin_init', 'template_options_admin_init'); } # хук на админку }
function guestbook_autoload($args = array()) { mso_hook_add('admin_init', 'guestbook_admin_init'); # хук на админку mso_hook_add('custom_page_404', 'guestbook_custom_page_404'); # хук для подключения к шаблону mso_register_widget('guestbook_widget', t('Гостевая книга')); }
function popup_autoload() { $options = mso_get_option('plugin_popup', 'plugins', array()); if (isset($options['popup-content']) and $options['popup-content']) { mso_hook_add('body_end', 'popup_body_end'); mso_hook_add('head', 'popup_head'); } }
function xml_sitemap_autoload($args = array()) { mso_hook_add('edit_category', 'xml_sitemap_custom'); mso_hook_add('new_category', 'xml_sitemap_custom'); mso_hook_add('delete_category', 'xml_sitemap_custom'); mso_hook_add('new_page', 'xml_sitemap_custom'); mso_hook_add('edit_page', 'xml_sitemap_custom'); }
function range_url_autoload() { // в админке и rss не используем if (mso_segment(1) != 'admin' and !is_feed()) { mso_hook_add('init', 'range_url_init'); } # хук на init }
function antispam_autoload($args = array()) { mso_hook_add('admin_init', 'antispam_admin_init'); # хук на админку mso_hook_add('new_comments_check_spam', 'antispam_check_spam'); # хук новый комментарий mso_hook_add('new_comments_check_spam_comusers', 'antispam_check_spam_comusers'); # хук новый комментарий для комюзера }
function maxsite_auth_autoload() { mso_hook_add('init', 'maxsite_auth_custom'); mso_hook_add('page-comment-form', 'maxsite_auth_page_comment_form'); mso_hook_add('admin_init', 'maxsite_auth_admin_init'); # хук на админку mso_hook_add('login_form_auth', 'maxsite_auth_login_form_auth'); # хук на форму логина }
function redirect_autoload($args = array()) { mso_hook_add('admin_init', 'redirect_admin_init'); # хук на админку mso_hook_add('init', 'redirect_init'); # хук на init mso_hook_add('custom_page_404', 'redirect_custom_page_404', 5); # хук на custom_page_404 с низким приоритетом }
function rater_autoload($args = array()) { if (is_type('page')) { mso_hook_add('head', 'rater_head'); mso_hook_add('content_end', 'rater_content_end'); } mso_register_widget('rater_widget', t('Рейтинг страниц')); # регистрируем виджет }
function comment_smiles_autoload($args = array()) { mso_hook_add('head', 'comment_smiles_head'); # хук на head шаблона - для JS mso_hook_add('admin_comment_edit', 'comment_smiles_head_admin_comment_edit'); # для JS админки mso_hook_add('comments_content_start', 'comment_smiles_custom', 1); # хук на форму }
function down_count_autoload($args = array()) { mso_hook_add('init', 'down_count_init'); # хук на обработку входящего url mso_hook_add('content', 'down_count_content'); # хук на обработку текста mso_hook_add('admin_init', 'down_count_admin_init'); # хук на админку }
function upload_editor_autoload() { if (is_login() && mso_check_allow('admin_files')) { mso_hook_add('new_page', 'upload_editor_new_page'); if (mso_segment(2) == 'page_new') { mso_hook_add('admin_content', 'upload_editor_js'); } } }
function captcha_autoload($args = array()) { if (!is_login() and !is_login_comuser()) { mso_hook_add('comments_content_end', 'captcha_go'); # хук на отображение картинки mso_hook_add('comments_new_captcha', 'captcha_new_comment'); # хук на обработку капчи } }
function addzakl_autoload($args = array()) { if (is_type('page')) { $options = mso_get_option('plugin_addzakl', 'plugins', array()); if (!isset($options['priory'])) { $options['priory'] = 10; } mso_hook_add('content_end', 'addzakl_content_end', $options['priory']); } }
function ushki_autoload($args = array()) { mso_hook_add('admin_init', 'ushki_admin_init'); # хук на админку mso_register_widget('ushki_widget', t('Ушки')); # регистрируем виджет //mso_hook_add( 'content', 'ushki_content'); # хук на вывод контента mso_hook_add('content_content', 'ushki_content'); # хук на вывод контента }
function samborsky_ping_autoload($args = array()) { // Ставим хук на публикацию. При mso_new_page и mso_edit_page mso_hook_add('new_page_publish', 'samborsky_ping_do'); mso_hook_add('edit_page_publish', 'samborsky_ping_do'); if (is_type('admin')) { // хук на админку mso_hook_add('admin_init', 'samborsky_ping_init'); } }
function theme_switch_autoload($args = array()) { mso_hook_add('admin_init', 'theme_switch_admin_init'); # хук на админку mso_register_widget('theme_switch_widget', t('Шаблоны сайта')); # регистрируем виджет mso_hook_add('init', 'theme_switch_init', 50); # хук на init с высоким приоритетом mso_hook_add('body_start', 'theme_switch_body_start'); # хук на body_start }