Andrei Freeman (lordandrei) wrote in lj_dev,
Andrei Freeman

  • Mood:

RSS Feeds: What started as a support question

Edit 2004-03-12: Reported to Zilla as bug 1798
Edit 2004-03-12: Fixed hyperlink in html in post for original support issue

This began with me posting a support question.

It featured some undocumented behavior of the RSS feed generator.

After about 4 hours I figured the question was harder than, "I can't read a faq, how do I delete my journal" so I decided to look at the code. The code answered my question above, but possibly exposed a bug...


The RSS is generated by the file: /livejournal/cgi-bin/

The <managingEditor> channel tag in RSS is generated from the users database if:

It took a little bit to flip user prefs to find out that this comes true if email mangling is off. Which I guess makes sense from the idea that email mangling is to prevent bots from skimming the address. Personally, I'd rather see these separate but it works. This also affects the presence of an <author> tag in the items

Now, later in the item generation it has a comments tag that appears if:

And some comments that they need to add author and email address for communities.

Interestingly, the $it->{comments} doesn't seem to do anything.
This seems to come from ($logprops{itemid}->{'opt_nocomments'} != 0)
Which seems to come from LJ::load_log_props2

I think this may be a bug. But my BML knowledge admittedly sucks. I think this is supposed to be
== 0

no_comments (set in editjournal_do.bml) seems to indicate that a post doesn't allow comments. So if your opt_nocomments != 0 then you're not allowing comments so there aren't any. If it ==0 then you do allow comments, there may be some, but
it->{comments} now fails

So, this now gets posted to lj_dev. Can someone check me on this?

My dream of course would be a simple tag in the item that lists the number of comments. Even the link would be great because it carries
where nc is the number of comments.

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded