• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP find_replace_templatesets函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中find_replace_templatesets函数的典型用法代码示例。如果您正苦于以下问题:PHP find_replace_templatesets函数的具体用法?PHP find_replace_templatesets怎么用?PHP find_replace_templatesets使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了find_replace_templatesets函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: deactivate

 public function deactivate()
 {
     require_once MYBB_ROOT . "inc/adminfunctions_templates.php";
     $templates = array("myprofile_buddylist", "myprofile_buddylist_buddy_count", "myprofile_buddylist_buddy", "myprofile_buddylist_row", "myprofile_buddylist_spacer");
     MyProfileUtils::delete_templates($templates);
     find_replace_templatesets("member_profile", "#" . preg_quote('{$myprofile_buddylist}') . "#i", '', 0);
 }
开发者ID:medbenji,项目名称:MyProfile,代码行数:7,代码来源:myprofilebuddylist.class.php


示例2: automedia_reapply_template_edits

function automedia_reapply_template_edits()
{
    require_once MYBB_ROOT . "/inc/adminfunctions_templates.php";
    find_replace_templatesets("usercp_nav_misc", "#" . preg_quote('</a></td></tr><tr><td class="trow1 smalltext"><a href="usercp.php?action=userautomedia" class="usercp_nav_item usercp_nav_options">{$lang->av_ucp_menu}') . "#s", '', '', false);
    find_replace_templatesets("usercp_nav_misc", "#" . preg_quote('<tr><td class="trow1 smalltext"><a href="usercp.php?action=userautomedia" class="usercp_nav_item usercp_nav_options">AutoMedia</a></td></tr>') . "#s", '', '', false);
    find_replace_templatesets("usercp_nav_misc", "#" . preg_quote('{$lang->ucp_nav_view_profile}') . "#i", '{$lang->ucp_nav_view_profile}</a></td></tr><tr><td class="trow1 smalltext"><a href="usercp.php?action=userautomedia" class="usercp_nav_item usercp_nav_options">{$lang->av_ucp_menu}');
}
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:7,代码来源:automedia_admincp.php


示例3: mytwconnect_uninstall

function mytwconnect_uninstall()
{
    global $db, $PL, $cache, $lang;
    if (!$lang->mytwconnect) {
        $lang->load('mytwconnect');
    }
    if (!file_exists(PLUGINLIBRARY)) {
        flash_message($lang->mytwconnect_pluginlibrary_missing, "error");
        admin_redirect("index.php?module=config-plugins");
    }
    $PL or (require_once PLUGINLIBRARY);
    // Drop settings
    $PL->settings_delete('mytwconnect');
    // Delete our columns
    $db->query("ALTER TABLE " . TABLE_PREFIX . "users DROP `twavatar`, DROP `twbio`, DROP `twlocation`, DROP `mytw_uid`");
    // Delete the plugin from cache
    $info = mytwconnect_info();
    $shadePlugins = $cache->read('shade_plugins');
    unset($shadePlugins[$info['name']]);
    $cache->update('shade_plugins', $shadePlugins);
    $PL->templates_delete('mytwconnect');
    // Try to update templates
    require_once MYBB_ROOT . 'inc/adminfunctions_templates.php';
    find_replace_templatesets('header_welcomeblock_guest', '#' . preg_quote('&mdash; <a href="{$mybb->settings[\'bburl\']}/mytwconnect.php?action=login">{$lang->mytwconnect_login}</a>') . '#i', '');
}
开发者ID:forumwatt,项目名称:MyTwitter-Connect,代码行数:25,代码来源:mytwconnect.php


