- Timestamp:
- Nov 11, 2011, 7:11:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Subscribe_to_comments/include/functions.inc.php
r12600 r12607 58 58 59 59 $generic_content = ' 60 <a href="'.$element['url'].'"><img src="'.$element['thumbnail'].'" alt="'.$element['name'].'"></a> 61 <br> 60 62 <b>.'.trigger_event('render_comment_author', $comm['author']).'</b> wrote : 61 63 … … 79 81 80 82 81 /* 83 /** 82 84 * add an email to subscribers list 83 85 * @param int (image|category)_id … … 155 157 } 156 158 157 /* 159 160 /** 158 161 * remove an email from subscribers list 159 162 * @param int (image|category)_id … … 205 208 } 206 209 207 /* 210 211 /** 208 212 * validate a subscription 209 213 * @param int (image|category)_id … … 243 247 } 244 248 249 245 250 /** 246 251 * create absolute url to subscriptions section … … 284 289 } 285 290 291 286 292 /** 287 293 * get name and url of a picture … … 297 303 id, 298 304 name, 299 file 305 file, 306 path, 307 tn_ext 300 308 FROM '.IMAGES_TABLE.' 301 309 WHERE id = '.$image_id.' … … 316 324 $element['url'] = make_picture_url($url_params); 317 325 326 $element['thumbnail'] = get_thumbnail_url($element); 327 318 328 return $element; 319 329 } … … 326 336 function get_category_infos($cat_id) 327 337 { 338 global $conf; 339 328 340 $query = ' 329 341 SELECT 330 id, 331 name, 332 permalink 333 FROM '.CATEGORIES_TABLE.' 334 WHERE id = '.$cat_id.' 342 cat.id, 343 cat.name, 344 cat.permalink, 345 img.id AS image_id, 346 img.path, 347 img.tn_ext 348 FROM '.CATEGORIES_TABLE.' AS cat 349 LEFT JOIN '.USER_CACHE_CATEGORIES_TABLE.' AS ucc 350 ON ucc.cat_id = cat.id AND ucc.user_id = '.$conf['guest_id'].' 351 LEFT JOIN '.IMAGES_TABLE.' AS img 352 ON img.id = ucc.user_representative_picture_id 353 WHERE cat.id = '.$cat_id.' 335 354 ;'; 336 355 $element = pwg_db_fetch_assoc(pwg_query($query)); 356 // we use guest_id for user_cache beacause we don't know the status of recipient 337 357 338 358 $url_params['section'] = 'categories'; … … 340 360 $element['url'] = make_index_url($url_params); 341 361 362 $element['thumbnail'] = get_thumbnail_url(array( 363 'id' => $element['image_id'], 364 'path' => $element['path'], 365 'tn_ext' => $element['tn_ext'], 366 )); 367 342 368 return $element; 343 369 } 370 344 371 345 372 /**
Note: See TracChangeset
for help on using the changeset viewer.