Jump to content

unsider

Members
  • Posts

    610
  • Joined

  • Last visited

    Never

Everything posted by unsider

  1. Because there is so much content it's hard to really to critique everything, so I'll start with the things that i dislike/stand out. I'd redo the nav-bar, it's porly done, and could really add appeal. If it's an anime site, why not create some article anime background or more colorful logo, the 'all-red' scheme is not only rough on the eyes, whats a random viewer gonna think...you want to establish the 'this is an anime site' immediately. I had also originally thought you'd designed the PHP, and if that were ther case I'd be impressed by that, but I'm seeing that PHP-Fusion created the 'template' for you. Just takes the appeal away, hardly anything left to critique without that, when your asking for a critique from a board full of people (not all, but you get the point) who write their own code for the sites they create just adds insult to injury, wouldn't you say? Sorry to hit you on this issue, it has been bothering me though I'm also noticing while you have used a bit of CSS, it is primarily table structured, and I think you should re-consider a whole new design, using CSS. It's avaliable to you, why not take advantage of it? I will admit, while it is not flashy, I could navigate around easily so good job on that. Why not center the content, or do something with that black space on the right, it's wasted space you could be using for user-appeal. I'd also reconsider organizing the content as well, things are quite scattered, and might be important, but they go unreconized, like the "latest-threads" section, etc... Well...I hope a little bit of that was helpful, not just a rant. Good luck.
  2. I'd suggest looking into some CSS tutorials. It's almost all table structure, YUCK!!! And not to mention the login/reg form's validation is non-existant (aside from length properties, and such), I'm not gonna drop you're tables, etc... but some other jerk-off might, so I'd suggest looking into form validation as well. I'd also suggest taking down the ads as of right now, you'e not trafficing nearly enough active to justify making your site look even worse.
  3. Time to look up some tutorials on google. Haha @ your username too
  4. I don't know what was wrong me. Need to lay off the old pipe. Sorry about that, figured it out.
  5. I need the <?=$row_blog['title'];?> posted in <?=$row_blog['category']?> by <?=$row_blog['name']; content to be alternated in the greycell, and whitecell divs, but for some reason I just can't logically write a piece of code that will accomplish this. <grey>content</grey> <white>content</white> Sorry about this, I'm just having trouble doing it. <div id="module-latest-threads"> <div class="module-header clear"></div> <div class="module-left-content clear"> <?php // SQL query $query="Select *,COUNT(*) FROM article INNER JOIN categories ON categoryID=catid WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) GROUP BY title DESC LIMIT 3 "; $blog = mysql_query($query) or die(mysql_error()); $num_blog = mysql_num_rows($blog); if($num_blog > 0){ while($row_blog = mysql_fetch_assoc($blog)){ $row_blog['title']; posted in $row_blog['category'] by $row_blog['name']; ?> <table width="198"> <tbody><tr><td class="whitecell"> <div class="interviews"><a href="">test</a></div> </td></tr> <tr><td class="graycell"> <div class="interviews"><a href="">test</a></div> </td></tr> <tr><td class="whitecell"> <div class="interviews"><a href="">test</a></div> </td></tr> <tr><td class="graycell"> <div class="interviews"><a href="">test</a></div> </td></tr> <tr><td class="whitecell"> <div class="interviews"><a href="">test</a></div> </td></tr> <tr><td class="graycell"> <div class="interviews"><a href="">test</a></div> </td></tr> <tr><td class="whitecell"> <div class="interviews"><a href="">test</a></div> </td></tr> <tr><td class="graycell"> <div class="interviews"><a href="">test</a></div> </td></tr> <tr><td class="whitecell"> <div class="interviews"><a href="">test</a></div> </td></tr> </tbody></table> <?php } } else { echo "No topics to list"; } ?> </div> </div> <div class="module-separator"> </div>
  6. <?php if(isset($_POST['submit'])) { switch($_POST['filter']) { case 'sepia': header ("Location: http://localhost/sepia.php"); break; case 'filter2': header ("Location: http://localhost/edges.php"); break; case 'filter3': header ("Location: http://localhost/emboss.php"); break; } } ?>
  7. next. Go google some 'opinions' on ROR, there are plenty, and hundreds of "PHP vs. ROR" articles as well...i did
  8. Why not list other web dev frameworks, like Ruby on Rails, etc...? And I'm sticking with PHP fo the time being
  9. I guess that's true, and haha it's not catching that error.
  10. Ya that's the next thing on my list, so please excuse the pathetic echos
  11. <?php session_start(); include('config.php'); // others... $name=$_POST['name']; $email=$_POST['email']; $pass1=$_POST['pw1']; $pass2=$_POST['pw2']; $ip = $_SERVER['REMOTE_ADDR']; if(isset($_POST['Submit'])){ // username validation if(empty($name)){ echo 'Please enter a username'; exit(); } $name = stripslashes($name); if(strlen($name) < 5){ echo "Username below 5 characters"; exit(); } else if(strlen($name) > 15){ echo "Username above 15 characters"; exit(); } else if(!eregi("^([0-9a-z])+$", $name)){ echo 'Invalid username characters'; } $query = "SELECT * FROM user WHERE uname= '$name' "; $result= mysql_query($query); $num=mysql_num_rows($result); if ($num > 0) { echo "Username already exists, please choose another."; exit(); } // password validation if(empty($pass1)){ echo "Please fill in the password feilds"; exit(); } else if(empty($pass2)){ echo "Please fill in the password feilds"; exit(); } else if("$pass1" !== "$pass2" ){ echo "Your passwords do not match."; exit(); } $pass1 = stripslashes($pass1); $pass2 = stripslashes($pass2); if(strlen($pass1, $pass2) < 4) { echo"Password under 4 chars"; } else if(strlen($pass1, $pass2) > 15) { echo"Password greater than 15 chars"; } else if(!eregi("^([0-9a-z])+$", ($pass1 = trim($pass1)))){ echo " Password contains invalid chars"; } else if(!eregi("^([0-9a-z])+$", ($pass2 = trim($pass2)))){ echo " Password contains invalid chars"; } // email validation if(empty($email)){ echo 'please enter an email address.'; exit(); } else{ $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$"; if(!eregi($regex,$email)){ echo "Email invalid"; } $email = stripslashes($email); } if($_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'])) { unset($_SESSION['security_code']); } else { echo 'Please try again, you have provided an invalid security code'; exit(); } $query="INSERT INTO user (uname, pw, email, date_joined, ip, level, isbanned) VALUES ('$name',password('$pw1'),'$email',NOW(),'$ip','$level','no')"; if(!@mysql_query ($query)) { echo mysql_error(); } } ?> I don't expect a really thorough inspection, but I would appreciate if someone could skim it for obvious security/validation flaws, or other ways in which I could make my code more effecient/effective. EDIT: if this is the wrong section I apologize, I think I've seen someone post a 'please check validate' thread in here before, so I assumed it was ok Thanks.
  12. Unless I'm missing something, that should be it. Assuming all of your functions, etc... are being called correctly.
  13. Let's assume I'd like to grab the # of the comment on that specific comment. I'm using one DB table to store all the comments on every article, therefore, just retrieving the 'id' is not sufficient. I think I have an idea, but I'm not sure how I'd write the syntax for it. I'd retrieve the # of comments for that particular article, but then I need to display the # in which they are being displayed on that particular page... Maybe you guys can help me work out the logic, I just can't wrap my head around it. Thanks.
  14. Well thank you very much mr. combs I still have a lot to learn.
  15. // does not display, or any code there afterward <textarea name="body" cols="60" rows="9" class="input" id="body" value="'.$row['body'].'"> // works, displays, but in a limited text box <input name="body" cols="60" rows="9" class="input" id="body" value="'.$row['body'].'"> Is there something I have to add in order for the textarea tag to work, or...? Any help is appreciated. EDIT: on second thought I suppose this could go in HTML help, sorry if that's the case.
  16. For ALL MAC USERS!!! Coda is the BEST text-editor I've found. Google it, and find out why.
  17. Already on top of that Thanks for the tip though.
  18. Buying 1 book can be cheaper, assuming the book is around 700 pages, uses a lot of printer ink, and paper. Shrug, maybe printing is cheaper/better, but you can get some used books on Amazon really cheap. Edit: don't personally know any of those books to offer opinion, but Larry Ullman is a great author, even though his stuff might be a little more advanced. You should look him up, and speed up your learning. Or maybe buy that and another beginner book, and use those 2. 1 is enough, 2 is overkill, 3 is just adsurb, no more than 2...
  19. Alright, I just needed reassurance, I know the forums, used a DB heavily, but not necessarily how heavily (never takin a look at the code in-depth). Thanks though EDIT: wow...that settles it then.
  20. This isn't directly code related, but it is a PHP question, if not, feel free to moce to appropriate question. I am trying to design a comment system, but have the ability to retrieve/determine the following: count the #, comments (42) the ability to edit/delete check the existence of comments While not complex, it is absolutely necessary. Should I use a DB do this? Or Not. My only concern with DB is that each article will most likely have dozens of comments and that adds up, and even time a query has to retrieve the comments for that particular article, and the output could become slow. I've never allowed the existence of comments on my sites, so I'm kind of new to this. Sorry for my ignorance. If there is another method, or other ideas to make that possible as effeciently as possible, please let me know.
  21. I was close anyway, Thank you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.