示例4: update

 private function update()
 {
     global $db, $mybb, $cache, $lang;
     $new_settings = $drop_settings = array();
     // Get the gid
     $query = $db->simple_select("settinggroups", "gid", "name='mytwconnect'");
     $gid = (int) $db->fetch_field($query, "gid");
     // 1.0.2
     if (version_compare($this->old_version, '1.0.1', "<")) {
         require_once MYBB_ROOT . "inc/adminfunctions_templates.php";
         find_replace_templatesets('mytwconnect_usercp_settings', '#' . preg_quote('<input type="submit" value="{$lang->mytwconnect_settings_save}" />') . '#i', '<input type="submit" class=\\"button\\" value="{$lang->mytwconnect_settings_save}" />{$unlink}');
     }
     // 2.0
     if (version_compare($this->old_version, '2.0', "<")) {
         $new_settings[] = array("name" => "mytwconnect_twavatar", "title" => $db->escape_string($lang->setting_mytwconnect_twavatar), "description" => $db->escape_string($lang->setting_mytwconnect_twavatar_desc), "optionscode" => "yesno", "value" => 1, "disporder" => 30, "gid" => $gid);
         $new_settings[] = array("name" => "mytwconnect_tweet", "title" => $db->escape_string($lang->setting_mytwconnect_tweet), "description" => $db->escape_string($lang->setting_mytwconnect_tweet_desc), "optionscode" => "yesno", "value" => 0, "disporder" => 31, "gid" => $gid);
         $new_settings[] = array("name" => "mytwconnect_tweet_message", "title" => $db->escape_string($lang->setting_mytwconnect_tweet_message), "description" => $db->escape_string($lang->setting_mytwconnect_tweet_message_desc), "optionscode" => "textarea", "value" => $lang->mytwconnect_default_tweet, "disporder" => 32, "gid" => $gid);
         // Let's at least try to change that, anyway, 2.0 has backward compatibility so it doesn't matter if this fails
         require_once MYBB_ROOT . "inc/adminfunctions_templates.php";
         find_replace_templatesets('header_welcomeblock_guest', '#' . preg_quote('twlogin') . '#i', 'login');
     }
     if ($new_settings) {
         $db->insert_query_multiple('settings', $new_settings);
     }
     if ($drop_settings) {
         $db->delete_query('settings', "name IN ('mytwconnect_" . implode("','mytwconnect_", $drop_settings) . "')");
     }
     rebuild_settings();
     // Update the current version number and redirect
     $this->plugins[$this->info['name']] = array('title' => $this->info['name'], 'version' => $this->version);
     $cache->update('shade_plugins', $this->plugins);
     flash_message($lang->sprintf($lang->mytwconnect_success_updated, $this->old_version, $this->version), "success");
     admin_redirect($_SERVER['HTTP_REFERER']);
 }
开发者ID:forumwatt,项目名称:MyTwitter-Connect,代码行数:34,代码来源:class_update.php


示例5: icon_in_showthread_deactivate

function icon_in_showthread_deactivate()
{
    require_once MYBB_ROOT . 'inc/adminfunctions_templates.php';
    find_replace_templatesets('showthread', '#\\s?' . preg_quote('<div style="display: inline-block; vertical-align: middle; padding: 0 3px;">{$thread_icon}</div>') . '#i', '', 0);
    find_replace_templatesets('printthread', '#\\s?' . preg_quote('<div style="display: inline-block; vertical-align: middle; padding: 0 3px;">{$thread_icon}</div>') . '#i', '', 0);
    find_replace_templatesets('newreply', '#\\s?' . preg_quote('<div style="display: inline-block; vertical-align: middle; padding: 0 3px;">{$thread_icon}</div>') . '#i', '', 0);
}
开发者ID:Destroy666x,项目名称:MyBB-Thread-Icon-in-Showthread,代码行数:7,代码来源:icon_in_showthread.php


示例6: tags_activate

