Jump to content

Philip

Staff Alumni
  • Posts

    4,665
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Philip

  1. ahh, admins have to enable it though. Just tried on a test serv... admin->forum->smileys & message icons->settings->Enable set selection by members.... or allow certain groups. Never enabled it myself
  2. I believe thats only for admins to choose for the whole forum.
  3. Everybody needs to eat, thus I pretty much have job security, haha.
  4. AKA - monkey work
  5. Oops, sorry haven't used it in a while in mysql. Try: SELECT SUBSTRING(comment, 1, 10) as comment, (rest of your values you need) FROM ".TBL_COMMENTS." ORDER BY commentdate DESC LIMIT 5
  6. SELECT SUBSTRING(comment, 10) as comment, (rest of your values you need) FROM ".TBL_COMMENTS." ORDER BY commentdate DESC LIMIT 5
  7. I never said it was bad nor did i say it wouldn't work but I'm going to leave it with this. Like I already said you are a respected member of this community and i respect your opinion on things and you are right maybe i'm making a to big fuss about it and I now know the pros and cons of using both techniques (I am just someone who doesn't easily do A just because someone said A is better). Anyway thanks for clearing this out! I think CV gave the same point I was trying to make but couldn't put it into the correct words. I'll leave it at that. I will however, add one piece of advice that he did mention. Just because Zend does it, doesn't mean it is the best/right way to do it for you. As a developer you should be looking for the best (and typically the easiest) way to implement an idea for your specific setup (or as case might be, for a range of setups.) This means opening your eyes a bit, and I admit I had never thought of having a fall back field like you suggested. Did I learn from it? Yes. Did you learn from it? I sure hope so.
  8. The only ones I don't really like are the thumbs up/down - think they are a bit too big. Other than that I love these new ones! I vote for new ones, I mean come on, everyone else has the SMF ones, lets shake it up a bit.
  9. Flipping through my daily reads, this was posted: http://www.smashingmagazine.com/2009/07/09/the-roadmap-to-becoming-a-professional-freelance-web-designer/ Although it is aimed more for designers, there is still a lot of great info in there for you to soak up. I'd highly suggest at least glancing over it.
  10. http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
  11. public_html/image.php?id=123456 is called, checks to see if current user is logged in yes - read 123456's image data (from under the public_html folder), output with correct header no - don't display image Really, no matter what I could go to a facebook photo, right-click and get the image url and give that to you and you could see it - even if you didn't have the permissions to view it originally. Yeah, it would just be the image, no comments, info, etc, but it is still the image.
  12. Philip

    Google OS

    I use Chrome as my main browser and rarely have problems, I think it's doing pretty "well". As for the OS, I wonder what the battery life will be like compared to current netbooks. I already get like 6hrs off of mine, and thats running XP with a few apps open.
  13. Good to hear you got it to work. Next time, just be sure to post more details and we can help you get to your conclusion faster and more efficiently.
  14. Yeah, in PHP it will always be like that.
  15. for ($i=1; $i<=100; $i++ { Should be: for ($i=1; $i<=100; $i++) { (notice there is no semicolon on the last argument in for)
  16. Right! All 1 or 0? Never ever a string of some sort.. Oh no wait we'll just add an if to our loop and a while later hey let's add an if to our loop and a while later hey let's add an if to our loop... Good thing you know what spaghetti code is It is spaghetti code Technically it's a hack. Know your framework.. It just doesn't make sense, because you already should be checking it server side to make sure the value is still correct. With your method - the fallback hidden field, I could easily forget that I need to check to make sure it is a 1 or 0 and nothing else. If I'm already checking for for the correct data type, I might as well just see if there is a checkbox field, and if so put my own default on there.
  17. Your extension shouldn't be .xml, it should be .php
  18. script.php?id=123&blah=trgd#test worked for me
  19. Yeah, that's kinda bad practice to have an extra hidden field. And this should be the following to avoid any notices/warnings: $checkVal = (isset($_POST['checkboxName'])) ? 1 : 0;
  20. What errors are you getting? Also try this (some of your quotes were off): <?php header('Content-Type: text/xml'); echo '<?xml version="1.0" encoding="ISO-8859-1"?> <rss version="2.0"> <channel> <title>Gamedot.</title> <description>The latest news, reviews and features for all consoles, the PC and handhelds.</description> <link>http://www.gamedot.co.uk</link>'; $get_articles = "SELECT ArticleID, Headline, ArticlePreview, DATE_FORMAT(Date,'%a, %e %b %Y %T') as formatted_date FROM tblArticles ORDER BY Date DESC LIMIT 2"; $articles = mysql_query($get_articles) or die(mysql_error()); while ($article = mysql_fetch_array($articles)){ echo ' <item> <title>'.$article['Headline'].'</title> <description><![CDATA[ '.$article['Preview'].' ]]></description> <link>http://www.gamedot.co.uk/article.php?ArticleID='.$article['ArticleID'].'</link> <pubDate>'.$row['formatted_date'].' GMT</pubDate> </item>'; } echo '</channel> </rss>'; ?>
  21. You're fine as long as you double check to make sure it is just a number, and nothing more.
  22. Or, as long as your OS supports it (most do) echo count(glob("path/to/dir/*.*"));
  23. That last $i++ isn't needed for ($i = 1; $i <= $Outof; $i++) { echo '<input type="radio" name="Title1" value="'.$i.'" id="Title1_'.$i.'"/>'.$i; }
  24. Or using native PHP functions: <?php // Our string $string = '1234567890'; // show the string, plus line break echo $string.'<br>'; // Create an array element for every 2 characters, then implode it with a space. $withSpaces = implode(' ', str_split($string, 2)); // show the string with spaces, plus line break echo $withSpaces.'<br>'; // Create our reversed string $revString = strrev($string); // show the reversed string, plus line break echo $revString.'<br>'; // Create an array element for every 2 characters of our reversed string, then implode $withSpacesRev = implode(' ', str_split($revString,2)); // show the reversed string with spaces echo $withSpacesRev; ?> Outputs: Which, technically doesn't do exactly what you want. "12 34 56 78 90 will become 90 78 56 34 12" - did you mean reverse the order of the 'sets', or reverse all the numbers?
  25. http://www.webmasterworld.com/forum88/7299.htm
×
×
  • 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.