reddit

Reddit's commenting system (hierarchial)

For those of you who have looked at Reddit's source code, where exactly is the logic where it manages the comments hierarchial structure? I downloaded the code, but couldn't even find the database structure let alone where the reads and writes are for the commenting. Is it doing updates on lots of comments if someone replies to someone...

what's the 5 character alphanumeric id in reddit URL?

Whats the 7n5lu in the reddit URL http://www.reddit.com/r/reddit.com/comments/7n5lu/man_can_fly_if_you_watch_one_video_in_2 how is it generated? update: @Gerald, Thanks for the code. I initially thought this is some obfuscation of the id. But, it is just doing the conversion from integer to a more compact representation. I am thinkin...

Reddit-style nested/threaded/indented comments for Rails?

I'm wondering if someone has already built a system for threaded comments (for lack of a better term) in Rails or if I need to build it myself. In case it's not clear, what I'm referring to is a comment system like Reddit's that automatically indents replies so that they appear like branches of a tree (preferably with voting just as Re...

Most efficient data structure to represent threaded comments in Java?

I want to represent threaded comments in Java. This would look similar to the way comments are threaded on reddit.com hello hello hello hello hello hello hello As in the example above, responses are nested in the HTML with appropriate indentation to reflect their relationship to prior comments. What would b...

C55: More Info?

I saw a PyCon09 keynote presentation (slides: http://www.slideshare.net/kn0thing/ride-the-snake-reddit-keynote-pycon-09?c55) given by the reddit guys, and in it they mention a CSS compiler called C55. They said it would be open sourced soon. It looks cool - does anyone have more information about how it works, why they created it (aside ...

How extensible is Google Moderator?

I am trying to integrate vote-up-buttons similar as in Reddit to Google Moderator. However, Google Moderator does not give me Shell access. This suggests me that the only way is to use Vote-up-buttons from an external server set by iframes. I would like to know How can you can assign Iframe_A to a question in Google Moderator? How c...

Turning threaded, reverse chrono Drupal story comments into Reddit-style comments

I have a Drupal site that currently displays comments in threaded, reverse chronological order. I am trying to change it to work like Reddit/Hacker News, where the threads and comments within each thread are instead ordered by their current score, based on a voting system I've added. I've found the query used to render the comments rig...

Python library/framework to write an application that sends emails periodically

I am considering to write an application that would covert the comments in reddit threads (example) to emails. The idea is to parse the reddit json data (example) and send new comments as plain EMails to subscribed users. One of the users can be gmane, so you can also read the comments over there. The motivation for writing this tool is ...

Reddit RSS feed returning less items when requested through HTTP?

I am trying to read data from an RSS feed which has 25 items. When I request the RSS file through HTTP it says there are only 20 items. function test($location) { $doc = new DomDocument(); $doc->load($location); $items = $doc->getElementsByTagName('item'); return $items->length; } // Prints 20 echo test('http://www.red...

Does Reddit use any type of ORM?

Sorry I want to learn Python, and was curious if Reddit's codebase uses any sort of ORM? ...

CSS margins: aligning a list against a float-left image

Hi, The following is my first cut at coding-up a reddit-like comment in html+css. I have a few questions about css and the general structure: How do I get the comment body ("The King took off his hat...") to align with the comment head ("Nathan, posted...") and the comment tail ("reply permalink ...")? I tried making the margin-bottom ...

Digg-like search result ranking with Lucene / Solr ?

I'm using Solr for search. I have documents that have an integer field "popularity". I want to rank results by a combination of normal fulltext search relevance and popularity. It's kinda like search in digg - result ranking is based on the search relevance as well as how many digs a posting has. I don't have any specific ranking a...

How do Reddit and similar sites keep users from voting on links and comments more than once?

I was curious and downloaded the code but I can't seem to find what I'm looking for. I thought I might find a database table with user ids mapped to link ids or comment ids. But I can't seem to find anything like this. ...

JavaScript code to handle comment folding (similar to Reddit's)?

I really like the way Reddit's comment system works - particulary the ability to smoothly fold/unfold a tree of comments. Is there some standard JavaScript code/library that does this? Or did Reddit develop this inhouse and is not portable? I'm fairly a beginner in JS, so browsing through Reddit's page source is not that helpful. ...

How to install and run (setup) reddit.com on windows environment?

Hi Everybody!! Reddit.com is providing their code as open source and free. I want to setup the reddit.com website at my local machine in Windows Environment. Could anybody please help me or guide me to the best approach. Also, i have apache (WAMP) installed in my machine. Kindly somebody help, I have searched everywhere but unable t...

Scraping and using data using PHP from a website that must be logged on to (Reddit)?

I would like to create a webpage that, given two reddit usernames and their passwords, subscribes user2 to all of the subreddits that user1 is subscribed to. So I need to: Get the subreddits that user1 is subscribed to. Subscribe user2 to those reddits I have experience using PHP, but I have no experience with scraping (especially wh...

Error while executing "paster shell example.ini" in reddit.com

Hi there!! Friends!!! I am frustated since last five days working on implementing reddit.com on a ubuntu 9.10 machine. Yes, I know that reddit.com has been tested on ubuntu intrepid. But now i want to install it on U9.10 I have installed postgresql database, created user copied the files, and installed all the dependencies. Everythi...

How to run a clone of reddit.com website. Reddit.com source code gives error while implementing on Ubuntu 9.10 (karmic)

Hello Everybody!! I am implementing the reddit.com source code on ubuntu karmic 9.10. I have followed all the steps and in one step where i am using paster command it throws an error. $paster shell example.ini File "/usr/local/lib/python2.6/dist-packages/Pylons-0.9.6.2- py2.6.egg/pylons/middleware.py", line 11, in from webhelper...

Can someone explain last year's reddit exploit to me?

Last year a user managed to inject arbitrary javascript into reddit's markdown syntax. Can someone explain how this was done and how I can test whether my site is similarly vulnerable? ...

Open links in new window with toolbar at the top - like reddit.com toolbar

So I want to be able to use jquery or similar to force all external links to be a. Opened in a new window (I think I have this covered From Here ) $(document).ready(function() { $('a[href^="http://"]').filter(function() { return this.hostname && this.hostname !== location.hostname; }).attr('target', '_blank'); }); b...