function tags_activate()
{
    global $mybb, $db;
    require_once MYBB_ROOT . 'inc/adminfunctions_templates.php';
    // add settings
    $query = $db->simple_select('settinggroups', 'gid', "name='tags'");
    $gid = $db->fetch_field($query, 'gid');
    $i = 0;
    $settings = array(array("name" => "tags_enabled", "title" => "Enable Plugin", "description" => $db->escape_string('Set to "on" if you want Enable this plugin.'), "optionscode" => "onoff", "value" => tags_setting_value("tags_enabled", 1), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_droptable", "title" => $db->escape_string('Drop table?'), "description" => $db->escape_string('Do you want the "tags" table droped when you uninstall this plugin?'), "optionscode" => "yesno", "value" => tags_setting_value("tags_droptable", 1), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_seo", "title" => "SEO Friendly URL", "description" => $db->escape_string('Do you want to use SEO URLs (ex: tag-***.html) for tags?<br />
You must add these codes to ".htaccess" file before set it to "On":
<pre style="background: #f7f7f7;border: 1px solid #ccc;padding: 6px;border-radius: 3px;direction: ltr;text-align: left;font-size: 12px;">
RewriteEngine <strong>on</strong>
RewriteRule <strong>^tag-(.*?)\\.html$ tag.php?name=$1</strong> <em>[L,QSA]</em>
RewriteRule <strong>^tag\\.html$ tag.php</strong> <em>[L,QSA]</em>
</pre>'), "optionscode" => "yesno", "value" => tags_setting_value("tags_seo", 0), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_forceseo", "title" => "Force users to use seo URLs?", "description" => $db->escape_string('Do you want to force users to use SEO URLs (ex: tag-***.html) for tags?'), "optionscode" => "yesno", "value" => tags_setting_value("tags_forceseo", 0), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_urlscheme", "title" => "Tags URL scheme", "description" => $db->escape_string('Enter the Tag URL scheme. By default this is tag-{name}.html. Please note that if you change this, you will also need to add a new rewrite rule in your .htaccess file.'), "optionscode" => "text", "value" => tags_setting_value("tags_urlscheme", 'tag-{name}.html'), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_per_page", "title" => "Tags per page", "description" => $db->escape_string('How many tags shown in "Tags" page?'), "optionscode" => "text", "value" => tags_setting_value("tags_per_page", 10), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_limit", "title" => $db->escape_string('Limit Tags in "Index Page" and "Forum Display Page"'), "description" => $db->escape_string('How many tags shown in "Index Page" and "Forum Display Page" ?'), "optionscode" => "text", "value" => tags_setting_value("tags_limit", 50), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_index", "title" => $db->escape_string('Show tags in Index Page?'), "description" => $db->escape_string('Do you want tags shown in Index Page?'), "optionscode" => "yesno", "value" => tags_setting_value("tags_index", 1), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_forumdisplay", "title" => $db->escape_string('Show tags in "Forum Display" Page?'), "description" => $db->escape_string('Do you want tags shown in "Forum Display" Page?'), "optionscode" => "yesno", "value" => tags_setting_value("tags_forumdisplay", 1), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_max_thread", "title" => $db->escape_string('Maximun tags for a thread'), "description" => $db->escape_string('Please enter the maximum number of tags for threads. Set it to 0 for unlimited.'), "optionscode" => "text", "value" => tags_setting_value("tags_max_thread", 20), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_groups", "title" => $db->escape_string('Tags Moderators'), "description" => $db->escape_string('Please select the groups can edit "tags". please note who can edit tags, that can edit thread.'), "optionscode" => "groupselect", "value" => tags_setting_value("tags_groups", -1), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_bad", "title" => $db->escape_string('Bad Tags'), "description" => $db->escape_string('Please enter the bad tags, this tags don\'t shown in tags list. enter each tags in new line'), "optionscode" => "textarea", "value" => tags_setting_value("tags_bad", ''), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_maxchars", "title" => $db->escape_string('Maximum tag length'), "description" => $db->escape_string('Please enter the maximum length that a tag can have'), "optionscode" => "text", "value" => tags_setting_value("tags_maxchars", 20), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_minchars", "title" => $db->escape_string('Minimum tag length'), "description" => $db->escape_string('Please enter the minimum length that a tag can have'), "optionscode" => "text", "value" => tags_setting_value("tags_minchars", 0), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_charreplace", "title" => $db->escape_string('Character Translation'), "description" => $db->escape_string('If you want translate some characters to other characters, you can use this setting.<br />
For example if you want replace "a" to "b" and "c" to "d" use this code:<br />
<pre style="background: #f7f7f7;border: 1px solid #ccc;padding: 6px;border-radius: 3px;direction: ltr;text-align: left;font-size: 12px;">
a=>b
c=>d
</pre>'), "optionscode" => "textarea", "value" => tags_setting_value("tags_charreplace", ''), "disporder" => ++$i, "gid" => $gid), array("name" => "tags_disallowedforums", "title" => $db->escape_string('Disallowed forums'), "description" => $db->escape_string('Please select the forums you want "Tags" don\'t work on these.'), "optionscode" => "forumselect", "value" => tags_setting_value("tags_disallowedforums", 0), "disporder" => ++$i, "gid" => $gid));
    $db->delete_query('settings', "gid = '{$gid}'");
    $db->insert_query_multiple("settings", $settings);
    rebuild_settings();
    find_replace_templatesets('newthread', '#' . preg_quote('{$posticons}') . '#', '{$tags}{$posticons}');
    find_replace_templatesets('editpost', '#' . preg_quote('{$posticons}') . '#', '{$tags}{$posticons}');
    find_replace_templatesets('showthread', '#' . preg_quote('{$ratethread}') . '#', '{$ratethread}{$tags}');
    find_replace_templatesets('showthread', '#' . preg_quote('{$headerinclude}') . '#', '<meta name="keywords" content="{$thread[\'tags_meta\']}" />{$headerinclude}');
    find_replace_templatesets('index', '#' . preg_quote('{$forums}') . '#', '{$forums}{$tags}');
    find_replace_templatesets('forumdisplay', '#' . preg_quote('{$threadslist}') . '#', '{$threadslist}{$tags}');
}
开发者ID:ATofighi,项目名称:MyBB-Tags,代码行数:30,代码来源:active.php


