Changeset 3619 for extensions/piclens/generate_rss.php
- Timestamp:
- Jul 17, 2009, 7:41:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/piclens/generate_rss.php
r3614 r3619 178 178 } 179 179 180 // Gestion des tags 181 elseif (($page['section']) == 'tags') 182 { 183 // $row = get_image_ids_for_tags($page['tags_id']); 184 // $cat need to bo not null... 185 array_push($cat, "1"); 186 $query = 'SELECT DISTINCT(tag.image_id) , img.id, img.file, img.date_available, img.date_creation, img.tn_ext, img.name, 187 img.comment, img.author, img.hit ,img.filesize, img.average_rate, img.has_high, img.path, 188 img.level , ic.category_id, cat.name AS catname, cat.comment AS catcomment, cat.rank, cat.status, 189 cat.visible, cat.uppercats, cat.permalink, cat.dir ' 190 .' FROM '.IMAGE_TAG_TABLE.' AS tag '."\n" 191 .' INNER JOIN '.IMAGES_TABLE.' AS img ON tag.image_id = img.id' 192 .' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id' 193 .' INNER JOIN '.CATEGORIES_TABLE.' AS cat ON ic.category_id = cat.id' 194 .' WHERE tag.tag_id IN ('.implode(',', $page['tag_ids']).') ' 195 .$forbidden 196 .' '.$conf['order_by'].';'; 197 } 198 199 180 200 elseif (($page['section']) == 'categories') 181 201 { … … 320 340 { 321 341 $result = pwg_query($query); 342 322 343 while ($row = mysql_fetch_assoc($result)) 323 344 { … … 329 350 && ((isset($row['catname']) ? !(substr_count($row['catname'], $piclens_extdesc_hidden)) : true)) 330 351 )) 331 array_push($pictures, $row); 352 { 353 // Suppression des doublons (même path) 354 if ($obj->my_config['piclens_exclude_double']) 355 { 356 $double = false; 357 foreach ($pictures as $key => $values) 358 // même path 359 if ($row['path'] == $values['path']) 360 $double=true; 361 362 // pas de double trouvé 363 if (!$double) 364 array_push($pictures, $row); 365 } 366 else 367 array_push($pictures, $row); 368 } 332 369 } 333 370 } 334 371 // Fin requetes recherches photos 335 372 336 373 337 374 // Creation du fichier xml (flux rss) 338 375 // It's a rss file … … 366 403 367 404 // Icone de la gallerie dans le flux RSS 368 // echo '<logo url="'.get_root_url().'template-common/favicon.ico"></logo>';369 405 echo "\n"; 370 406 echo '<atom:icon>'.$obj->root_site_piclens.'template-common/favicon.ico</atom:icon>'; 371 407 echo "\n"; 372 // <atom:link href="http://mywebsite.com/photos.rss" rel="self" type="application/rss+xml" />373 408 374 409 // Pour chacune des images, preparation du flux xml … … 544 579 echo "<link>" . $url . "</link>\n"; 545 580 546 // echo "<guid>" . $row['id'] . "\</guid>\n";547 581 echo "<guid isPermaLink=\"false\">\"" . $row['id'] . "\"</guid>\n"; 548 582
Note: See TracChangeset
for help on using the changeset viewer.