forum

Insert data into multiple tables from one controller/view [Rails 4]

梦想与她 提交于 2019-12-24 07:01:25
问题 I have more curious questions for all you amazing people! I am creating a forum and when you create a topic, you are also creating the first post at the same time. I need to assign variables to certain fields. Example: :user_id => current_user.id, I don't have the param settings correct, so many of the fields are NULL when stored in the database. Models class Topic < ActiveRecord::Base belongs_to :forum has_many :posts, :dependent => :destroy belongs_to :user accepts_nested_attributes_for

PHP: get the value of TEXTBOX then pass it to a VARIABLE

假装没事ソ 提交于 2019-12-23 02:56:53
问题 Good Day!. I need a kinda little help for PHP. I’m really really newbie for PHP and I already search it to google and can’t find any solution. My Problem is: I want to get the value of textbox1 then transfer it to another page where the value of textbox1 will be appeared in the textbox2. Below is my codes for PHP: <html> <body> <form name='form' method='post' action="testing2.php"> Name: <input type="text" name="name" id="name" ><br/> <input type="submit" name="submit" value="Submit"> </form>

How do i check if a webpage exists with java?

泄露秘密 提交于 2019-12-23 02:17:18
问题 So here's the deal. I don't have it yet, but starting Friday, I'm in the process of making a forum. What I'd like to do is check to see if a user is registered on the forum. I'm not sure exactly, but lets say the users are stored in URL/users/NAME.WHATEVER (jsp?) how, in java, do i make a URL connection, and check to see if URL/users/Robert.WHATEVER == null? 回答1: Even you could have googled your answer: One simple way is to use the Apache Http Components HttpClient httpclient = new

Forum tags. What is the best way to implement them?

Deadly 提交于 2019-12-19 11:06:25
问题 I am building a forum and I want to use forum-style tags to let the users format their posts in a limited fashion. Currently I am using Regex to do this. As per this question: How to use C# regular expressions to emulate forum tags The problem with this, is that the regex does not distinguish between nested tags. Here is a sample of how I implemented this method: public static string MyExtensionMethod(this string text) { return TransformTags(text); } private static string TransformTags(string

Determining unread items in a forum

我们两清 提交于 2019-12-18 12:01:28
问题 Using PHP and MySQL, I have a forum system I'm trying to build. What I want to know is, how can I set it so that when a user reads a forum entry, it shows as read JUST for that user, no matter what forum they are in, until someone else posts on it. Currently, for each thread, I have a table with a PostID, and has the UserID that posted it, the ThreadID to link it to, the actual Post (as Text), then the date/time it was posted. For the thread list in each forum, there is the threadID (Primary

How do I protect my forum against spam?

…衆ロ難τιáo~ 提交于 2019-12-18 11:43:07
问题 I have a forum on a website I master, which gets a daily dose of pron spam. Currently I delete the spam and block the IP. But this does not work very well. The list of blocked IP's is growing quickly, but so is the number of spam posts in the forum. The forum is entirely my own code. It is built in PHP and MySQL. What are some concrete ways of stopping the spam? Edit The thing I forgot to mention is that the forum needs to be open for unregistered users to post. Kinda like a blog comment. 回答1

How to set Cookies at Http Get method using Java

拈花ヽ惹草 提交于 2019-12-17 16:19:14
问题 I want to do a manual GET with cookies in order to download and parse a web page. I need to extract the security token, in order to make a post at the forum. I have completed the login, have read the response and extracted the cookies (3 pairs of (name,value) ). I then wrote the String containing the cookies like this: CookieString="name1=value1; name2=value2; name3=value3" I then do the following HttpURLConnection connection connection = (HttpURLConnection)(new URL(Link).openConnection());

Forum software ASP classic [closed]

点点圈 提交于 2019-12-13 22:29:11
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . For a website I need a forum and I'm looking for code written in classic ASP. I know about phpBB and Simple Machines, but that's written in PHP. I'm used to use (classic) ASP for websites, because I think ASP.NET is to much overkill for simple websites. Or should I definitely switch to PHP? I'm thinking about

Algorithm to determine thread “hotness”

余生颓废 提交于 2019-12-12 19:42:33
问题 I'm trying to come up with a way to determine how "hot" certain threads are in a forum. What criteria would you use and why? How would these come together to give a hotness score? The criteria I'm thinking of include: how many replies how long since the last reply average time between replies The problems this algorithm must solve: A thread which has 500 replies is clearly hot, unless the last reply was over a year ago. A thread with 500 replies that was replied to a second ago is clearly hot

Forum solution for Rails 3 and Devise?

寵の児 提交于 2019-12-12 17:03:39
问题 I'm looking for a forum solution for a website I'm building. I'm using Devise and Rails 3, so does there exist any pluggable solutions? What about 3rd party services? 回答1: The goal of Community, is to provide a simple, and easy to setup forum application without having to dictate how your site it setup. https://github.com/gitt/community 回答2: You could build one yourself, you'll be surprised that it's not that time consuming, and you won't have to deal with the bloat that 3rd party solutions