Skip to content

Commit

Permalink
refs #1604 : modifying Iphone prefix to Mobile prefix. Add some foot…
Browse files Browse the repository at this point in the history
…er on new mobile page.
  • Loading branch information
inureyes committed Feb 24, 2012
1 parent 43866af commit 5075c73
Show file tree
Hide file tree
Showing 19 changed files with 101 additions and 294 deletions.
4 changes: 2 additions & 2 deletions interface/i/archive/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
$itemsView .= '</li>'.CRLF;
foreach ($list['items'] as $item) {
$author = User::getName($item['userid']);
if($imageName = printIphoneAttachmentExtract(printIphoneEntryContent($blogid, $item['userid'], $item['id']))){
$imageSrc = printIphoneImageResizer($blogid, $imageName, 28);
if($imageName = printMobileAttachmentExtract(printMobileEntryContent($blogid, $item['userid'], $item['id']))){
$imageSrc = printMobileImageResizer($blogid, $imageName, 28);
}else{
$imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
}
Expand Down
4 changes: 2 additions & 2 deletions interface/i/category/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
$itemsView .= '</li>'.CRLF;
foreach ($list['items'] as $item) {
$author = User::getName($item['userid']);
if($imageName = printIphoneAttachmentExtract(printIphoneEntryContent($blogid, $item['userid'], $item['id']))){
$imageSrc = printIphoneImageResizer($blogid, $imageName, 28);
if($imageName = printMobileAttachmentExtract(printMobileEntryContent($blogid, $item['userid'], $item['id']))){
$imageSrc = printMobileImageResizer($blogid, $imageName, 28);
}else{
$imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
}
Expand Down
10 changes: 5 additions & 5 deletions interface/i/comment/add/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
if(!Validator::validate($IV))
Respond::NotFoundPage();
if (!doesHaveOwnership() && empty($_GET["name_$entryId"])) {
printIphoneErrorPage(_text('Comment write error.'), _text('Please enter your name.'), "$blogURL/comment/$entryId");
printMobileErrorPage(_text('Comment write error.'), _text('Please enter your name.'), "$blogURL/comment/$entryId");
} else if (!doesHaveOwnership() && empty($_GET["comment_$entryId"])) {
printIphoneErrorPage(_text('Comment write error.'), _text('Please enter content.'), "$blogURL/comment/$entryId");
printMobileErrorPage(_text('Comment write error.'), _text('Please enter content.'), "$blogURL/comment/$entryId");
} else {
$comment = array();
$comment['entry'] = $entryId;
Expand All @@ -40,13 +40,13 @@
} else {
$blockMessage = _textf('Blocked %1', $result);
}
printIphoneErrorPage(_text('Comment write blocked.'), $blockMessage, "$blogURL/comment/$entryId");
printMobileErrorPage(_text('Comment write blocked.'), $blockMessage, "$blogURL/comment/$entryId");
} else if ($result === false) {
printIphoneErrorPage(_text('Comment write error.'), _text('Cannot write comment.'), "$blogURL/comment/$entryId");
printMobileErrorPage(_text('Comment write error.'), _text('Cannot write comment.'), "$blogURL/comment/$entryId");
} else {
setcookie('guestName', $comment['name'], time() + 2592000, $blogURL);
setcookie('guestHomepage', $comment['homepage'], time() + 2592000, $blogURL);
printIphoneSimpleMessage(_text('Comment registered.'), _text('Go to comments page'), "$blogURL/comment/$entryId");
printMobileSimpleMessage(_text('Comment registered.'), _text('Go to comments page'), "$blogURL/comment/$entryId");
}
}
?>
10 changes: 5 additions & 5 deletions interface/i/comment/comment/add/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
Respond::NotFoundPage();
list($entryId) = getCommentAttributes($blogid, $replyId, 'entry');
if (!doesHaveOwnership() && empty($_GET["name_$replyId"])) {
printIphoneErrorPage(_text('댓글 작성 오류.'), _text('이름을 입력해 주세요.'), "$blogURL/comment/comment/$replyId");
printMobileErrorPage(_text('댓글 작성 오류.'), _text('이름을 입력해 주세요.'), "$blogURL/comment/comment/$replyId");
} else if (!doesHaveOwnership() && empty($_GET["comment_$replyId"])) {
printIphoneErrorPage(_text('댓글 작성 오류.'), _text('내용을 입력해 주세요.'), "$blogURL/comment/comment/$replyId");
printMobileErrorPage(_text('댓글 작성 오류.'), _text('내용을 입력해 주세요.'), "$blogURL/comment/comment/$replyId");
} else {
$comment = array();
$comment['entry'] = $entryId;
Expand All @@ -40,13 +40,13 @@
} else {
$blockMessage = _textf('%1 은 차단되었습니다.', $result);
}
printIphoneErrorPage(_text('댓글 작성이 차단되었습니다.'), $blockMessage, "$blogURL/comment/$entryId");
printMobileErrorPage(_text('댓글 작성이 차단되었습니다.'), $blockMessage, "$blogURL/comment/$entryId");
} else if ($result === false) {
printIphoneErrorPage(_text('댓글 작성 오류.'), _text('댓글을 작성할 수 없었습니다.'), "$blogURL/comment/$entryId");
printMobileErrorPage(_text('댓글 작성 오류.'), _text('댓글을 작성할 수 없었습니다.'), "$blogURL/comment/$entryId");
} else {
setcookie('guestName', $comment['name'], time() + 2592000, $blogURL);
setcookie('guestHomepage', $comment['homepage'], time() + 2592000, $blogURL);
printIphoneSimpleMessage(_text('댓글이 등록되었습니다.'), _text('댓글 페이지로 이동'), "$blogURL/comment/$entryId");
printMobileSimpleMessage(_text('댓글이 등록되었습니다.'), _text('댓글 페이지로 이동'), "$blogURL/comment/$entryId");
}
}
?>
4 changes: 2 additions & 2 deletions interface/i/comment/comment/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
?>
<div id="comment_reply_<?php echo $suri['id']."_".time();?>" title="Comment reply" selected="false">
<?php
printIphoneCommentFormView($suri['id'], _text('댓글에 답글 달기'), 'comment/comment');
printMobileCommentFormView($suri['id'], _text('댓글에 답글 달기'), 'comment/comment');
?>
<fieldset class="navi margin-top10">
<?php
printIphoneNavigation($entry);
printMobileNavigation($entry);
?>
</fieldset>
</div>
6 changes: 3 additions & 3 deletions interface/i/comment/delete/action/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
if(empty($suri['id'])) {
list($entryId) = getCommentAttributes($blogid, $_GET['replyId'], 'entry');
if (deleteComment($blogid, $_GET['replyId'], $entryId, isset($_GET['password']) ? $_GET['password'] : '') === false) {
printIphoneErrorPage(_text('Comment delete error.'), _text('Incorrect Password.'), "$blogURL/comment/delete/{$_GET['replyId']}");
printMobileErrorPage(_text('Comment delete error.'), _text('Incorrect Password.'), "$blogURL/comment/delete/{$_GET['replyId']}");
exit();
}
} else {
list($entryId) = getCommentAttributes($blogid, $suri['id'], 'entry');
if (deleteComment($blogid, $suri['id'], $entryId, '') === false) {
printIphoneErrorPage(_t('Comment delete error'), _t('Administrator access only.'), "$blogURL/comment/delete/{$suri['id']}");
printMobileErrorPage(_t('Comment delete error'), _t('Administrator access only.'), "$blogURL/comment/delete/{$suri['id']}");
exit();
}
}
Expand All @@ -38,7 +38,7 @@
<a href="<?php echo "$blogURL/comment/$entryId";?>" class="whiteButton margin-top10">Go to comments page</a>
<fieldset class="margin-top10">
<?php
printIphoneNavigation($entry);
printMobileNavigation($entry);
?>
</fieldset>
</div>
11 changes: 6 additions & 5 deletions interface/i/comment/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
printIphoneHtmlHeader();
printMobileHTMLHeader();
printMobileHTMLMenu('','comment');


