Giter VIP home page Giter VIP logo

nerdnews's Introduction

<img src=“https://codeclimate.com/badge.png” />

nerdnews

This is a project for creating a free and open source news site by Ruby on Rails framework. This project is under GPL 3 license.

DEMO

If you wanna see a demo of this project you can see it: nerdnews.ir/

API

Stories

GET    /stories.json
  This action gets 20 most recent stories and for getting next 20 most recent stories,
  you have to send page parameters.
Optional Parameters
  page
Response
  The response would be a json arrays of stories which has the following fields:
    id:integer => ID of the story
    title:string => title of the story
    content:text => content of the story in html format
    total_point:integer => total point of the story
    hide:boolean => indicates that story must be hidden or not
    comments_count:integer => number of comments for the story
    view_counter:integer => number of views for the story
    positive_votes_count:integer => number of positive votes for the story
    negative_votes_count:integer => number of negative votes for the story
    published_at:string => publish date of the story in Jalali Date
    author:string => author of the story
    author_avatar:string => avatar of the author story
    reference_url:string => reference of the story that would be a link
    story_url:string => story url
    comments:array => array of comments for the story which has the following fields:
      id:integer => ID of the comment
      name:string => name of the user who comments
      positive_votes_count:integer => number of positive votes for the comment
      negative_votes_count:integer => number of negative votes for the comment
      total_point:integer => total point of the comment
      content:text => content of the comment
    tags:array => array of tags for the story which has the following fields:
      id:integer => ID of the tag
      name:string => Name of the tag
      url:string => the tag url
      thumbnail_url:string => the tag's thumbnail url

LICENSE

This project just another free and open source news site that everyone can create news and create comments and so on.

Copyright (C) 2012  Hamed Ramezanian

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

nerdnews's People

Contributors

arashm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nerdnews's Issues

invitation via email feature needed

it would be better to have invitation mechanism built-in to invite friends.
now this invitation can contain brief but useful information about the service they've got invited.

send mail sharing icon

Due to user request, It will be added a sharing icon for sending mail to another person

Persian cleanup before publishing

We have to cleanup stories before publish and put a link or something else in somewhere for informing people that you're writing wrong and we should point them to a correct place to learn how to write correctly, like wikipedia.

No way to view/edit a submitted post

After submitting a news, while it waits for acceptance from admins, there's no way to view or edit submitted post. it just vanished!
I suggest you add it somewhere in my profile. so I can know about it's existence and even what happened to it (if it rejected/accepted)

Removing the "Dislike" Buton

the "dislike" button could be use by some users (haters) to abuse other users and their opinion. (this is happening everyday in reddit, narenji, ....)

if you like something, push the "like" button and share your positive feelings.
BUT if you dont like it, well... just ignore it! (like facebook)

hamed tells me the "dislike" button is usefull for specifying "spam posts". well, i dont see that case, because every incoming post will be reviewed.

دیدگاه ها

سلام خسته نباشید بچه ها :)
در مورد بخش دیدگاه‌ها دو تا مسئله هست.
اوّل اینکه برای خبر «انتشار رسمی Valve برای لینوکس» نشون می ده یک دیدگاه وجود داره ولی چیزی نشون نمیده و در زیر می نویسه «هیچ دیدگاهی وجود ندارد. »
دوّم اینکه می خواستم نظری ارسال کنم (برای همین خبر) ولی با خطای :
We're sorry, but something went wrong.
مواجه شدم.
البته نه ثبت نام کردم و نه وارد شدم !!

Font Size

I had the feeling that the font size is somehow big! In response to our older friends, those with glasses, a good idea ... but offering an option to customize the size, a bar like functionality, which also stores the preferences of each, give visitors more liberty in design.

comment supports markdown markup

for a better view and better readability, it would be better to have markdown or any lightweight markup language to enrich the comment :)

Captcha become invisible after preview

After we choose to preview our new post, the captcha part become invisible and when we want to submit post, we receive invalid captcha error and have to submit captcha again.

quick commenting feature needed

it would be cool to have the ability to post a comment for a story on the main/new_stories page, specially for stories that have no comment yet.

[insisting] on URL validation check

as previously mentioned here http://bit.ly/Y3hJD8, it is necessary to have URL existence validation. if you think it will cause some sort of annoying delay, you can simply put it in view (and run it on client side) using javascript.

IMPORTANT: when the news will be briefly available by the supplied referenced link, it is vital to check if it's a valid one before sending stories.

a snippet-code/guide for developers:

$('story[source]').on('blur', function({
   news_resource_url = $(this).attr('value');
   //~ you can first check for the URL validation Regex Here
   if(url_validation_check(news_resource_url)){
      //~ and when if it has a Valid URL schema, check for url HTTP response
      $.ajax({ type: 'head', url: news_resource_url,
         success: function() {
            // URL exists
            $('story[source]').parent().parent().removeClass('error');
         }, error: function() {
           // page does not exist
           $('story[source]').parent().parent().addClass('error');
         }
     });
   }else{
      //~ url is not valid, do something
      $('story[source]').parent().parent().addClass('error');
   }
});

function url_validation_check(url){ 
   # this function is a slightly modification of this one: http://bit.ly/14IJ4h0
   return /((https?|ftp):\/\/(\w+:{0,1}\w*@)?(\S+)|)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!-\/]))?/.test(url); 
} 

Valid URL Checking

NerdNews should check for Valid URL Request Response before posting the story. obviously post stories only, if the referenced link has HTTP Response 200.

Mini Profile

show a mini profile while hovering on a user name

Removing brand name

We have to remove nerdnews brand from the project and make it variable for selling the project.

Event base app

We have to change all actions in nerdnews to be event base.
This approach could be implement by ActionController::Live module or something else.

Comments in feeds

Show first ten comments in our feed and a link to the comment page.

Ads

Add UIs to simplify showing ads in website

Voting Twice!

User can vote twice in this special situation:

I pressed the Green Vote Button once, and select one of the options.
Then, my browser started to load. It took a little while.
Before it loads the page again, I pressed the green button again and select another option.

Now two votes are registered!

Take a look at this link, and see that I voted twice under the "آیدین غریب‌نواز" ID.

It's better not to rely on the UI (Disabled vote buttons). Server should check for duplication individually.

Implement Omniauth

We have to implement Omniauth or something else for handing authentication in API base apps. This is just an idea and maybe we'll need another thing for doing this approach.

Character counter for stories

It is a good idea to add a counter for characters when someone types a story like twitter. But we should beware that links should not be count or maybe have a constant long.

sorting tags

In tagging, we need a feature to sort story tags by javascript and ajax request.

disabling out-going comment's send button

in order to avoid duplicated/multiple-sent comments, it would be better to disable send comment button when it's already trying to send it.

also, it would be better to keep comment's [and even stories] text as digest and then consider this digests unique for at-least 10 minutes. this way, accidentally duplicated comments/stories would never be stored.

difference between Name and nickname

In the sign up form, giving name and family name is asked but some users entered their nickname , it is good to have another field for asking nickname and also an option for choosing whether the nickname be shown in news or complete name .

Hot news

Add a 'Hot news' tab in our first page

Persian characters in URL

Existence of Persian characters in URL, not only make it difficult to link the stories, but even makes the link doesn't work at all in some websites like twitter, so the sharing button is uselesss.
I think it is a good idea to map Persian characters with English one, Generate a URL for stories by the time and time of creation or some thing like that and not the title, or in the "!gsh"est way, convert the URL by a URL shortener before sharing on twitter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.