Commit f73492e3 authored by Hervé Poulain's avatar Hervé Poulain

Allows to have image in the rss if the thumbnail column of the listbox is supplied.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30061 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f6981a24
......@@ -101,7 +101,8 @@ required_field_list = (\'title\', \'description\', \'link\',)\n
\n
# required + optional channel elements\n
allowed_field_list = (\'title\', \'description\', \'link\', \'author\', \n
\'category\', \'comments\', \'guid\', \'pubdate\',)\n
\'category\', \'comments\', \'guid\', \'pubdate\',\n
\'thumbnail\', )\n
\n
# figure out which column is which, by using column titles\n
rss_column_mapping = {}\n
......@@ -131,6 +132,10 @@ for line in line_list:\n
if key == \'pubdate\':\n
# pubDate should be returned unconditionally as \'pubDate\'\n
key = \'pubDate\'\n
elif key == \'thumbnail\' and value:\n
# This part prints an image if the "thumbnail" column of listbox is supplied\n
rss_item_string += (\'\\t\\t\\t<enclosure url="%s" type="image" />\\n\' % value)\n
continue\n
rss_item_string += (\'\\t\\t\\t<%s>%s</%s>\\n\' % (key,value or \'\',key))\n
\n
# if required fields not present in listbox columns as label we \n
......
18
\ No newline at end of file
37
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment