user-generated-content

Parse HTML user input

主宰稳场 提交于 2019-12-13 02:26:11
问题 Let's say I have a string from the user ( $input ). I can go and strip tags, to allow only allowed tags in. I can convert to text with htmlspecialchars() . I can even replace all tags I don't want with text. function html($input) { $input = '<bl>'.htmlspecialchars($input).'</bl>'; // bl is a custom tag that I style (stands for block) global $open; $open = []; //Array of open tags for ($i = 0; $i < strlen($input); $i++) { if (!in_array('code', $open) && !in_array('codebl', $open)) { //If we

What is the best way to organize user generated content in a social network? [closed]

狂风中的少年 提交于 2019-12-10 10:32:41
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm searching for the best way to automatically organize all user generated content in a social network. I'm building a site in ruby

What is the best way to organize user generated content in a social network? [closed]

孤者浪人 提交于 2019-12-06 04:43:35
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm searching for the best way to automatically organize all user generated content in a social network. I'm building a site in ruby based upon lovdbyless' framework. the site is a place for men to share specialised knowledge. I've

How should I order these “helpful” scores?

谁都会走 提交于 2019-12-04 05:24:49
Under the user generated posts on my site, I have an Amazon-like rating system: Was this review helpful to you: Yes | No If there are votes, I display the results above that line like so: 5 of 8 people found this reply helpful. I would like to sort the posts based upon these rankings. If you were ranking from most helpful to least helpful, how would you order the following posts? a) 1/1 = 100% helpful b) 2/2 = 100% helpful c) 999/1000 = 99.9% helpful b) 3/4 = 75% helpful e) 299/400 = 74.8% helpful Clearly, its not right to sort just on the percent helpful, somehow the total votes should be

ASP.NET MVC How to manage user content using ASP.NET Membership Provider

时光毁灭记忆、已成空白 提交于 2019-12-03 14:28:06
I come from 5 years of experience with ASP.NET Web Forms, and I'm new to ASP.NET MVC. I'm now trying to learn MVC with some tutorials, video tutorials, and books. I'm using Visual Studio 2012 and the brand new ASP.NET MVC 4 to build a little web application to manage my portfolio of mutual funds. This should let me get inside the new pattern and learn lots of new things... My application should also let some other friends to do the same. So it has to manage different users' portfolios . I've built a little DB with Entity Framework Code First, so I have some basic models: Fund, Portfolio, Share