Changeset 12401 for extensions
- Timestamp:
- Oct 10, 2011, 6:37:18 PM (13 years ago)
- Location:
- extensions/PWG_Stuffs/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PWG_Stuffs/trunk/main.inc.php
r10298 r12401 37 37 function load_stuffs() 38 38 { 39 global $template ;39 global $template, $conf; 40 40 41 41 include(STUFFS_PATH . 'class.inc.php'); … … 44 44 $template->set_template_dir(STUFFS_PATH.'theme/template/'); 45 45 $template->set_filename('stuffs', 'stuffs_blocks.tpl'); 46 $template->assign('SHOW_THUMBNAIL_CAPTION', $conf['show_thumbnail_caption']); 46 47 47 48 $stuffs = new stuffs(); -
extensions/PWG_Stuffs/trunk/modules/BestRated/main.inc.php
r9581 r12401 24 24 ); 25 25 26 $query = '26 $query = ' 27 27 SELECT DISTINCT(i.id) 28 28 FROM '.IMAGES_TABLE.' AS i 29 29 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id = ic.image_id 30 30 INNER JOIN '.CATEGORIES_TABLE.' AS c ON ic.category_id = c.id 31 WHERE i. average_rate IS NOT NULL';31 WHERE i.rating_score IS NOT NULL'; 32 32 33 33 if (isset($page['category'])) … … 40 40 $query .= ' 41 41 '.$forbidden.' 42 ORDER BY i.average_rate DESC, i.id ASC43 44 42 ORDER BY i.rating_score DESC, i.id DESC 43 LIMIT 0, '.$datas['nb_images'].' 44 ;'; 45 45 46 46 $pictures = array(); … … 127 127 } 128 128 129 if ($conf['show_thumbnail_caption']) 130 {// name of the picture 131 if (isset($row['name']) and $row['name'] != '') 132 { 133 $name = $row['name']; 134 } 135 else 136 { 137 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 138 } 129 if (isset($row['name']) and $row['name'] != '') 130 { 131 $name = $row['name']; 132 } 133 else 134 { 135 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 136 } 139 137 140 $tpl_var['NAME'] = '('.$row['average_rate'].') '.$name; 141 } 138 $tpl_var['NAME'] = '('.$row['rating_score'].') '.$name; 142 139 143 140 if ( isset($nb_comments_of) ) -
extensions/PWG_Stuffs/trunk/modules/FeaturedPhotos/main.inc.php
r9581 r12401 108 108 } 109 109 110 if ($conf['show_thumbnail_caption']) 111 {// name of the picture 112 if (isset($row['name']) and $row['name'] != '') 113 { 114 $name = $row['name']; 115 } 116 else 117 { 118 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 119 } 110 if (isset($row['name']) and $row['name'] != '') 111 { 112 $name = $row['name']; 113 } 114 else 115 { 116 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 117 } 120 118 121 $tpl_var['NAME'] = $name; 122 } 119 $tpl_var['NAME'] = $name; 123 120 124 121 if ( isset($nb_comments_of) ) -
extensions/PWG_Stuffs/trunk/modules/MostVisited/main.inc.php
r9581 r12401 127 127 } 128 128 129 if ($conf['show_thumbnail_caption']) 130 {// name of the picture 131 if (isset($row['name']) and $row['name'] != '') 132 { 133 $name = $row['name']; 134 } 135 else 136 { 137 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 138 } 129 if (isset($row['name']) and $row['name'] != '') 130 { 131 $name = $row['name']; 132 } 133 else 134 { 135 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 136 } 139 137 140 141 142 143 138 if ( !$user['show_nb_hits']) 139 { 140 $name = '('.$row['hit'].') '.$name; 141 } 144 142 145 $tpl_var['NAME'] = $name; 146 } 143 $tpl_var['NAME'] = $name; 147 144 148 145 if ( isset($nb_comments_of) ) -
extensions/PWG_Stuffs/trunk/modules/Random/main.inc.php
r9581 r12401 121 121 ); 122 122 123 if ($user['show_nb_hits']) 123 if ($user['show_nb_hits']) 124 { 125 $tpl_var['NB_HITS'] = $row['hit']; 126 } 127 128 if (isset($row['name']) and $row['name'] != '') 124 129 { 125 $tpl_var['NB_HITS'] = $row['hit']; 130 $name = $row['name']; 131 } 132 else 133 { 134 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 126 135 } 127 136 128 if ($conf['show_thumbnail_caption']) 129 {// name of the picture 130 if (isset($row['name']) and $row['name'] != '') 131 { 132 $name = $row['name']; 133 } 134 else 135 { 136 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 137 } 138 139 $tpl_var['NAME'] = $name; 140 } 137 $tpl_var['NAME'] = $name; 141 138 142 139 if ( isset($nb_comments_of) ) -
extensions/PWG_Stuffs/trunk/modules/Recent/main.inc.php
r9581 r12401 122 122 } 123 123 124 if ($conf['show_thumbnail_caption']) 125 {// name of the picture 126 if (isset($row['name']) and $row['name'] != '') 127 { 128 $name = $row['name']; 129 } 130 else 131 { 132 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 133 } 124 if (isset($row['name']) and $row['name'] != '') 125 { 126 $name = $row['name']; 127 } 128 else 129 { 130 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 131 } 134 132 135 $tpl_var['NAME'] = $name; 136 } 133 $tpl_var['NAME'] = $name; 137 134 138 135 if ( isset($nb_comments_of) )
Note: See TracChangeset
for help on using the changeset viewer.