当前位置: 首页>>代码示例>>PHP>>正文


PHP Setting::getServiceSettingGlobal方法代码示例

本文整理汇总了PHP中Setting::getServiceSettingGlobal方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getServiceSettingGlobal方法的具体用法?PHP Setting::getServiceSettingGlobal怎么用?PHP Setting::getServiceSettingGlobal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Setting的用法示例。


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

示例1: sendEmail

function sendEmail($senderName, $senderEmail, $name, $email, $subject, $message)
{
    include_once ROOT . "/library/contrib/phpmailer/class.phpmailer.php";
    $mail = new PHPMailer();
    $mail->SetLanguage('en', ROOT . "/library/contrib/phpmailer/language/");
    $mail->IsHTML(true);
    $mail->CharSet = 'utf-8';
    $mail->From = $senderEmail;
    $mail->FromName = $senderName;
    $mail->Subject = $subject;
    $mail->Body = $message;
    $mail->AltBody = 'To view this email message, open the email with html enabled mailer.';
    $mail->AddAddress($email, $name);
    if (!Setting::getServiceSettingGlobal('useCustomSMTP', 0)) {
        $mail->IsMail();
    } else {
        $mail->IsSMTP();
        $mail->Host = Setting::getServiceSettingGlobal('smtpHost', '127.0.0.1');
        $mail->Port = Setting::getServiceSettingGlobal('smtpPort', 25);
    }
    ob_start();
    $ret = $mail->Send();
    ob_clean();
    if (!$ret) {
        return array(false, $mail->ErrorInfo);
    }
    return true;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:28,代码来源:mail.php

示例2: isMetaBlog

 function isMetaBlog()
 {
     return getBlogId() == Setting::getServiceSettingGlobal("defaultBlogId", 1) ? true : false;
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:4,代码来源:Textcube.Function.Misc.php

示例3: importer


//.........这里部分代码省略.........
            $post->contentformatter = isset($node['content'][0]['.attributes']['formatter']) ? $node['content'][0]['.attributes']['formatter'] : 'ttml';
            $post->contenteditor = isset($node['content'][0]['.attributes']['editor']) ? $node['content'][0]['.attributes']['editor'] : 'modern';
            $post->location = $node['location'][0]['.value'];
            $post->password = isset($node['password'][0]['.value']) ? $node['password'][0]['.value'] : null;
            $post->acceptcomment = $node['acceptComment'][0]['.value'];
            $post->accepttrackback = $node['acceptTrackback'][0]['.value'];
            $post->published = $node['published'][0]['.value'];
            if (isset($node['longitude'][0]['.value'])) {
                $post->longitude = $node['longitude'][0]['.value'];
            }
            if (isset($node['latitude'][0]['.value'])) {
                $post->latitude = $node['latitude'][0]['.value'];
            }
            $post->created = @$node['created'][0]['.value'];
            $post->modified = @$node['modified'][0]['.value'];
            if ($post->visibility == 'private' && intval($post->published) > $_SERVER['REQUEST_TIME'] || !empty($node['appointed'][0]['.value']) && $node['appointed'][0]['.value'] == 'true') {
                // for compatibility of appointed entries
                $post->visibility = 'appointed';
            }
            if ($post->slogan == '') {
                $post->slogan = 'Untitled' . $post->id;
            }
            if (!empty($node['category'][0]['.value'])) {
                $post->category = Category::getId($node['category'][0]['.value']);
            }
            if (isset($node['tag'])) {
                $post->tags = array();
                for ($i = 0; $i < count($node['tag']); $i++) {
                    if (!empty($node['tag'][$i]['.value'])) {
                        array_push($post->tags, $node['tag'][$i]['.value']);
                    }
                }
            }
            if (floatval(Setting::getServiceSettingGlobal('newlineStyle')) >= 1.1 && floatval(@$node['.attributes']['format']) < 1.1) {
                $post->content = nl2brWithHTML($post->content);
            }
            if (!$post->add()) {
                user_error(__LINE__ . $post->error);
            }
            if (isset($node['attachment'])) {
                for ($i = 0; $i < count($node['attachment']); $i++) {
                    $attachment = new Attachment();
                    $attachment->parent = $post->id;
                    $cursor =& $node['attachment'][$i];
                    $attachment->name = $cursor['name'][0]['.value'];
                    $attachment->label = $cursor['label'][0]['.value'];
                    $attachment->mime = @$cursor['.attributes']['mime'];
                    $attachment->size = $cursor['.attributes']['size'];
                    $attachment->width = $cursor['.attributes']['width'];
                    $attachment->height = $cursor['.attributes']['height'];
                    $attachment->enclosure = @$cursor['enclosure'][0]['.value'];
                    $attachment->attached = $cursor['attached'][0]['.value'];
                    $attachment->downloads = @$cursor['downloads'][0]['.value'];
                    if (!$attachment->add()) {
                        user_error(__LINE__ . $attachment->error);
                    } else {
                        if ($cursor['name'][0]['.value'] != $attachment->name) {
                            $post2 = new Post();
                            if ($post2->open($post->id, 'id, content')) {
                                $post2->content = str_replace($cursor['name'][0]['.value'], $attachment->name, $post2->content);
                                $post2->loadTags();
                                $post2->update();
                                $post2->close();
                            }
                            unset($post2);
                        }
开发者ID:webhacking,项目名称:Textcube,代码行数:67,代码来源:index.php

示例4: _t

											document.getElementById("suggestContainer").innerHTML = '<input type="text" id="bi-owner-loginid" name="user" value="" />';
										}
									//]]>
								</script>
							</div>
							
							<div class="button-box">
								<a class="button" href="#void" onclick="deleteBlog(<?php 
echo $bid;
?>
); return false;"><?php 
echo _t('블로그 삭제');
?>
</a>
								<?php 
if ($bid != Setting::getServiceSettingGlobal("defaultBlogId", 1)) {
    ?>
<a class="button" href="<?php 
    echo $context->getProperty('uri.blog');
    ?>
/control/action/blog/setDefault/?blogid=<?php 
    echo $bid;
    ?>
" onclick="setDefaultBlog('<?php 
    echo $bid;
    ?>
'); return false;"><?php 
    echo _t('대표 블로그 설정');
    ?>
</a><?php 
}
开发者ID:Avantians,项目名称:Textcube,代码行数:31,代码来源:index.php

示例5: header

    }
    if ($writer->openFile(__TEXTCUBE_CACHE_DIR__ . "/backup/{$blogid}.xml")) {
    } else {
        exit;
    }
} else {
    if ($writer->openStdout()) {
        header('Content-Disposition: attachment; filename="Textcube-Backup-' . getBlogName($blogid) . "-" . Timestamp::getDate() . '.xml"');
        header('Content-Description: Textcube Backup Data');
        header('Content-Transfer-Encoding: binary');
        header('Content-Type: application/xml');
    } else {
        exit;
    }
}
$newlineStyle = !is_null(Setting::getServiceSettingGlobal('newlineStyle')) ? ' format="' . Setting::getServiceSettingGlobal('newlineStyle') . '"' : '';
$writer->write('<?xml version="1.0" encoding="utf-8" ?>');
$writer->write('<blog type="tattertools/1.1" extension="textcube/2.0" migrational="false">');
$setting = new BlogSetting();
if ($setting->load()) {
    $setting->escape();
    $writer->write('<setting>' . '<name>' . $setting->name . '</name>' . '<secondaryDomain>' . $setting->secondaryDomain . '</secondaryDomain>' . '<defaultDomain>' . Validator::getBit($setting->defaultDomain) . '</defaultDomain>' . '<title>' . $setting->title . '</title>' . '<description>' . Utils_Unicode::correct($setting->description) . '</description>' . '<banner><name>' . $setting->banner . '</name>');
    if ($includeFileContents && file_exists(__TEXTCUBE_ATTACH_DIR__ . "/{$blogid}/{$setting->banner}")) {
        $writer->write('<content>');
        if (!empty($setting->banner) && file_exists(__TEXTCUBE_ATTACH_DIR__ . "/{$blogid}/" . $setting->banner)) {
            Base64Stream::encode(__TEXTCUBE_ATTACH_DIR__ . "/{$blogid}/{$setting->banner}", $writer);
        }
        $writer->write('</content>');
    }
    $writer->write('</banner>' . '<useSloganOnPost>' . Validator::getBit($setting->useSloganOnPost) . '</useSloganOnPost>' . '<postsOnPage>' . $setting->postsOnPage . '</postsOnPage>' . '<postsOnList>' . $setting->postsOnList . '</postsOnList>' . '<postsOnFeed>' . $setting->postsOnFeed . '</postsOnFeed>' . '<publishWholeOnFeed>' . Validator::getBit($setting->publishWholeOnFeed) . '</publishWholeOnFeed>' . '<acceptGuestComment>' . Validator::getBit($setting->acceptGuestComment) . '</acceptGuestComment>' . '<acceptcommentOnGuestComment>' . Validator::getBit($setting->acceptcommentOnGuestComment) . '</acceptcommentOnGuestComment>' . '<language>' . $setting->language . '</language>' . '<timezone>' . $setting->timezone . '</timezone>' . '</setting>');
    $writer->write(CRLF);
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php


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