示例7: zmultigroup_deactivate

function zmultigroup_deactivate()
{
    global $db;
    require_once MYBB_ROOT . "/inc/adminfunctions_templates.php";
    $string = '{$post[\'zmultigroup\']}';
    find_replace_templatesets("postbit", "#" . preg_quote($string) . "#i", '');
    find_replace_templatesets("postbit_classic", "#" . preg_quote($string) . "#i", '');
}
开发者ID:zamight,项目名称:zMultiClone,代码行数:8,代码来源:zmultigroup.php


示例8: youtubeminer_deactivate

function youtubeminer_deactivate()
{
    global $db, $header;
    require MYBB_ROOT . "inc/adminfunctions_templates.php";
    require_once MYBB_ROOT . "admin/inc/functions_themes.php";
    find_replace_templatesets("headerinclude", "#" . preg_quote($header) . '#', '', 0);
    $db->delete_query("templates", "title='youtubeminer'");
}
开发者ID:thangnguyenngoc,项目名称:mybb-youtube-gallery,代码行数:8,代码来源:youtubeminer.php


示例9: cloudflare_deactivate

function cloudflare_deactivate()
{
    global $db, $mybb;
    include MYBB_ROOT . "/inc/adminfunctions_templates.php";
    find_replace_templatesets('footer', '#<!-- End powered by --><cfb>#', '<!-- End powered by -->');
    $db->delete_query("templates", "title = 'cloudflare_postbit_spam'");
    rebuild_settings();
}
开发者ID:dequeues,项目名称:MyBB-CloudFlare-Manager,代码行数:8,代码来源:cloudflare.php


示例10: deactivate

 public function deactivate()
 {
     global $db;
     require_once MYBB_ROOT . "inc/adminfunctions_templates.php";
     $templates = array("myprofile_member_headerinclude");
     MyProfileUtils::delete_templates($templates);
     find_replace_templatesets("headerinclude", "#" . preg_quote('{$myprofile_headerinclude}') . "#i", '', 0);
 }
开发者ID:medbenji,项目名称:MyProfile,代码行数:8,代码来源:myprofileessence.class.php


示例11: tags_deactivate

function tags_deactivate()
{
    require_once MYBB_ROOT . 'inc/adminfunctions_templates.php';
    find_replace_templatesets('newthread', '#' . preg_quote('{$tags}') . '#', '');
    find_replace_templatesets('editpost', '#' . preg_quote('{$tags}') . '#', '');
    find_replace_templatesets('showthread', '#' . preg_quote('{$tags}') . '#', '');
    find_replace_templatesets('showthread', '#' . preg_quote('<meta name="keywords" content="{$thread[\'tags_meta\']}" />') . '#', '');
    find_replace_templatesets('index', '#' . preg_quote('{$tags}') . '#', '');
    find_replace_templatesets('forumdisplay', '#' . preg_quote('{$tags}') . '#', '');
}
开发者ID:ATofighi,项目名称:MyBB-Tags,代码行数:10,代码来源:deactive.php


示例12: cloudflare_deactivate

function cloudflare_deactivate()
{
    global $db, $mybb;
    include MYBB_ROOT . "/inc/adminfunctions_templates.php";
    find_replace_templatesets("postbit", "#" . preg_quote('{$post[\'cloudflare_spam\']}') . "#i", '', 0);
    find_replace_templatesets("postbit_classic", "#" . preg_quote('{$post[\'cloudflare_spam\']}') . "#i", '', 0);
    find_replace_templatesets('footer', '#<!-- End powered by --><cfb>#', '<!-- End powered by -->');
    $db->delete_query("templates", "title = 'cloudflare_postbit_spam'");
    change_admin_permission("cloudflare", "", -1);
}
开发者ID:EspialWires,项目名称:MyBB-CloudFlare-Manager,代码行数:10,代码来源:cloudflare.php


示例13: portal_news_preview_deactivate

function portal_news_preview_deactivate()
{
    global $db, $mybb;
    require_once MYBB_ROOT . 'inc/adminfunctions_templates.php';
    find_replace_templatesets('portal_announcement', '#' . preg_quote('<br/><br/>{$announcement[\'link\']}') . '#', '', 0);
    $db->query("DELETE FROM " . TABLE_PREFIX . "settings WHERE name='isenabled'");
    $db->query("DELETE FROM " . TABLE_PREFIX . "settings WHERE name='whichway'");
    $db->query("DELETE FROM " . TABLE_PREFIX . "settings WHERE name='cutstring'");
    $db->query("DELETE FROM " . TABLE_PREFIX . "settings WHERE name='characters'");
    $db->query("DELETE FROM " . TABLE_PREFIX . "settings WHERE name='readmoremessage'");
    rebuild_settings();
}
开发者ID:erbodega,项目名称:MyBB-Portal-News-Preview,代码行数:12,代码来源:portal_news_preview.php


