Changeset 3427
- Timestamp:
- 06/10/07 20:01:22 (18 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
components/Textcube.Core.php (modified) (1 diff)
-
lib/piece/blog/entries.php (modified) (3 diffs)
-
skin/tistory/skin.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/components/Textcube.Core.php
r3425 r3427 159 159 160 160 class teamblogUser{ 161 function name(){161 function authorName($owner,$entryId){ 162 162 requireComponent('Eolin.PHP.Core'); 163 163 global $database, $owner, $entry; 164 164 165 $res = DBQuery::queryRow("SELECT * FROM ".$database['prefix']."Teamblog 166 WHERE teams='$owner' AND userid='$owner' " ); 167 168 $name = array(4); 169 $name[0] = ''; 170 $name[1] = ''; 171 $name[2] = 0; 172 $name[3] = ''; 173 174 $styleS = ''; 175 $styleE = ''; 176 if(!isset($_SESSION['admin'])) $_SESSION['admin'] = $owner; 177 178 $ttmp = DBQuery::queryRow("SELECT * 179 FROM ".$database['prefix']."Teamblog 180 WHERE teams='".$owner."' 181 and userid='".$_SESSION['admin']."'"); 182 $stmp = DBQuery::queryRow("SELECT * 165 // Read userId of entry from relation table. 166 $userId = DBQuery::queryCell("SELECT team 183 167 FROM ".$database['prefix']."TeamEntryRelations 184 WHERE owner='".$owner."' 185 and id='".$entry['id']."'"); 186 $itmp = DBQuery::queryRow("SELECT a.*, b.name 187 FROM {$database['prefix']}Teamblog a, 188 {$database['prefix']}Users b 189 WHERE a.teams='".$owner."' 190 AND a.userid='".$stmp['team']."' 191 AND a.userid=b.userid"); 192 193 if(empty($font_style)){ 194 if(empty($is_style)){ 195 if(empty($is_admin)) $ures = $itmp; 196 else $ures = $res; 197 198 $font_bold = $ures['font_bold'] & 1; 199 if(empty($font_bold)) $font_bold = ''; 200 else $font_bold = 'bold'; 201 202 $font_italic = $ures['font_bold'] & 2; 203 if(empty($font_italic)) $font_italic = ''; 204 else $font_italic = 'italic'; 205 206 207 $styleS = '<font style="font-Weight:'.$font_bold.';font-Style:'.$font_italic.';font-Size:'.$ures['font_size'].'pt;color:'.$ures['font_color'].';">'; 208 $styleE = '</font>'; 209 } 210 if(empty($is_ch)){ 211 if(empty($isname)) $name[0] = ' by ' . $styleS . $itmp['name'] . $styleE; 212 else $name[1] = ' by ' . $styleS . $itmp['name'] . $styleE; 213 } else { 214 $name[3] = $styleS . $itmp['name'] . $styleE; 215 } 216 } 217 218 if(($ttmp['posting'] == 1) || ($stmp['team'] == $_SESSION['admin'])) $name[2] = 1; 219 220 return $name; 221 } 222 223 function PC(){ 224 global $database, $owner; 225 $itmp = DBQuery::queryRow("SELECT * FROM ".$database['prefix']."Teamblog WHERE teams='".$owner."' and userid='".$_SESSION['admin']."'"); 226 $access = 0; 227 if(!empty($itmp['posting'])) $access = 1; 228 return $access; 229 } 230 231 function AC(){ 232 global $database, $owner; 233 $itmp = DBQuery::queryRow("SELECT * FROM ".$database['prefix']."Teamblog WHERE teams='".$owner."' and userid='".$_SESSION['admin']."'"); 234 $access = 0; 235 if(!empty($itmp['admin'])) $access = 1; 236 if(($itmp['userid'] == $itmp['teams']) && ($itmp['enduser'] !=0)) $access = 2; 237 return $access; 238 } 239 240 function myBlog(){ 168 WHERE owner =".$owner." 169 AND id = ".$entryId); 170 if(isset($userId)) { 171 $author = DBQuery::queryCell("SELECT profile 172 FROM {$database['prefix']}Teamblog 173 WHERE teams=".$owner." 174 AND userid = ".$userId); 175 return $author; 176 } else { 177 return false; 178 } 179 } 180 181 function myBlog(){ 241 182 global $database, $owner, $blogURL, $_SERVER, $blog, $service; 242 183 -
trunk/lib/piece/blog/entries.php
r3392 r3427 47 47 dress('tag_label', $tagLabelView, $entryView); 48 48 } 49 $name = teamblogUser::name(); 50 if (doesHaveOwnership() && !empty($name[2])) { 49 if (doesHaveOwnership()) { 51 50 $managementView = $skin->management; 52 51 dress('s_ad_m_link', "$blogURL/owner/entry/edit/{$entry['id']}?returnURL=" . (@$service['useEncodedURL'] ? $permalink : str_replace('%2F', '/', rawurlencode($permalink))), $managementView); … … 64 63 dress('ad_div', $managementView, $entryView); 65 64 } 66 if(!empty($name[3])) dress('teamblog_name',$name[3],$entryView); 65 $author = teamblogUser::authorName($owner, $entry['id']); 66 dress('article_rep_author',$author,$entryView); 67 67 dress('article_rep_id', $entry['id'], $entryView); 68 68 dress('article_rep_link', $permalink, $entryView); 69 dress('article_rep_title', htmlspecialchars(fireEvent('ViewPostTitle', $entry['title'], $entry['id'])) .$name[1], $entryView);69 dress('article_rep_title', htmlspecialchars(fireEvent('ViewPostTitle', $entry['title'], $entry['id'])), $entryView); 70 70 // 사용자가 작성한 본문은 lib/piece/blog/end.php의 removeAllTags() 다음에 처리하기 위한 조치. 71 71 $contentContainer["article_{$entry['id']}"] = getEntryContentView($owner, $entry['id'], $entry['content'], $entry['contentFormatter'], getKeywordNames($owner)); … … 95 95 $entriesView .= $entryView; 96 96 } else { 97 $ name = teamblogUser::name();98 if(!empty($name[3])) dress('teamblog_name',$name[3],$entryView);97 $author = teamblogUser::authorName($owner,$entry['id']); 98 dress('article_rep_author',$author,$entryView); 99 99 $protectedEntryView = $skin->entryProtected; 100 100 dress('article_rep_id', $entry['id'], $protectedEntryView); 101 101 dress('article_rep_link', $permalink, $protectedEntryView); 102 dress('article_rep_title', htmlspecialchars(fireEvent('ViewPostTitle', $entry['title'], $entry['id'])) .$name[1], $protectedEntryView);103 dress('article_rep_date', fireEvent('ViewPostDate', Timestamp::format5($entry['published'])) .$name[0], $protectedEntryView);102 dress('article_rep_title', htmlspecialchars(fireEvent('ViewPostTitle', $entry['title'], $entry['id'])), $protectedEntryView); 103 dress('article_rep_date', fireEvent('ViewPostDate', Timestamp::format5($entry['published'])), $protectedEntryView); 104 104 dress('article_password', "entry{$entry['id']}password", $protectedEntryView); 105 105 dress('article_dissolve', "reloadEntry({$entry['id']});", $protectedEntryView); -
trunk/skin/tistory/skin.html
r3403 r3427 211 211 <span class="category"><a href="[##_article_rep_category_link_##]">[##_article_rep_category_##]</a> </span> 212 212 <span class="date">[##_article_rep_date_##]</span> 213 <span class="author">[##_article_rep_author_##]</span> 213 214 <s_ad_div> 214 215 <div class="admin">
