on i4PACE(i for Personal Archiving and Creating Environment)
actions » SearchLogin 89 articles • 30 Jul 2010

Recent articles in 'frog'

Saturday, 03 May 2008

permalink RSS feed

By default in the Frog Blogging program, the URLs of the link to RSS feeds include a port number. Because this server goes thru a reverse-proxy server, the following correction is made to remove the port number from the URLs. Edit feedinfo.y at /var/local/Snakelets-1.44/webapps/frog/docroot, to replace a line with feedURL as follows:

feedBase=self.Request.getBaseURL()
if feedBase.count(':') > 1:
        a = feedBase.rfind(':')
        feedBase = feedBase[:a])
feedURL=feedBase+url("feeds/%s/feed.rss" % self.escape(user.userid))

Did the same to snakelets.py at /var/local/Snakelets-1.44/webapps/frog/frog, i.e., in def rss, edited as

feedBase = request.getBaseURL()
        if feedBase.count(':') > 1:
                a=feedBase.rfind(':')
                feedBase=feedBase[:a]

        rss=RSSFeed(blogtitle,
                    feedBase+frog.util.userURLprefix_snakelet(self, user.userid),
                    blogdescription, "Copyright by "+user.name, timetolive)

Pretty ad hoc, but let it work this way for a while... Hmmm, found it still doesn't work properly :((

Now, really ad-hoc :-S Did:

def getServerName(self):
        if not self.virtualhostport or self.virtualhostport == 80:
            return self.virtualhost
        else:
        #    return '%s:%d' % (self.virtualhost, self.virtualhostport)
            return '%s' % self.virtualhost

on server.py at /var/local/Snakelets-1.44/snakeserver. OK, it's just an ugly hack, but it worked ^_^ Got RSS working properly :-)

• Wrote Teru at 15:03 (edited 7×, last on 03 May 2008) | read 20× | 0 Comments

1 shown; more articles may be found in the archives. The permalink icon is the article's permalink.
Process times: page=0.367 request=0.377 cpu=0.380