-
Posts
228 -
Joined
-
Last visited
-
Days Won
9
Content Type
Profiles
Forums
Events
Everything posted by G7470
-
When converting from mysql to mysqli, if done using the procedural language style like such: $result = mysql_query("/* QUERY GOES HERE */"); You have to add the database connection as a parameter BEFORE the query itself. So, as long as you have your configuration file included somehow (through header or some other header file), then all you will have to do is use the variable that connects to the database. Usually, in your config file, the variable you want to use is assigned something like this: $con = mysqli_connect('/* HOST */','/* USERNAME */', '/* PASSWORD */', '/* DATABASE NAME */') or die("Error ".mysqli_error($con)); So, $con is the variable to use. Then, for mysqli_query, you would make those look like this: $result = mysqli_query($con, "/* QUERY GOES HERE */"); For more information of the mysqli php class, check out here: http://php.net/manual/en/class.mysqli.php
-
Oh, sniko the critic I see. :p ~G7470
-
Of course with a name too long, it could greatly effect the readability; however, you can also make the variable names relative to its purpose to improve this issue. Here's a little snippet from a drug modification mod that I made: $growdrugres = mysql_query("/* QUERY HERE - LEFT OUT FOR SNIPPET */"); if(mysql_num_rows($growdrugres) > 0) { while($drugarr = mysql_fetch_array($growdrugres)) { if($drugarr['ending'] < time()) { $countdrug = 1; } } if($countdrug == 1) { echo "<center><a href='growdrugs.php'><b>Click here to harvest your drugs.</b></a></center>"; } } One more, probably the longest variable names I have ever made here from another mod I made: $drivebyconfig = mysql_query("/* QUERY HERE - LEFT OUT FOR SNIPPET */"); $drivebyconfigsettings = mysql_fetch_row($drivebyconfig); $requiredwep = $drivebyconfigsettings[0]; $requiredarm = $drivebyconfigsettings[1]; $requiredcar = $drivebyconfigsettings[2]; ~G7470
-
Personally, it all depends. A lot of the code I write is not for a completely blank website or a blank application. Most of the time, it's adding onto it or fixing problems with said application. So in those cases, my coding convention mimics what is already there in order to keep the coding bases somewhat consistent. If it is a blank website or my personal site, most of my variables do not even have either of these conventions. A lot of times I make my variables all one word, all lowercase with comments around it explaining what the variable is and what it is used for. ~G7470
-
This is a nice feature for a desktop platform; however, on a mobile platform, it is basically impossible to use. Have you implemented any mobile-friendly options for tools like this? If so, then awesome! I would certainly like to see them. If not, then something to think about. :) Nicely done though, as Tangled said, it is a very cool feature. ~G7470
-
Is the site public yet? If so, what's the URL? ~G7470
-
Ah. *shrugs* it just looks cluttered. Not sure if that's directly off of an engine or something, but that's just my opinion. Don't want to steer too far off-topic here, though. ~G7470
-
Samurai Legend personally, I just think that the profile page that you have as a screenshot has way too much information on the screen. Is that the admin view or a general user view? Also, with the enhanced profile view, that does look very similar to GRPG. ~G7470
-
Agreed with Script47, make sure any files you're including aren't restricting visitors from viewing your page. Can you view the login page without having the users online portion of your code there? ~G7470
-
I would combine both sniko's and HauntedDawg's methods into one. Create an admin sub-domain, and with that sub-domain, lock down root database access, abilities to back up databases, etc. ~G7470
-
I read your blog post, and I completely agree with what you are saying. Google is a great tool in order to find solutions to the problems of which you are experiencing as a developer, but without the knowledge of what it is you are actually doing, you are bound to make the same mistakes over and over again as well as create different (and complex) solutions for the same problem. This not only creates heavy inconsistencies in the code-base that you write, but it can also hurt you greatly in the future when said project needs a modification or bug fix. This is also one of the issues at many colleges today because many students (as well as professors) go through programming courses without really understanding what they are learning and/or teaching. This causes a great disconnect between them and the industry as a whole, which also can be a big factor into the quality of code in the future. The industry that is looking for the high-quality programmers will given time kill off a lot of this poor quality programming style, but until a major wake-up call for programmers is shown everywhere, this will not be a reality. ~G7470
-
At least from my experience using PHP, it is pretty flexible and can be easily integrated into other languages with what you would need PHP for (variables mostly). I don't think moving to a jQuery/JavaScript style would make a whole lot of sense and may actually cause more confusion for programmers as to variables and other PHP objects. ~G7470
-
Work related things today. Been on vacation for almost a week, so have to get back to ol' grind. Mostly PeopleCode-related tweaks to projects as well as hopefully to finish building my next C# MVC webpage for work. ~G7470
-
The styling looks pretty good. The only comment I would make on this is that the font and look of the login button versus the register button are completely different even though they're both just regular buttons. Not exactly sure if that's what you were going for, but wanted to point that out. Although very small, inconsistencies could pose a problem with the overall branding of the game, so keep that in mind when looking through your script to ensure said consistencies exist. ~G7470
-
This video will answer your question...
-
Gotcha. Yeah haha that's certainly a lot of content you would have to create for that; however, I certainly would be interested in a game like that. It's unique and sounds really interesting to me! ~G7470
-
Would this mafia game have the same basic core structure as many other mafia games (attacking players, mugging players, daily bonuses, health, crimes, mobster stats (strength, agility), etc)? This certainly is an interesting idea though. I don't think I have seen this kind of mafia game successfully coded. I certainly would like to see it! ~G7470
-
*shrugs* haha I think everyone has their own different style. Personally, I would either allow the flexibility of loading several different models based upon the page being requested, allow loading of several different views based on the same criteria, or even do both. From the MVC framework uses that I have seen, loading of the views was on the model and loading of the models was on the controller, but regardless, if that flexibility that I mentioned is present, it should work. ~G7470
-
MVC is certainly an interesting framework to use. I think for games that many developers here on MWG do, MVC would be a very appropriate framework compared to many other frameworks that are used here. This is certainly a great start to something much better. In my opinion, in my past experience with MVC, I would load the view within the model. The controller should control only the base logic as well as load the appropriate model, but one model can be the base for many different views. ~G7470
-
I could do a complete security check of your site if you're interested. I can give you a diagnosis of what I find and give you a priority list of what should be fixed first/last so that you have something to go off of. If interested, pm me.
-
I'm familiar with the aspects of the game (rules, etc) but not necessarily the players themselves. Also, not really sure what kind of game you were thinking of. Care to expand on the kind of game that you have in mind?
-
I really like this. It's clean and well-defined as to what code file does what. The only thing I could see is to initially disable the lottery page (and give admin access) so that any users who would be on the game would not accidentally get on the lottery page somehow and use it before it is ready. Those couple little tweaks would give the admin/owner ability to test without any users going in and messing things up before the admin/owner feels comfortable with it going "live". Other than that, it looks great. ~G7470
-
Simple, but for what it's worth, simplicity is great for any developer. Viewing the news is a little tricky, though. It seems like it would be a real pain for a user to view the actual news that you want to post, as the table really doesn't bring out the real content (which is the news itself). I would suggest a change of formatting, like perhaps the title and article itself be in a couple divs and the user/how long ago information be displayed in a different, much smaller div? ~G7470
- 1 reply
-
- 1
-
-
Hey all, I'm Goliath (AKA G7470). Thanks DopeboyGFX for the acknowledgement as well as everyone for their feedback. I greatly appreciate it, as I literally launched the site yesterday with hardly any outside input from programmers. This information gives me more as to what everyone would be looking for when they are looking at a programmer's work. I do have other projects that I have done and will be updating my portfolio with said projects. Again, I didn't have any real input on the site before launch, so I was not sure really what to put. My expertise is in the following: - PHP - jQuery - JavaScript - AJAX - .NET/C# - Java I'm working on updating my portfolio with more examples of those language expertise, but again, thanks all for the feedback. Always good to have some criticism in order to make it better. :) ~G7470