示例14: update

 private function update()
 {
     global $db, $mybb, $cache, $lang;
     $new_settings = $drop_settings = array();
     // Get the gid
     $query = $db->simple_select("settinggroups", "gid", "name='myfbconnect'");
     $gid = (int) $db->fetch_field($query, "gid");
     // 1.0.1
     if (version_compare($this->old_version, '1.0.1', "<")) {
         require_once MYBB_ROOT . "inc/adminfunctions_templates.php";
         find_replace_templatesets('myfbconnect_register', '#' . preg_quote('<td valign="top">') . '#i', '<td valign="top">{$errors}');
     }
     // 1.0.3
     if (version_compare($this->old_version, '1.0.3', "<")) {
         $new_settings[] = array("name" => "myfbconnect_verifiedonly", "title" => $db->escape_string($lang->setting_myfbconnect_verifiedonly), "description" => $db->escape_string($lang->setting_myfbconnect_verifiedonly_desc), "optionscode" => "yesno", "value" => 0, "disporder" => 7, "gid" => $gid);
     }
     // 1.1
     if (version_compare($this->old_version, '1.1', "<")) {
         $new_settings[] = array("name" => "myfbconnect_fbavatar", "title" => $db->escape_string($lang->setting_myfbconnect_fbavatar), "description" => $db->escape_string($lang->setting_myfbconnect_fbavatar_desc), "optionscode" => "yesno", "value" => 1, "disporder" => 12, "gid" => $gid);
         require_once MYBB_ROOT . "inc/adminfunctions_templates.php";
         find_replace_templatesets('myfbconnect_usercp_settings', '#' . preg_quote('<input type="submit" value="{$lang->myfbconnect_settings_save}" />') . '#i', '<input type="submit" class=\\"button\\" value="{$lang->myfbconnect_settings_save}" />{$unlink}');
     }
     // 2.0
     if (version_compare($this->old_version, '2.0', "<")) {
         $drop_settings[] = "requestpublishingperms";
         $new_settings[] = array("name" => "myfbconnect_postonwall", "title" => $db->escape_string($lang->setting_myfbconnect_postonwall), "description" => $db->escape_string($lang->setting_myfbconnect_postonwall_desc), "optionscode" => "yesno", "value" => 0, "disporder" => 30, "gid" => $gid);
         $new_settings[] = array("name" => "myfbconnect_postonwall_message", "title" => $db->escape_string($lang->setting_myfbconnect_postonwall_message), "description" => $db->escape_string($lang->setting_myfbconnect_postonwall_message_desc), "optionscode" => "textarea", "value" => $lang->myfbconnect_default_postonwall_message, "disporder" => 31, "gid" => $gid);
         // Let's at least try to change that, anyway, 2.0 has backward compatibility so it doesn't matter if this fails
         require_once MYBB_ROOT . "inc/adminfunctions_templates.php";
         find_replace_templatesets('header_welcomeblock_guest', '#' . preg_quote('fblogin') . '#i', 'login');
     }
     // 2.3
     if (version_compare($this->old_version, '2.3', "<")) {
         // Add the report table
         if (!$db->table_exists('myfbconnect_reports')) {
             $collation = $db->build_create_table_collation();
             $db->write_query("CREATE TABLE " . TABLE_PREFIX . "myfbconnect_reports(\n\t\t            id INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t            dateline VARCHAR(15) NOT NULL,\n\t\t            code VARCHAR(10) NOT NULL,\n\t\t            file TEXT,\n\t\t            line INT(6) NOT NULL,\n\t\t            message TEXT,\n\t\t            trace TEXT\n\t\t            ) ENGINE=MyISAM{$collation};");
         }
     }
     if ($new_settings) {
         $db->insert_query_multiple('settings', $new_settings);
     }
     if ($drop_settings) {
         $db->delete_query('settings', "name IN ('myfbconnect_" . implode("','myfbconnect_", $drop_settings) . "')");
     }
     rebuild_settings();
     // Update the current version number and redirect
     $this->plugins[$this->info['name']] = array('title' => $this->info['name'], 'version' => $this->version);
     $cache->update('shade_plugins', $this->plugins);
     flash_message($lang->sprintf($lang->myfbconnect_success_updated, $this->old_version, $this->version), "success");
     admin_redirect($_SERVER['HTTP_REFERER']);
 }
开发者ID:myWebDev,项目名称:MyFacebook-Connect,代码行数:52,代码来源:class_update.php


示例15: teamonline_uninstall

function teamonline_uninstall()
{
    global $db;
    $db->delete_query('settings', "name LIKE ('teamonline\\_%')");
    $db->delete_query('settinggroups', "name = 'plugin_teamonline'");
    require MYBB_ROOT . '/inc/adminfunctions_templates.php';
    find_replace_templatesets("index", '#' . preg_quote('{$teamonline}') . '#', '');
    find_replace_templatesets("portal", '#' . preg_quote('{$teamonline}') . '#', '');
    $deletetemplates = array('teamonline', 'teamonline_row', 'teamonline_no');
    foreach ($deletetemplates as $title) {
        $db->query("DELETE FROM " . TABLE_PREFIX . "templates WHERE title='" . $title . "'");
    }
}
开发者ID:ambsalinas,项目名称:anima,代码行数:13,代码来源:teamonline.php


示例16: resim_deactivate

