<p>After a couple of hours fighting with the <a href="http://gallery.menalto.com/" rel="nofollow noreferrer">Gallery2</a> <a href="http://codex.gallery2.org/Gallery2:Modules:rss" rel="nofollow noreferrer">RSS module</a> and getting only the message, "no feeds have yet been defined", I gave up.  Based on <a href="http://www.google.com/search?q=%22no+feeds+have+yet+been+defined%22" rel="nofollow noreferrer">a Google search for "no feeds have yet been defined"</a>, this is a pretty common problem.  Do you have any tips and/or tricks for getting the Gallery2 RSS module to work?  Or any tips for a relatively-PHP-ignorant developer trying to debug problems with this PHP application?</p>

[{'answer_id': 7471, 'author': 'ESV', 'author_id': 150, 'author_profile': 'https://Stackoverflow.com/users/150', 'pm_score': 1, 'selected': False, 'text': '<p>My eventual (and hopefully temporary) solution to this problem was a Python CGI script.  My script follows for anyone who might find it useful (despite the fact that this is a total hack).  </p>\n\n<pre><code>#!/usr/bin/python\n"""A CGI script to produce an RSS feed of top-level Gallery2 albums."""\n\n#import cgi\n#import cgitb; cgitb.enable()\nfrom time import gmtime, strftime\nimport MySQLdb\n\nALBUM_QUERY = \'\'\'\n    select g_id, g_title, g_originationTimestamp\n    from g_Item\n    where g_canContainChildren = 1 \n    order by g_originationTimestamp desc\n    limit 0, 20\n    \'\'\'\n\nRSS_TEMPLATE = \'\'\'Content-Type: text/xml\n\n&lt;?xml version="1.0"?&gt;\n&lt;rss version="2.0"&gt;\n  &lt;channel&gt;\n    &lt;title&gt;TITLE&lt;/title&gt;\n    &lt;link&gt;http://example.com/gallery2/main.php&lt;/link&gt;\n    &lt;description&gt;DESCRIPTION&lt;/description&gt;\n    &lt;ttl&gt;1440&lt;/ttl&gt;\n%s\n  &lt;/channel&gt;\n&lt;/rss&gt;\n\'\'\'\n\nITEM_TEMPLATE = \'\'\'\n    &lt;item&gt;\n      &lt;title&gt;%s&lt;/title&gt;\n      &lt;link&gt;http://example.com/gallery2/main.php?g2_itemId=%s&lt;/link&gt;\n      &lt;description&gt;%s&lt;/description&gt;\n      &lt;pubDate&gt;%s&lt;/pubDate&gt;\n    &lt;/item&gt;\n\'\'\'\n\ndef to_item(row):\n    item_id = row[0]\n    title = row[1]\n    date = strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime(row[2]))\n    return ITEM_TEMPLATE % (title, item_id, title, date)\n\nconn = MySQLdb.connect(host = "HOST",\n                       user = "USER",\n                       passwd = "PASSWORD",\n                       db = "DATABASE")\ncurs = conn.cursor()\ncurs.execute(ALBUM_QUERY)\nprint RSS_TEMPLATE % \'\'.join([ to_item(row) for row in curs.fetchall() ])\ncurs.close()\n</code></pre>\n'}, {'answer_id': 201744, 'author': 'Veynom', 'author_id': 11670, 'author_profile': 'https://Stackoverflow.com/users/11670', 'pm_score': -1, 'selected': False, 'text': '<p>Well, I am unsure this can help you but here is a very simple RSS that was presented as solution in another topic:</p>\n\n<p><a href="https://stackoverflow.com/questions/82872/php-rss-builder#84601">PHP RSS Builder</a></p>\n'}]
['https://Stackoverflow.com/questions/7470', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/150/']