Skip to content

Commit

Permalink
refs #514 : merged with 2.0 tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
inureyes committed Mar 11, 2011
2 parents fe7ebbe + 18b6797 commit 203b7b4
Show file tree
Hide file tree
Showing 50 changed files with 217 additions and 6,890 deletions.
4 changes: 3 additions & 1 deletion documents/manual_config.txt
Expand Up @@ -53,4 +53,6 @@ $service['memcached'] = false; // Using memcache to handle session and cac
$memcached['server'] = 'localhost'; // Where memcache server is.
// From Textcube 1.8.4
$service['requirelogin'] = false; // Force log-in process to every blogs. (for private blog service)
?>
// From Textcube 2.0
$service['jqueryURL'] = ''; // Add URL if you want to use external jquery via CDN. e.g.) Microsoft's CDN: http://ajax.aspnetcdn.com/ajax/jQuery/
?>
2 changes: 1 addition & 1 deletion framework/Dispatcher.php
Expand Up @@ -146,7 +146,7 @@ private function URIinterpreter() {
$interfacePath = 'interface/blog/'.$pathPart.'.php';
break;
case 'rss': case 'atom':
if(isset($uri['fragment'][1]) && in_array($uri['fragment'][1],array('category','tag','archive','search'))) {
if(isset($uri['fragment'][1]) && in_array($uri['fragment'][1],array('archive','author','category','comment','line','notifyComment','response','search','tag','trackback'))) {
$pathPart = $uri['fragment'][0].'/'.$uri['fragment'][1];
$interfacePath = 'interface/'.$pathPart.'/index.php';
}
Expand Down
5 changes: 3 additions & 2 deletions framework/id/textcube/config.default.php
Expand Up @@ -13,7 +13,7 @@
define('CRLF', "\r\n");
define('TAB', " ");
define('INT_MAX',2147483647);
define('JQUERY_VERSION','1.4.4');
define('JQUERY_VERSION','1.5.1');
if( strstr( PHP_OS, "WIN") !== false ) {
define('DS', "\\");
} else {
Expand Down Expand Up @@ -50,7 +50,7 @@
$service['flashclipboardpoter'] = true;
$service['allowBlogVisibilitySetting'] = true;
$service['disableEolinSuggestion'] = false;
$service['interface'] = 'simple'; // 'simple' or 'detail'. Default is 'detail'
$service['interface'] = 'simple'; // 'simple' or 'detail'. Default is 'simple' from 2.0
$service['pagecache'] = true;
$service['codecache'] = false;
$service['skincache'] = true;
Expand All @@ -61,4 +61,5 @@
$service['debug_rewrite_module'] = false;
$service['useNumericURLonRSS'] = false;
$service['forceinstall'] = false;
$service['jqueryURL'] = null; // You can change this to use external CDNs. (microsoft / google, etc..)
?>
36 changes: 36 additions & 0 deletions interface/atom/author/index.php
@@ -0,0 +1,36 @@
<?php
/// Copyright (c) 2004-2011, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('NO_SESSION', true);
define('__TEXTCUBE_CUSTOM_HEADER__', true);
define('__TEXTCUBE_LOGIN__',true);
require ROOT . '/library/preprocessor.php';
requireStrictBlogURL();
$context = Model_Context::getInstance();
$author = $suri['value'];
$authorId = User::getUserIdByName($author);
if(empty($authorId)) exit;
$blogid = getBlogId();

$cache = pageCache::getInstance();
$cache->reset('authorATOM-'.$authorId);
if(!$cache->load()) {
requireModel("blog.feed");
list($entries, $paging) = getEntriesWithPagingByAuthor($blogid, $author, 1, 1, 1);
if(empty($entries)) {
header ("Location: ".$context->getProperty('uri.host').$context->getProperty('uri.blog')."/atom");
exit;
}
$result = getFeedWithEntries($blogid,$entries,_textf('%1 의 글 목록',$author),'atom');
if($result !== false) {
$cache->reset('authorATOM-'.$authorId);
$cache->contents = $result;
$cache->update();
}
}
header('Content-Type: application/atom+xml; charset=utf-8');
fireEvent('FeedOBStart');
echo fireEvent('ViewAuthorATOM', $cache->contents);
fireEvent('FeedOBEnd');
?>
4 changes: 1 addition & 3 deletions interface/blog/author.php
Expand Up @@ -3,9 +3,6 @@
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
require ROOT . '/library/preprocessor.php';
if (false) {
fetchConfigVal();
}

$cache = pageCache::getInstance();
$author = empty($suri['value']) ? '' : $suri['value'];
Expand All @@ -25,6 +22,7 @@
$listView = $cache->contents;
}
require ROOT . '/interface/common/blog/begin.php';
$listFeedURL = 'author/'.URL::encode($author);
require ROOT . '/interface/common/blog/list.php';
}

Expand Down
2 changes: 1 addition & 1 deletion interface/blog/trackback/send/index.php
Expand Up @@ -19,7 +19,7 @@
<title><?php echo _text('글걸기 시도');?></title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php echo $context->getProperty('service.path') . $context->getProperty('panel.skin');?>/popup-trackback.css" />
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/common2.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion interface/common/blog/end.php
Expand Up @@ -117,7 +117,7 @@
$pluginData = $skin->sidebarStorage[$element];
$plugin = $pluginData['plugin'];
include_once (ROOT . "/plugins/{$plugin}/index.php");
$pluginURL = "{$context->getProperty('service.path')}/plugins/{$plugin}";
$pluginURL = $context->getProperty('service.path')."/plugins/{$plugin}";
$pluginPath = ROOT . "/plugins/{$plugin}";
if( !empty( $configMappings[$plugin]['config'] ) )
$configVal = getCurrentSetting($plugin);
Expand Down
1 change: 0 additions & 1 deletion interface/common/blog/list.php
Expand Up @@ -39,7 +39,6 @@
dress('list_atom_url', $context->getProperty('uri.default').'/atom/'.$listFeedURL, $listView);
$listView = fireEvent('ViewList', $listView, $list);
if(empty($entries)) $listView = $listView.CRLF.'[##_paging_list_##]';

dress('list', $listView, $view);
if(isset($cache)) {
$cache->contents = $listView;
Expand Down
18 changes: 1 addition & 17 deletions interface/common/control/header.php
Expand Up @@ -353,28 +353,12 @@
//]]>
</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/byTextcube.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/common2.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/owner.js"></script>
<?php
if(!in_array($blogMenu['contentMenu'],array('post','edit'))) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/mootools10.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/moodalbox/moodalbox.js"></script>
<link rel="stylesheet" href="<?php echo $context->getProperty('service.path');?>/resources/style/helper/moodalbox.css" type="text/css" media="screen" />
<?php
}
?>
<?php
if($context->getProperty('service.interface') == 'simple') {
if(!in_array($blogMenu['contentMenu'],array('post','edit'))) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/mootools.js"></script>
<?php
}
}
if( $context->getProperty('service.admin_script') !== null) {
if( is_array($context->getProperty('service.admin_script')) ) {
foreach( $context->getProperty('service.admin_script') as $src ) {
Expand Down
9 changes: 1 addition & 8 deletions interface/common/owner/header.php 100755 → 100644
Expand Up @@ -367,7 +367,7 @@
//]]>
</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/byTextcube.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/common2.js"></script>
Expand All @@ -383,13 +383,6 @@
<script type="text/javascript" src="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/custom.js"></script>
<?php
}
if($service['interface'] == 'simple') {
if(!in_array($blogMenu['contentMenu'],array('post','edit'))) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/mootools.js"></script>
<?php
}
}
if( isset($service['admin_script']) ) {
if( is_array($service['admin_script']) ) {
foreach( $service['admin_script'] as $src ) {
Expand Down
2 changes: 1 addition & 1 deletion interface/common/owner/headerForPopupEditor.php
Expand Up @@ -83,7 +83,7 @@
</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/locale/messages.php"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/byTextcube.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/common2.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion interface/i/index.php
Expand Up @@ -11,7 +11,7 @@
<ul id="home" title="<?php echo htmlspecialchars(Utils_Unicode::lessenAsEm($context->getProperty('blog.title'),30));?>" selected="true">
<?php
$blogAuthor = User::getBlogOwnerName($blogid);
$blogLogo = !empty($context->getProperty('blog.logo')) ? printIphoneImageResizer($blogid, $context->getProperty('blog.logo'), 80) : "{$context->getProperty('service.path')}/resources/style/iphone/image/textcube_logo.png";
$blogLogo = !is_null($context->getProperty('blog.logo')) ? printIphoneImageResizer($blogid, $context->getProperty('blog.logo'), 80) : "{$context->getProperty('service.path')}/resources/style/iphone/image/textcube_logo.png";
$itemsView = '<li class="blog_info">'.CRLF;
$itemsView .= ' <div class="logo"><img src="' . $blogLogo . '" /></div>'.CRLF;
$itemsView .= ' <div class="blog_container">'.CRLF;
Expand Down
2 changes: 1 addition & 1 deletion interface/login/index.php
Expand Up @@ -111,7 +111,7 @@
<link rel="stylesheet" type="text/css" href="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/login.ie7.css" />
<![endif]-->
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/byTextcube.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/common2.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion interface/owner/center/about/index.php
Expand Up @@ -16,7 +16,7 @@
<q xml:lang="la" title="<?php echo _t('모든 만물은 책이요 그림이요 또한 거울이니');?>">Omnis mundi creatura quasi liber et pictura nobis est, et speculum</q><br />
<cite><?php echo _t('움베르트 에코 -장미의 이름- 중');?></cite>
</p>
<div id="copyright"><?php echo _t('&copy; 2004 - 2010. 모든 저작권은 개발자 및 공헌자에게 있습니다.<br />텍스트큐브는 니들웍스/TNF에서 개발합니다.<br />텍스트큐브와 텍스트큐브 로고는 니들웍스의 상표입니다.');?></div>
<div id="copyright"><?php echo _t('&copy; 2004 - 2011. 모든 저작권은 개발자 및 공헌자에게 있습니다.<br />텍스트큐브는 니들웍스/TNF에서 개발합니다.<br />텍스트큐브와 텍스트큐브 로고는 니들웍스의 상표입니다.');?></div>
<div id="XHTML-ValidIcon">
<img src="http://www.w3.org/Icons/valid-xhtml11-blue" alt="Valid XHTML 1.1!" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion interface/owner/entry/attach/index.php
Expand Up @@ -25,7 +25,7 @@
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/editor.css" />
<!--[if lte IE 6]><link rel="stylesheet" type="text/css" media="screen" href="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/editor.ie.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/editor.ie7.css" /><![endif]-->
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/common2.js"></script>
Expand Down
3 changes: 3 additions & 0 deletions interface/owner/entry/edit/index.php
Expand Up @@ -391,6 +391,7 @@ function EntryManager() {
request.message = "<?php echo _t('저장하고 있습니다.');?>";
}
request.onSuccess = function () {
document.getElementById("saveButton").value = "<?php echo _t('중간 저장');?>";
PM.removeRequest(this);
if(entryManager.autoSave == true) {
document.getElementById("saveButton").value = "<?php echo _t('자동으로 저장됨');?>";
Expand Down Expand Up @@ -423,6 +424,7 @@ function EntryManager() {
}
}
request.onError = function () {
document.getElementById("saveButton").value = "<?php echo _t('중간 저장');?>";
PM.removeRequest(this);
PM.showErrorMessage("<?php echo _t('저장하지 못했습니다');?>", "center", "bottom");
this.nowsaving = false;
Expand All @@ -432,6 +434,7 @@ function EntryManager() {
} else {
PM.addRequest(request);
}
document.getElementById("saveButton").value = "<?php echo _t('저장중...');?>";
request.send(data);

return true;
Expand Down
2 changes: 1 addition & 1 deletion interface/owner/plugin/currentSetting/index.php
Expand Up @@ -72,7 +72,7 @@
<?php
}
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/pluginconfig.js"></script>
Expand Down
10 changes: 7 additions & 3 deletions interface/owner/setting/blog/feed/index.php
Expand Up @@ -9,7 +9,9 @@
'publishEolinSyncOnRSS' => array('int', 0, 1, 'default' => 0),
'entriesOnRSS' => array('int', 'default' => 5),
'commentsOnRSS' => array('int', 'default' => 5),
'useFeedViewOnCategory' => array('int',0,1,'default'=> 1)
'useFeedViewOnCategory' => array('int',0,1,'default'=> 1),
'rssURL' => array('url','mandatory'=>false),
'atomURL' => array('url','mandatory'=>false)
)
);
require ROOT . '/library/preprocessor.php';
Expand All @@ -23,7 +25,9 @@

// Category Feed
Setting::setBlogSettingGlobal('useFeedViewOnCategory',$_POST['useFeedViewOnCategory']);

Setting::setBlogSettingGlobal('atomURL',$_POST['atomURL']);
Setting::setBlogSettingGlobal('rssURL',$_POST['rssURL']);
clearFeed();
CacheControl::flushSkin();
Respond::ResultPage(0);
?>
?>

0 comments on commit 203b7b4

Please sign in to comment.