function resim_deactivate()
{
    global $mybb, $db, $cache, $lang, $settings;
    require_once MYBB_ROOT . "/inc/adminfunctions_templates.php";
    find_replace_templatesets("headerinclude", "#" . preg_quote("{\$ncode}") . "#i", "", 0);
    $db->query("DELETE FROM " . TABLE_PREFIX . "mycode WHERE title='Ncode1'");
    $db->query("DELETE FROM " . TABLE_PREFIX . "mycode WHERE title='Ncode2'");
    $cache->update_mycode();
    $db->query("DELETE FROM " . TABLE_PREFIX . "settinggroups WHERE name='resim_ayarlari'");
    $db->query("DELETE FROM " . TABLE_PREFIX . "settings WHERE name='nmode'");
    $db->query("DELETE FROM " . TABLE_PREFIX . "settings WHERE name='ntema'");
    $db->query("DELETE FROM " . TABLE_PREFIX . "settings WHERE name='nyuk'");
    $db->query("DELETE FROM " . TABLE_PREFIX . "settings WHERE name='ngen'");
    rebuild_settings();
}
开发者ID:EmreKarakaya,项目名称:mybb-ncode,代码行数:15,代码来源:resim.php


示例17: deactivate

 public static function deactivate()
 {
     global $db;
     self::getTpl();
     for ($i = 0; $i < sizeof(self::$tpl); $i++) {
         $db->delete_query('templates', "title = '" . self::$tpl[$i]['title'] . "'");
     }
     require_once MYBB_ROOT . '/inc/adminfunctions_templates.php';
     find_replace_templatesets('header_welcomeblock_member', '#' . preg_quote('<!-- UNREADPOSTS_LINK -->') . '#', '');
     find_replace_templatesets('postbit_posturl', '#' . preg_quote('<!-- IS_UNREAD -->') . '#', '');
     find_replace_templatesets('search_results_posts', '#' . preg_quote('<!-- UNREADPOSTS_MARKALL -->') . '#', '');
     find_replace_templatesets('search_results_threads', '#' . preg_quote('<!-- UNREADPOSTS_MARKALL -->') . '#', '');
     find_replace_templatesets('search_results_threads_thread', '#' . preg_quote('{$thread[\'startdate\']}') . '#', '');
     find_replace_templatesets('search_results_threads_thread', '#' . preg_quote('{$thread[\'unreadPosts_thread\']}') . '#', '');
     find_replace_templatesets('headerinclude', '#' . preg_quote('<!-- UNREADPOSTS_CSS -->') . '#', '');
     find_replace_templatesets("footer", '#' . preg_quote('<!-- UNREADPOSTS_JS -->') . '#', '');
 }
开发者ID:kpietrek,项目名称:MyBB-View_Unread_posts,代码行数:17,代码来源:unreadPosts.tpl.php


示例18: cookielaw_deactivate

function cookielaw_deactivate()
{
    global $mybb, $db;
    require_once MYBB_ROOT . 'inc/adminfunctions_templates.php';
    $db->delete_query("settinggroups", "name = 'cookielaw'");
    $settings = array("cookielaw_method");
    $settings = "'" . implode("','", $settings) . "'";
    $db->delete_query("settings", "name IN ({$settings})");
    rebuild_settings();
    find_replace_templatesets("header", "#" . preg_quote('{$cookielaw}') . "#i", '', 0);
    if (substr($mybb->version, 0, 3) == '1.6') {
        find_replace_templatesets("footer", "#" . preg_quote(' | <a href="{$mybb->settings[\'bburl\']}/misc.php?action=cookielaw_info">{$lang->cookielaw_footer}</a>') . "#i", '', 0);
    } elseif (substr($mybb->version, 0, 3) == '1.8') {
        find_replace_templatesets("footer", "#" . preg_quote("\n\t\t\t\t" . '<li><a href="{$mybb->settings[\'bburl\']}/misc.php?action=cookielaw_info">{$lang->cookielaw_footer}</a></li>') . "#i", '', 0);
    }
    $db->delete_query("templates", "title IN ('cookielaw_info','cookielaw_header','cookielaw_buttons_notify','cookielaw_buttons_opt','cookielaw_button_more_info','cookielaw_header_no_cookies')");
}
开发者ID:Blackbeeard,项目名称:Cookie-Law,代码行数:17,代码来源:cookielaw.php


