Changeset 5665
- Timestamp:
- 03/28/08 10:25:19 (10 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
- 1 moved
-
interface/i (moved) (moved from trunk/interface/iphone)
-
interface/i/index.php (modified) (1 diff)
-
lib/suri.php (modified) (1 diff)
-
lib/view/iphoneView.php (modified) (1 diff)
-
style/iphone/iphone.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/interface/i/index.php
r5656 r5665 68 68 <ul class="tag_list"> 69 69 <?php 70 $tags = printIphone RandomTags($blogid, 100);71 print printIphone RandomTagsView($tags);70 $tags = printIphoneTags($blogid, 'random', 100); 71 print printIphoneTagsView($tags); 72 72 ?> 73 73 </ul> -
trunk/lib/suri.php
r5656 r5665 146 146 $blogURL .= '/m'; 147 147 }else if (defined('__TEXTCUBE_IPHONE__')) { 148 $blogURL .= '/i phone';148 $blogURL .= '/i'; 149 149 } 150 150 unset($url, $domain); -
trunk/lib/view/iphoneView.php
r5656 r5665 135 135 } 136 136 137 function printIphone RandomTags($blogid, $max = 10) {137 function printIphoneTags($blogid, $flag = 'random', $max = 10) { 138 138 global $database, $skinSetting; 139 139 $tags = array(); 140 $aux = "limit {$max}"; 141 if (doesHaveOwnership()){ 142 $tags = POD::queryAll("SELECT name, count(*) cnt, t.id FROM `{$database['prefix']}Tags` t, 143 `{$database['prefix']}TagRelations` r 144 WHERE t.id = r.tag AND r.blogid = $blogid 145 GROUP BY r.tag ORDER BY RAND() $aux"); 146 } else { 147 $tags = POD::queryAll("SELECT name, count(*) cnt, t.id FROM `{$database['prefix']}Tags` t, 148 `{$database['prefix']}TagRelations` r, 149 `{$database['prefix']}Entries` e 150 WHERE r.entry = e.id AND e.visibility > 0 AND t.id = r.tag AND r.blogid = $blogid 151 GROUP BY r.tag 152 ORDER BY RAND() $aux"); 140 $aux = "limit $max"; 141 if ($flag == 'count') { // order by count 142 $tags = POD::queryAll("SELECT `name`, count(*) `cnt`, t.id FROM `{$database['prefix']}Tags` t, 143 `{$database['prefix']}TagRelations` r, 144 `{$database['prefix']}Entries` e 145 WHERE r.entry = e.id AND e.visibility > 0 AND t.id = r.tag AND r.blogid = $blogid 146 GROUP BY r.tag 147 ORDER BY `cnt` DESC $aux"); 148 } else if ($flag == 'name') { // order by name 149 $tags = POD::queryAll("SELECT DISTINCT name, count(*) cnt, t.id FROM `{$database['prefix']}Tags` t, 150 `{$database['prefix']}TagRelations` r, 151 `{$database['prefix']}Entries` e 152 WHERE r.entry = e.id AND e.visibility > 0 AND t.id = r.tag AND r.blogid = $blogid 153 GROUP BY r.tag 154 ORDER BY t.name $aux"); 155 } else { // random 156 $tags = POD::queryAll("SELECT name, count(*) cnt, t.id FROM `{$database['prefix']}Tags` t, 157 `{$database['prefix']}TagRelations` r, 158 `{$database['prefix']}Entries` e 159 WHERE r.entry = e.id AND e.visibility > 0 AND t.id = r.tag AND r.blogid = $blogid 160 GROUP BY r.tag 161 ORDER BY RAND() $aux"); 153 162 } 154 163 return $tags; 155 164 } 156 function printIphoneRandomTagsView($tags) { 165 166 function printIphoneTagsView($tags) { 157 167 global $blogURL, $service; 158 168 ob_start(); -
trunk/style/iphone/iphone.css
r5658 r5665 613 613 text-align:justify; 614 614 list-style:none; 615 position: relative;616 615 } 617 616 body > ul > li.panel > .content > ul.tag_list > li{ 618 617 display:inline; 619 618 list-style:none; 620 line-height: 2.5em619 line-height:1.4em; 621 620 margin:0; 622 621 padding:0 5px;
