Jump to content

Fmdpa

Members
  • Posts

    1,035
  • Joined

  • Last visited

Everything posted by Fmdpa

  1. Thank you for your compliments, Graham. You have a very attractive site, too! I rolled out a new design on the events page, so check it out and let me know what you think. I also completed the home page and, if there are no errors or design flaws, it will go live ASAP! I'm getting a YSlow rating of A and I haven't even made the static resources cacheable yet. I will also compress my stylesheet before the production launch.
  2. Thanks for you comments, Krewe! You are right, "Message:" does look better at the top. I'll update my code to change that.
  3. Thanks for the comments! Honestly, I'm not very satisfied with the events section design either. I'll work out a new design for that and let you know what I come up with. Oops, I thought the center element was new in HTML5, but looking further, I see that it was actually deprecated in HTML5. I'll fix that pronto.
  4. Hey everyone, I'm working on finishing a website for an organization. One of the things they wanted was that it be a low-bandwidth website. The only large image is the banner image, which I designed from scratch. The website currently gets a YSlow score of A (93) and I haven't even done some final things like compressing the stylesheet and adding expires headers. Boen_robot, you can see the RewriteRule problem I encountered on the broadcasts page. The music file in the broadcasts page is just Windows 7 sample music. The upcoming event is not real either. The "upcoming events" and "recent broadcasts" frame are not functional yet, so just pretend. Any critiques whatsoever regarding the website are more than welcome. http://akv4f.cyberstream.us
  5. Fmdpa

    Mvc Php

    This is an outstanding screencast tutorial I remember seeing: http://net.tutsplus.com/tutorials/php/create-your-first-tiny-mvc-boilerplate-with-php/
  6. Oddly, that doesn't do a thing! Maybe I'll just have to compromise and leave the query string showing like that.
  7. Good guess, I didn't catch that! However, I'm still having the problem. Erased everything else in the htaccess file (other than "RewriteEngine On") and it is still doing it. So it is not being caused by some other rule. I'm so confused....
  8. If by "off topic" you mean topics unrelated to web development, then I think the moderators have decided to keep this forum only web development related. Web development discussions can be warm, friendly, and casual; I've seen it happen on this forum before. Did you mean relax?
  9. I have a simple RewriteRule in my .htaccess file: RewriteEngine OnRewriteRule ^broadcasts/?$ broadcasts.php?action=view&page=1 The problem is that the browser is showing this when I visit /broadcasts: /broadcasts/?action=view&page=1 I am completely stumped because nothing like this has ever happened to me before. Any ideas or solutions?
  10. Fmdpa

    Node.js

    I have also been confused about the big hype about Node.js and its relatives. I think I'm slowly getting it though...
  11. That's a relief. But it would still be rather tedious implementing at least four different logins. I said "OAuth", but I actually meant "omniAuth" (http://net.tutsplus.com/tutorials/ruby/how-to-use-omniauth-to-authenticate-your-users/) It looks like it makes things a lot easier, but it is only for RoR AFAICS. I can't find a PHP equivalent.
  12. Few people will register on a website unless they must. Because of this, websites that allow you to login with Twitter, Facebook, Yahoo, Google, etc. are a lot more likely to attract interaction from visitors. But it's kind of a pain having to deal with all of the different APIs. Does anyone know of a library (Like OAuth - but that only works with RoR AFAIK) that allows you to easily create a login system with these websites?
  13. Fmdpa

    Css3 Animations

    I don't know. It's not triggered by JS, like I originally thought. Try contacting him; I'm sure he'll tell you.
  14. http://net.tutsplus.com has a great collection of those. Chris Coyier has also been creating some recently. Maybe it's just me, but it may be reinventing the wheel to have video tutorials on the W3Schools site.
  15. Ah-ha, that sounds about right. I tried putting a space between the "b" and the parentheses and now it is display correctly.
  16. I know, it's strange. I tried to find a place on IPS's website to file a bug, but I couldn't.
  17. Did it occur before or after the forum update?
  18. Oops, I don't know how that happened. You are right. It must have happened somehow when I posted the code here. Fixed. Edit: I don't know what's going on, but the edit won't save the "B" as lowercase! Weird.
  19. This seems to do the trick! sort_results = function(obj, field, reverse) { a = [] for(i in obj) { a.push(i) } return a.sort(function(a, b ) { var A = obj[a][field], B = obj[b][field]; return (A < B ? (typeof A == 'number' && typeof B == 'number' ? A - B : -1) : (A > B ? 1 : 0)) * [-1,1][+!!reverse]; })}
  20. The real scenario is that I have an object (with a similar structure to the one I gave before) that I am building a search function for. The 'num' property would show the relevancy score for that item's key. Here's an example if I was searching for "foo" obj_to_be_sorted = {'foo foo bar foo' : {'relevancy_score' : 3}, // score is 3 because "foo" was matched two times'foo bar' : {'relevancy_score' : 1}, // score is 1 because "foo" was matched once'bar bar' : {'relevancy_score' : 0}, // "foo" wasn't found in either of these so both of their scores are 0'bar' : {'relevancy_score' : 0}} I want to then take the relevancy score and use it to sort the search results. EDIT: just saw your previous post; I'll see what I can come up with.
  21. I'm trying to write an algorithm return an array sorted by a given property in a JSON object. Here's an example of what I want to sort: obj_to_be_sorted = {'four' : {'num' : 4},'one' : {'num' : 1},'three' : {'num' : 3},'two' : {'num' : 2}} sort = function(obj, property, reverse_order) { a = [] for (key in obj) { a.push(key) } return a.sort(a, { /* I think it would involve the sort function... */ }} sorted_array = sort(obj_to_be_sorted, 'num', false); // should return the JSON keys sorted by the 'num' property, i.e. ['one', 'two', 'three', 'four'] I just don't know I would go about doing this. I'm thinking it would be only a few lines of code - very simple - but I'm just not good at writing algorithms yet. I would greatly appreciate any assistance you could give me.
  22. Fmdpa

    Crazy Php/xml Problem

    OK, that makes sense. Thanks for explaining that! It ended up that that line of code was the source of some other unrelated problems I was having. The feeling of satisfaction when problems are solved is almost worth having the problem.
  23. Fmdpa

    Crazy Php/xml Problem

    Well it ends up the culprit was a single line of code in my global.php file: header('Location: ' . $_SERVER['PHP_SELF']); It related to my login system and it was only supposed to run once when the person first visited the page. But I wrote the condition in which it was encapsulated incorrectly, causing it to run each time the page loaded. Honestly, I don't know why the loop ever stopped, and why it always stopped at 21. It also baffles me that the add() function was triggered and run each time because, theoretically, the redirect should have happened in the program execution prior to executing the add() function.
  24. Fmdpa

    Crazy Php/xml Problem

    I'll investigate in the global.php file. I highly doubt that there would be anything in it to cause this, but I don't know.
×
×
  • Create New...