示例19: xthreads_db_fielddef

		`multival_limit` ' . xthreads_db_fielddef('int', null, true) . ' not null default 0,
		`inputformat` text not null,
		`inputvalidate` text not null,
		`hidefield` ' . xthreads_db_fielddef('int', null, false) . ' not null default 0
	)');
    $db->update_query('threadfields', array('inputformat' => '{VALUE}'));
    // hideedit -> hidefield transition
    $db->update_query('threadfields', array('hidefield' => XTHREADS_HIDE_THREAD));
    $db->update_query('threadfields', array('hidefield' => XTHREADS_HIDE_INPUT | XTHREADS_HIDE_THREAD), 'hideedit != 0');
    $db->write_query('ALTER TABLE `' . $db->table_prefix . 'threadfields` DROP COLUMN `hideedit`');
    // fix email masks
    $db->update_query('threadfields', array('textmask' => $db->escape_string('^([^ "(),:;<>@\\[\\\\\\]]+)@([a-z0-9_.\\-]+)$')), 'textmask="' . $db->escape_string('^([a-z0-9_.\\-]+)@([a-z0-9_.\\-]+)$') . '"');
    // we never used this, so may as well get rid of it
    $db->write_query('ALTER TABLE `' . $db->table_prefix . 'forums` DROP COLUMN `xthreads_wol_xtattachment`');
    if (XTHREADS_MODIFY_TEMPLATES) {
        find_replace_templatesets('showthread', '#\\{\\$classic_header\\}#', '{$threadfields_display}{$classic_header}');
    }
    require_once MYBB_ROOT . 'inc/xthreads/xt_install.php';
    // migrate templates - surely no-one else is ending their template names with "threadfields_inputrow", right?
    $db->write_query('UPDATE `' . $db->table_prefix . 'templates` SET title=CONCAT(SUBSTRING(title, 0, -21), "post_threadfields_inputrow") WHERE title LIKE "%threadfields_inputrow"');
    // global -> master template conversion
    $newtpl = xthreads_new_templates();
    // WARNING: if templates change, this could get funky
    function xtu_normalize_template($s)
    {
        return str_replace(' />', '/>', strtr(preg_replace('~\\s+~', ' ', trim($s)), array('> ' => '>', ' <' => '<')));
    }
    $query = $db->simple_select('templates', 'title,template', 'title IN ("editpost_first","forumdisplay_group_sep","forumdisplay_thread_null","showthread_noreplies","forumdisplay_searchforum_inline","post_threadfields_inputrow") AND sid=-1');
    $rmtpl = array();
    while ($tpl = $db->fetch_array($query)) {
        if (xtu_normalize_template($tpl['template']) == xtu_normalize_template($newtpl[$tpl['title']])) {
开发者ID:sammykumar,项目名称:TheVRForums,代码行数:31,代码来源:xt_upgrader.php


示例20: newpoints_plugin_undo_template_edits

function newpoints_plugin_undo_template_edits()
{
    // undo edits
    require_once MYBB_ROOT . "inc/adminfunctions_templates.php";
    find_replace_templatesets("postbit_classic", '#' . preg_quote('{$post[\'newpoints_postbit\']}') . '#', '', 0);
    find_replace_templatesets("postbit", '#' . preg_quote('{$post[\'newpoints_postbit\']}') . '#', '', 0);
    find_replace_templatesets("member_profile", '#' . preg_quote('{$newpoints_profile}') . '#', '', 0);
}
开发者ID:ambsalinas,项目名称:anima,代码行数:8,代码来源:plugin.php



注:本文中的find_replace_templatesets函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP find_rule_by_number函数代码示例发布时间:2022-05-15
下一篇:
PHP find_rep_image函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap