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

PHP set_pconfig函数代码示例

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

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



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

示例1: theme_post

function theme_post(&$a)
{
    if (!local_user()) {
        return;
    }
    if (isset($_POST['diabook-settings-submit'])) {
        set_pconfig(local_user(), 'diabook', 'font_size', $_POST['diabook_font_size']);
        set_pconfig(local_user(), 'diabook', 'line_height', $_POST['diabook_line_height']);
        set_pconfig(local_user(), 'diabook', 'resolution', $_POST['diabook_resolution']);
        set_pconfig(local_user(), 'diabook', 'color', $_POST['diabook_color']);
        set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']);
        set_pconfig(local_user(), 'diabook', 'ELZoom', $_POST['diabook_ELZoom']);
        set_pconfig(local_user(), 'diabook', 'ELPosX', $_POST['diabook_ELPosX']);
        set_pconfig(local_user(), 'diabook', 'ELPosY', $_POST['diabook_ELPosY']);
        set_pconfig(local_user(), 'diabook', 'ELPosY', $_POST['diabook_ELPosY']);
        set_pconfig(local_user(), 'diabook', 'close_pages', $_POST['diabook_close_pages']);
        set_pconfig(local_user(), 'diabook', 'close_mapquery', $_POST['diabook_close_mapquery']);
        set_pconfig(local_user(), 'diabook', 'close_profiles', $_POST['diabook_close_profiles']);
        set_pconfig(local_user(), 'diabook', 'close_helpers', $_POST['diabook_close_helpers']);
        set_pconfig(local_user(), 'diabook', 'close_services', $_POST['diabook_close_services']);
        set_pconfig(local_user(), 'diabook', 'close_friends', $_POST['diabook_close_friends']);
        set_pconfig(local_user(), 'diabook', 'close_twitter', $_POST['diabook_close_twitter']);
        set_pconfig(local_user(), 'diabook', 'close_lastusers', $_POST['diabook_close_lastusers']);
        set_pconfig(local_user(), 'diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']);
        set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']);
    }
}
开发者ID:ridcully,项目名称:friendica,代码行数:27,代码来源:config.php


示例2: langfilter_addon_settings_post

function langfilter_addon_settings_post(&$a, &$b)
{
    if (!local_user()) {
        return;
    }
    if ($_POST['langfilter-settings-submit']) {
        set_pconfig(local_user(), 'langfilter', 'languages', trim($_POST['langfilter_languages']));
        $enable = x($_POST, 'langfilter_enable') ? intval($_POST['langfilter_enable']) : 0;
        $disable = 1 - $enable;
        set_pconfig(local_user(), 'langfilter', 'disable', $disable);
        $minconfidence = 0 + $_POST['langfilter_minconfidence'];
        if (!$minconfidence) {
            $minconfidence = 0;
        } else {
            if ($minconfidence < 0) {
                $minconfidence = 0;
            } else {
                if ($minconfidence > 100) {
                    $minconfidence = 100;
                }
            }
        }
        set_pconfig(local_user(), 'langfilter', 'minconfidence', $minconfidence / 100.0);
        info(t('Language Filter Settings saved.') . EOL);
    }
}
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:26,代码来源:langfilter.php


示例3: redred_settings_post

function redred_settings_post($a, $post)
{
    if (!local_channel()) {
        return;
    }
    // don't check redred settings if redred submit button is not clicked
    if (!x($_POST, 'redred-submit')) {
        return;
    }
    $channel = App::get_channel();
    // Don't let somebody post to their self channel. Since we aren't passing message-id this would be very very bad.
    if (!trim($_POST['redred_channel'])) {
        notice(t('Channel is required.') . EOL);
        return;
    }
    if ($channel['channel_address'] === trim($_POST['redred_channel'])) {
        notice(t('Invalid channel.') . EOL);
        return;
    }
    set_pconfig(local_channel(), 'redred', 'baseapi', trim($_POST['redred_baseapi']));
    set_pconfig(local_channel(), 'redred', 'username', trim($_POST['redred_username']));
    set_pconfig(local_channel(), 'redred', 'password', z_obscure(trim($_POST['redred_password'])));
    set_pconfig(local_channel(), 'redred', 'channel', trim($_POST['redred_channel']));
    set_pconfig(local_channel(), 'redred', 'post', intval($_POST['redred_enable']));
    set_pconfig(local_channel(), 'redred', 'post_by_default', intval($_POST['redred_default']));
    info(t('redred Settings saved.') . EOL);
}
开发者ID:phellmes,项目名称:hubzilla-addons,代码行数:27,代码来源:redred.php


示例4: notes_init

/** @file */
function notes_init(&$a)
{
    if (!local_channel()) {
        return;
    }
    $ret = array('success' => true);
    if (array_key_exists('note_text', $_REQUEST)) {
        $body = escape_tags($_REQUEST['note_text']);
        // I've had my notes vanish into thin air twice in four years.
        // Provide a backup copy if there were contents previously
        // and there are none being saved now.
        if (!$body) {
            $old_text = get_pconfig(local_channel(), 'notes', 'text');
            if ($old_text) {
                set_pconfig(local_channel(), 'notes', 'text.bak', $old_text);
            }
        }
        set_pconfig(local_channel(), 'notes', 'text', $body);
    }
    // push updates to channel clones
    if (argc() > 1 && argv(1) === 'sync') {
        require_once 'include/zot.php';
        build_sync_packet();
    }
    logger('notes saved.', LOGGER_DEBUG);
    json_return_and_die($ret);
}
开发者ID:anmol26s,项目名称:hubzilla-yunohost,代码行数:28,代码来源:notes.php


示例5: skeleton_settings_post

function skeleton_settings_post($a, $s)
{
    if (!local_channel()) {
        return;
    }
    set_pconfig(local_channel(), 'skeleton', 'some_setting', $_POST['some_setting']);
}
开发者ID:git-marijus,项目名称:hubzilla-addons,代码行数:7,代码来源:skeleton.php


示例6: widgets_settings

function widgets_settings(&$a, &$o)
{
    if (!local_user()) {
        return;
    }
    $key = get_pconfig(local_user(), 'widgets', 'key');
    if ($key == '') {
        $key = mt_rand();
        set_pconfig(local_user(), 'widgets', 'key', $key);
    }
    $widgets = array();
    $d = dir(dirname(__FILE__));
    while (false !== ($f = $d->read())) {
        if (substr($f, 0, 7) == "widget_") {
            preg_match("|widget_([^.]+).php|", $f, $m);
            $w = $m[1];
            if ($w != "") {
                require_once $f;
                $widgets[] = array($w, call_user_func($w . "_widget_name"));
            }
        }
    }
    $t = file_get_contents(dirname(__FILE__) . "/settings.tpl");
    $o .= replace_macros($t, array('$submit' => t('Generate new key'), '$baseurl' => $a->get_baseurl(), '$title' => "Widgets", '$label' => t('Widgets key'), '$key' => $key, '$widgets_h' => t('Widgets available'), '$widgets' => $widgets));
}
开发者ID:robhell,项目名称:friendica-addons,代码行数:25,代码来源:widgets.php


示例7: notimeline_settings_post

function notimeline_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'notimeline-submit')) {
        return;
    }
    set_pconfig(local_user(), 'system', 'no_wall_archive_widget', intval($_POST['notimeline']));
    info(t('No Timeline settings updated.') . EOL);
}
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:8,代码来源:notimeline.php


示例8: gnot_settings_post

/**
 *
 * Callback from the settings post function.
 * $post contains the $_POST array.
 * We will make sure we've got a valid user account
 * and if so set our configuration setting for this person.
 *
 */
function gnot_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'gnot-submit')) {
        return;
    }
    set_pconfig(local_user(), 'gnot', 'enable', intval($_POST['gnot']));
    info(t('Gnot settings updated.') . EOL);
}
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:16,代码来源:gnot.php


示例9: editplain_settings_post

/**
 *
 * Callback from the settings post function.
 * $post contains the $_POST array.
 * We will make sure we've got a valid user account
 * and if so set our configuration setting for this person.
 *
 */
function editplain_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'editplain-submit')) {
        return;
    }
    set_pconfig(local_user(), 'system', 'plaintext', intval($_POST['editplain']));
    info(t('Editplain settings updated.') . EOL);
}
开发者ID:robhell,项目名称:friendica-addons,代码行数:16,代码来源:editplain.php


示例10: numfriends_settings_post

/**
 *
 * Callback from the settings post function.
 * $post contains the $_POST array.
 * We will make sure we've got a valid user account
 * and if so set our configuration setting for this person.
 *
 */
function numfriends_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'numfriends-submit')) {
        return;
    }
    set_pconfig(local_user(), 'system', 'display_friend_count', intval($_POST['numfriends']));
    info(t('Numfriends settings updated.') . EOL);
}
开发者ID:robhell,项目名称:friendica-addons,代码行数:16,代码来源:numfriends.php


示例11: altpager_settings_post

/**
 *
 * Callback from the settings post function.
 * $post contains the $_POST array.
 * We will make sure we've got a valid user account
 * and if so set our configuration setting for this person.
 *
 */
function altpager_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'altpager-submit')) {
        return;
    }
    set_pconfig(local_user(), 'system', 'alt_pager', intval($_POST['altpager']));
    info(t('Altpager settings updated.') . EOL);
}
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:16,代码来源:altpager.php


示例12: group_text_settings_post

/**
 *
 * Callback from the settings post function.
 * $post contains the $_POST array.
 * We will make sure we've got a valid user account
 * and if so set our configuration setting for this person.
 *
 */
function group_text_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'group_text-submit')) {
        return;
    }
    set_pconfig(local_user(), 'system', 'groupedit_image_limit', intval($_POST['group_text']));
    info(t('Group Text settings updated.') . EOL);
}
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:16,代码来源:group_text.php


示例13: remote_permissions_settings_post

function remote_permissions_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'remote-perms-submit')) {
        return;
    }
    set_pconfig(local_user(), 'remote_perms', 'show', intval($_POST['remote-perms']));
    info(t('Remote Permissions settings updated.') . EOL);
}
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:8,代码来源:remote_permissions.php


示例14: snautofollow_settings_post

function snautofollow_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'snautofollow-submit')) {
        return;
    }
    set_pconfig(local_user(), 'system', 'ostatus_autofriend', intval($_POST['snautofollow']));
    info(t('StatusNet AutoFollow settings updated.') . EOL);
}
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:8,代码来源:snautofollow.php


示例15: uhremotestorage_settings_post

function uhremotestorage_settings_post($a, $post)
{
    if (!local_user()) {
        return;
    }
    set_pconfig(local_user(), 'uhremotestorage', 'unhoestedurl', $_POST['unhoestedurl']);
    set_pconfig(local_user(), 'uhremotestorage', 'unhoestedauth', $_POST['unhoestedauth']);
    set_pconfig(local_user(), 'uhremotestorage', 'unhoestedapi', $_POST['unhoestedapi']);
}
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:9,代码来源:uhremotestorage.php


示例16: fromapp_settings_post

function fromapp_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'fromapp-submit')) {
        return;
    }
    set_pconfig(local_user(), 'fromapp', 'app', $_POST['fromapp-input']);
    set_pconfig(local_user(), 'fromapp', 'force', intval($_POST['fromapp-force']));
    info(t('Fromapp settings updated.') . EOL);
}
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:9,代码来源:fromapp.php


示例17: theme_post

function theme_post(&$a)
{
    if (!local_user()) {
        return;
    }
    if (isset($_POST['vier-settings-submit'])) {
        set_pconfig(local_user(), 'vier', 'style', $_POST['vier_style']);
    }
}
开发者ID:jzacman,项目名称:friendica,代码行数:9,代码来源:config.php


示例18: libertree_settings_post

function libertree_settings_post(&$a, &$b)
{
    if (x($_POST, 'libertree-submit')) {
        set_pconfig(local_user(), 'libertree', 'post', intval($_POST['libertree']));
        set_pconfig(local_user(), 'libertree', 'post_by_default', intval($_POST['libertree_bydefault']));
        set_pconfig(local_user(), 'libertree', 'libertree_api_token', trim($_POST['libertree_api_token']));
        set_pconfig(local_user(), 'libertree', 'libertree_url', trim($_POST['libertree_url']));
    }
}
开发者ID:robhell,项目名称:friendica-addons,代码行数:9,代码来源:libertree.php


示例19: dwpost_settings_post

function dwpost_settings_post(&$a, &$b)
{
    if (x($_POST, 'dwpost-submit')) {
        set_pconfig(local_channel(), 'dwpost', 'post', intval($_POST['dwpost']));
        set_pconfig(local_channel(), 'dwpost', 'post_by_default', intval($_POST['dw_bydefault']));
        set_pconfig(local_channel(), 'dwpost', 'dw_username', trim($_POST['dw_username']));
        set_pconfig(local_channel(), 'dwpost', 'dw_password', z_obscure(trim($_POST['dw_password'])));
    }
}
开发者ID:phellmes,项目名称:hubzilla-addons,代码行数:9,代码来源:dwpost.php


示例20: curweather_plugin_settings_post

function curweather_plugin_settings_post($a, $post)
{
    if (!local_user() || !x($_POST, 'curweather-settings-submit')) {
        return;
    }
    set_pconfig(local_user(), 'curweather', 'curweather_loc', trim($_POST['curweather_loc']));
    set_pconfig(local_user(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
    info(t('Current Weather settings updated.') . EOL);
}
开发者ID:swathe,项目名称:friendica-addons,代码行数:9,代码来源:curweather.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP set_plugin_messages函数代码示例发布时间:2022-05-15
下一篇:
PHP set_param函数代码示例发布时间: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