- Timestamp:
- Jun 12, 2011, 12:29:11 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Comments_on_Albums/include/coa_comments_page.php
r11267 r11327 197 197 com.validated 198 198 FROM '.COA_TABLE.' AS com 199 LEFT JOIN '.USERS_TABLE.' As u200 ON u.'.$conf['user_fields']['id'].' = com.author_id199 LEFT JOIN '.USERS_TABLE.' As u 200 ON u.'.$conf['user_fields']['id'].' = com.author_id 201 201 WHERE '.implode(' 202 202 AND ', $page['where_clauses']).' … … 234 234 cat.permalink, 235 235 cat.uppercats, 236 com.id as comment_id 236 com.id as comment_id, 237 img.id AS image_id, 238 img.path, 239 img.tn_ext 237 240 FROM '.CATEGORIES_TABLE.' AS cat 238 LEFT JOIN '.COA_TABLE.' AS com 239 ON cat.id=com.category_id 241 LEFT JOIN '.COA_TABLE.' AS com 242 ON com.category_id = cat.id 243 LEFT JOIN '.USER_CACHE_CATEGORIES_TABLE.' AS ucc 244 ON ucc.cat_id = cat.id AND ucc.user_id = '.$user['id'].' 245 LEFT JOIN '.IMAGES_TABLE.' AS img 246 ON img.id = ucc.user_representative_picture_id 240 247 '.get_sql_condition_FandF( 241 248 array( … … 251 258 foreach ($comments as $comment) 252 259 { 253 // category 254 $name = $categories[$comment['comment_id']]['name']; 255 $url = duplicate_index_url( 260 // category url 261 $comment['cat_url'] = duplicate_index_url( 256 262 array( 257 263 'category' => array( … … 263 269 ) 264 270 ); 271 272 // category thumbnail 273 $comment['thumb'] = get_thumbnail_url( 274 array( 275 'id' => $categories[$comment['comment_id']]['image_id'], 276 'path' => $categories[$comment['comment_id']]['path'], 277 'tn_ext' => @$categories[$comment['comment_id']]['tn_ext'], 278 ) 279 ); 265 280 266 281 // comment content 267 282 $tpl_comment = array( 268 283 'ID' => $comment['comment_id'], 269 'CAT_URL' => $url, 270 'CAT_NAME' => $name, 284 'U_PICTURE' => $comment['cat_url'], 285 'ALT' => trigger_event('render_category_name', $categories[$comment['comment_id']]['name']), 286 'TN_SRC' => $comment['thumb'], 271 287 'AUTHOR' => trigger_event('render_comment_author', $comment['author']), 272 288 'DATE' => format_date($comment['date'], true), … … 341 357 342 358 function coa_change_comments_list($content, &$smarty) { 343 $search = '<div class="description"{if isset($comment.IN_EDIT)} style="height:200px"{/if}>'; 344 345 $replacement = '<div class="category-title"> 346 <a href="{$comment.CAT_URL}">{$comment.CAT_NAME}</a> 347 </div> 348 '.$search; 349 359 $search = '<img src="{$comment.TN_SRC}" alt="{$comment.ALT}">'; 360 $replacement = $search.'<br/>{$comment.ALT}'; 350 361 return str_replace($search, $replacement, $content); 351 362 }
Note: See TracChangeset
for help on using the changeset viewer.