Expand All @@ -17,11 +17,11 @@
?>
<div id="comment_<?php echo $entry['id']."_".time();?>" title="<?php echo _text('댓글');?> : <?php echo htmlspecialchars($entry['title']);?>" selected="false">
<?php
printIphoneCommentView($entry['id']);
printMobileCommentView($entry['id']);
?>
<fieldset class="navi margin-top10">
<?php
printIphoneNavigation($entry, false, true);
printMobileNavigation($entry, false, true);
?>
</fieldset>
</div>
Expand All @@ -31,10 +31,11 @@
?>
<div id="comment_<?php echo time();?>" title="<?php echo _text('최근 댓글');?>" selected="false">
<?php
printIphoneRecentCommentView($page);
printIphoneNavigation($entry, false, false, $paging, 'comment');
printMobileRecentCommentView($page);
printMobileNavigation($entry, false, false, $paging, 'comment');
?>
</div>
<?php
}
printMobileHTMLFooter();
?>
16 changes: 8 additions & 8 deletions interface/i/entry/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
printIphoneHtmlHeader();
printMobileHTMLHeader();

if(empty($suri['id']) && empty($suri['value'])) {
printMobileHTMLMenu('','list');
Expand All @@ -23,8 +23,8 @@
$itemsView .= '</li>'.CRLF;
foreach ($list['items'] as $item) {
$author = User::getName($item['userid']);
if($imageName = printIphoneAttachmentExtract($item['content'])){
$imageSrc = printIphoneImageResizer($blogid, $imageName, 28);
if($imageName = printMobileAttachmentExtract($item['content'])){
$imageSrc = printMobileImageResizer($blogid, $imageName, 28);
}else{
$imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
}
Expand Down Expand Up @@ -60,7 +60,7 @@
} else if(!empty($suri['value'])) {
$entryPrint = true;
list($entries, $paging) = getEntryWithPagingBySlogan($blogid, $suri['value']);
printIphoneHtmlHeader();
printMobileHTMLHeader();
}

$entry = $entries ? $entries[0] : null;
Expand All @@ -70,7 +70,7 @@
<h2><?php echo htmlspecialchars($entry['title']);?></h2>
<h2 class="noBorderLine"><?php echo Timestamp::format5($entry['published']);?></h2>
</div>
<div class="content"><?php printIphoneEntryContentView($blogid, $entry, null); ?></div>
<div class="content"><?php printMobileEntryContentView($blogid, $entry, null); ?></div>
<?php
$entryTags = getTags($entry['blogid'], $entry['id']);
if (sizeof($entryTags) > 0) {
Expand All @@ -93,9 +93,9 @@
<?php

if(doesHaveOwnership() || ($entry['visibility'] >= 2) || (isset($_COOKIE['GUEST_PASSWORD']) && (trim($_COOKIE['GUEST_PASSWORD']) == trim($entry['password'])))) {
printIphoneNavigation($entry, true, true, $paging);
printMobileNavigation($entry, true, true, $paging);
} else {
printIphoneNavigation($entry, false, false, $paging);
printMobileNavigation($entry, false, false, $paging);
}
?>
</fieldset>
Expand All @@ -105,7 +105,7 @@
?>
</div>
<?php
printIphoneHtmlFooter();
printMobileHTMLFooter();
}
}
?>
4 changes: 2 additions & 2 deletions interface/i/guestbook/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
?>
<div id="guestbook_<?php echo time();?>" title="<?php echo _text('방명록');?>" selected="false">
<?php
printIphoneGuestbookView($page);
printMobileGuestbookView($page);
?>
<fieldset class="navi margin-top10">
<?php
printIphoneNavigation(0, false, false, $paging, 'guestbook');
printMobileNavigation(0, false, false, $paging, 'guestbook');
?>
</fieldset>
</div>
16 changes: 8 additions & 8 deletions interface/i/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
if(empty($suri['id'])) {
printIphoneHtmlHeader();
printMobileHTMLHeader();
?>

<div data-role="page">
Expand All @@ -16,7 +16,7 @@
<ul data-role="listview" id="home" title="<?php echo htmlspecialchars(UTF8::lessenAsEm($blog['title'],30));?>" selected="true">
<?php
$blogAuthor = User::getBlogOwnerName($blogid);
$blogLogo = !empty($blog['logo']) ? printIphoneImageResizer($blogid, $blog['logo'], 80) : "{$service['path']}/resources/style/iphone/image/textcube_logo.png";
$blogLogo = !empty($blog['logo']) ? printMobileImageResizer($blogid, $blog['logo'], 80) : "{$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 Expand Up @@ -59,15 +59,15 @@
<?php
$totalPosts = getEntriesTotalCount($blogid);
$categories = getCategories($blogid);
print printIphoneCategoriesView($totalPosts, $categories, true);
print printMobileCategoriesView($totalPosts, $categories, true);
?>
</ul>
</div>
<div data-role="page" id="archives">
<ul data-role="listview" title="Archives" selected="false">
<?php
$archives = printIphoneArchives($blogid);
print printIphoneArchivesView($archives);
$archives = printMobileArchives($blogid);
print printMobileArchivesView($archives);
?>
</ul>
</div>
Expand All @@ -79,8 +79,8 @@
<div class="content padding5">
<ul class="tag_list">
<?php
$tags = printIphoneTags($blogid, 'random', 100);
print printIphoneTagsView($tags);
$tags = printMobileTags($blogid, 'random', 100);
print printMobileTagsView($tags);
?>
</ul>
</div>
Expand Down Expand Up @@ -118,6 +118,6 @@
</div>
</div>
<?php
printIphoneHtmlFooter();
printMobileHTMLFooter();
}
?>
4 changes: 2 additions & 2 deletions interface/i/link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
printIphoneHtmlHeader();
printMobileHTMLHeader();
printMobileHTMLMenu();

$linkView .= '<ul data-role="listview" class="posts" id="links" title="'._text('링크').'" selected="false">'.CRLF;
$linkView .= printIphoneLinksView(getLinks($blogid));
$linkView .= printMobileLinksView(getLinks($blogid));
$linkView .= '</ul>';
print $linkView;
?>
2 changes: 1 addition & 1 deletion interface/i/protected/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
setcookie('GUEST_PASSWORD', $_POST['password'], time() + 86400, "$blogURL/");
header("Location: $blogURL/entry/{$suri['id']}");
}else{
printIphoneErrorPage(_text('Password (again)!'), _text('Wrong password.'), "$blogURL/entry/{$suri['id']}");
printMobileErrorPage(_text('Password (again)!'), _text('Wrong password.'), "$blogURL/entry/{$suri['id']}");
}
?>
6 changes: 3 additions & 3 deletions interface/i/search/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
$itemsView .= '</li>'.CRLF;
foreach ($list['items'] as $item) {
$author = User::getName($item['userid']);
if($imageName = printIphoneAttachmentExtract(printIphoneEntryContent($blogid, $item['userid'], $item['id']))){
$imageSrc = printIphoneImageResizer($blogid, $imageName, 28);
if($imageName = printMobileAttachmentExtract(printMobileEntryContent($blogid, $item['userid'], $item['id']))){
$imageSrc = printMobileImageResizer($blogid, $imageName, 28);
}else{
$imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
}
Expand Down Expand Up @@ -55,5 +55,5 @@
<?php
}

//printIphoneNavigation($entry, false, true);
//printMobileNavigation($entry, false, true);
?>
6 changes: 3 additions & 3 deletions interface/i/tag/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
$itemsView .= '</li>'.CRLF;
foreach ($list['items'] as $item) {
$author = User::getName($item['userid']);
if($imageName = printIphoneAttachmentExtract(printIphoneEntryContent($blogid, $item['userid'], $item['id']))){
$imageSrc = printIphoneImageResizer($blogid, $imageName, 28);
if($imageName = printMobileAttachmentExtract(printMobileEntryContent($blogid, $item['userid'], $item['id']))){
$imageSrc = printMobileImageResizer($blogid, $imageName, 28);
}else{
$imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
}
Expand Down Expand Up @@ -63,5 +63,5 @@
</ul>
<?php
}
//printIphoneNavigation($entry, false, true);
//printMobileNavigation($entry, false, true);
?>
10 changes: 5 additions & 5 deletions interface/i/trackback/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
printIphoneHtmlHeader();
printMobileHTMLHeader();
printMobileHTMLMenu('','trackback');

if(isset($_GET['page'])) $page = $_GET['page'];
Expand All @@ -17,17 +17,17 @@
?>
<div id="trackback_<?php echo $entry['id']."_".time();?>" title="<?php echo _text('트랙백');?> : <?php echo htmlspecialchars($entry['title']);?>" selected="false">
<?php
printIphoneTrackbackView($entry['id']);
printIphoneNavigation($entry, true, false);
printMobileTrackbackView($entry['id']);
printMobileNavigation($entry, true, false);
?>
</div>
<?php
} else {
?>
<div id="trackback_<?php echo "_".time();?>" title="<?php echo _text('최근 트랙백');?>" selected="false">
<?php
printIphoneRecentTrackbackView($page);
printIphoneNavigation($entry, false, false, $paging, 'trackback');
printMobileRecentTrackbackView($page);
printMobileNavigation($entry, false, false, $paging, 'trackback');
?>
</div>
<?php
Expand Down
Loading

0 comments on commit 5075c73

Please sign in to comment.