Stories
Slash Boxes
Comments

Slash Open Source Project

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • by alessio (25) on Wednesday March 20 2002, @05:59AM (#4562) Homepage Journal
    I believe latest releases of Slash have already a skeleton of this feature available: if you notice, on Slashcode.com's own homepage there is a slashbox (maybe it's not in your choice of boxes) with latest comments.

    It comes from a call to search.pl?op=comments&content_type=rss [slashcode.com] but unfortunately it doesn't seem to work at my site [accordo.it] where the links are all broken. Maybe it's been fixed in latest CVS or Krow fixed something for Slashcode.com.

    I see your work is in a more advanced stage (and also more pleasant to see), but maybe we should decide which is the best approach.

    --

    Check out the Slash in Italian Project [kenobi.it]

    • Hmm. I didn't know about this. If I had, I don't think I would've have bothered writing the plugin.

      I think the only difference between my way of doing it, and this way is, that this way is simpler.

      Also, this doesn't automatically create lastcomments blocks per each section. However, I would think that's *also* easily doable by creating slashboxes that refer to a particular section [slashcode.com].

      Hey slashguys - when did this block get created? I don't recall anyone mentioning it when someone was asking about a last-com
      --
      lottadot [lottadot.com]
      • I thought I had posted about it. It is just a reference to a query to Search. Turns out though that the Search that is shipped though doesn't give out good URLs, so while this feature is available in the tarball releases it is broken.
        So did you know that you could do a content_type=rss on search?
        --

        --
        You can't grep a dead tree.
    • I also had a problem on my site.

      for the version I am running, I needed to fix a problem in search.pl

      lines 278 and 279 now read:

      title => "$entry->[5]"."<br>". "<a>"." commenting on: "."$entry->[3]",
       
        'link' => ("http:"."$entry->[1]"."&cid="."#"."$entry-> [9]"),

      and it all works fine.
      • that is
        </a>

        not
        <a>

        this way the link in the box ends at that point and the title of the article it is commenting on is not part of the link. This is not exactly kosher as it leaves an orphaned </a> at the end of the entry, but it seems to work and looks nice in the box.
      • The problem is, I don't think you can add HTML tags in the generated RSS output, because it gets encoded and can fail validation.

        Also, it would be better to use the new style ';' char instead of '&' to separate params in the URL: it behaves much better in the RSS encode/decode cycle.

        --

        Check out the Slash in Italian Project [kenobi.it]

        • Thanks for the tips on seperating the params.

          I know that it is not fully valid to add the code that I did. But I did it as a test to see what would happen and it has had no trouble being parsed. If you try to add a full href tag, it would break, but just adding the /a seems to work (for now).

          check it out at http://info.interactivist.net [interactivist.net]