Jump to content

jstern

Member
  • Posts

    93
  • Joined

  • Last visited

Everything posted by jstern

  1. Heres what I ended up doing; In my viewsetup.php i ended up adding the following line: if (DEV) { $this->_view->headMeta()->setName('ROBOTS', 'NOARCHIVE,NOINDEX,NOFOLLOW'); } DEV is defined in the bootstrap.php file as anything that resembles development servers. (EX. i use ***dev1.com locally so it would resolve DEV. Also have ***dev2.com dev3com, dev8.com etc on the webhost, so these would also resolve a DEV) So I'm sure you can see why i didn't want Search engines crawling around dev sites. Robots.txt would be a good a idea if I wasnt ever worried about someone committing over it if they upload or clear our that shared dev environment.
  2. sweet! will have to get used to clicking it there now!
  3. Loving the speed so far! But I miss the "Active Topics" link that used to be in the top right bread crumb. I can still view 'unread posts', but the "View Active Topics" link is gone now.
  4. I am a huge supporter of XDebug and find it works very very well. I like to use Netbeans IDE for my development, but XDebug doesn't play all that well with it yet. When im in Debugging mode, i switch to Eclipse IDE. Very easy setup with XDebug and i can step through code and do unit tests ect very easily. When doing simple dumps to screen - Zend_Debug::dump($var); works well for my purposes. Gives me a lot more information than a var_dump. Of course you'd need to be in the Zend Framework (im sure) for this one.
  5. I haven't tested any of this to ensure it works properly. And normally I wouldn't be throwing echo's to the screen like this, but like I said, I am used to Zend Framework where I can utilize the views a little differently, but this might be what your looking for, at least the barebones. <?php //php form data to email code// if (!isset($_REQUEST['first_name'] && $_REQUEST['last_name'] && $_REQUEST['email'] && $_REQUEST['phone'] && $_REQUEST['radio'] && $_REQUEST['message'])) { $errormessage = 'Please fill in the required fields'; echo $errormessage; } else { $first_name = $_REQUEST['first_name']; $last_name = $_REQUEST['last_name']; $email = $_REQUEST['email']; $phone = $_REQUEST['phone']; $radio = $_REQUEST['radio']; $message = $_REQUEST['message']; $headers = "From: $email"; $email_message = "First Name: {$first_name}\n\rLast Name: {$last_name}\n\rEmail: {$email}\n\rPhone: {$phone}\n\rInterested In: {$radio}\n\rMessage: {$message}"; mail('dgow@simplewebs13.com',$radio,$email_message,$headers); echo "Successfully submitted!"; ?>
  6. $email = $rodrigo->get_email(); $email now contains his email address just echo it out. <a href=website.com/index.php?content=contact&email=<?php echo $email; ?>>Contact</a>
  7. well you still need to echo out the $errormessage to the screen, or the confirmation, depending on if the fields were submitted successfully or not.
  8. in the php file where your declaring the values. if (!isset($_REQUEST['first_name'] && $_REQUEST['last_name'] && $_REQUEST['email'] && $_REQUEST['phone'] && $_REQUEST['radio'] && $_REQUEST['message'])) { $errormessage = 'some generic message here about not filling all required fields'; // you can check them all separately instead for a unique error message depending on which one wasn't filled in. } else { $first_name = $_REQUEST['first_name']; $last_name = $_REQUEST['last_name']; $email = $_REQUEST['email']; $phone = $_REQUEST['phone']; $radio = $_REQUEST['radio']; $message = $_REQUEST['message']; .... }
  9. theres a few ways to go about something like this. I'd probably use something along the lines of if (!isset($_REQUEST['first_name'])) { $errormessage = "Please fill in the name field"; } else { $first_name = $_REQUEST['first_name']; .... you could elaborate on the if statement to include the required fields by using '&&' (ex. (!isset($_REQUEST['first_name'])) && (!isset($_REQUEST['last_name'])) && ect.. , and echo out the customer error message(s) depending on what wasn't filled in. Using the '!isset' method is like saying "if (is not set) then do this or else this". I find its best to treat things as guilty before proved innocent in php. There's a much easier way to do this in the Zend Framework / Zend Forms, and that is what I am more accustomed to nowadays, so someone else might have a better way than what I have said.
  10. jstern

    styling for print

    What I've done with jprint in the past in a similar situation, was created a hidden div in format you want the printed area to be printed. - Make your page look how it's supposed to to the person visiting. - Make a hidden div below all your content, but in the format (columns style) you need printed in. Noone will ever see the hidden divs (unless they inspect the page i suppose, but that's not a big deal).
  11. jstern

    styling for print

    if your familiar with jquery at all, there a program called jprint that works really well. you can tell it to print everything in certain <div> tags.
  12. jstern

    Wordpress

    Can wordpress be used with something like zencart? or does it have something else already available? I will soon be starting a project that will need a simple shopping cart and I'm looking for ideas. I'd like something better than coding everything from almost scratch.
  13. jstern

    Wordpress

    i've never used wordpress myself, but my understanding is, it is used to create blog type websites
  14. im not sure how .htaccess would help. We use our dev servers so we can keep our projects 'live' and the boss man can take a look at projects as progress. I suppose we could keep move them to an internal server but thats another task altogether at the moment, and we've previously purchased domainnames for them. I think what i've decided to do was add the specific metatags during one of the site setup controllers. (Another reason i love Zend!) If (DEV) NOINDEX NOFOLLOW kinda idea. Either that or add to the dev sites robots.txt file. I think something like: User-agent: * Disallow: /* If i do the robots method, i run the risk of the guys overriding the file when committing a new branch to the dev servers. This way would probably quicker and easier if anyone else had this problem with no risk of override. (Anyone know a way to protect the robots.txt file? All our developers have root access.)
  15. I have a few development sites online that I dont want searched / crawled by search engines. (which they are unfortunately) Does anyone understand how to use the rel=nofollow (or noread??) tags well?
  16. Just for others to reference, i have this website bookmarked for what browsers support what CSS. Its generally the same thing Falken posted but maybe useful for someone also. I'm going to be bookmarking Falkens as well now.
  17. I like using SQL Database to store my 'blocked' or banned IP addresses and use my front controller to access that right off the bat. I can give them a nasty lil message too!
  18. From all the hosts Ive ever been to 1 & 1 is my favorite so far.
  19. it looks pretty malicious to me. it also looks like it will rename itself, or its directory periodically. Not sure what it does though. Possibly a attack (brute force) script? The fact that is trying to open / read to your .htaccess file ($fht = fopen("$tname/.htaccess", "w+") tells me you should get rid of it as well.
  20. lol a lot of the time it may as well mean duct tape.
  21. yessum if (is_string($value)) { $value = (str_replace(",","",$value)); $this->_value = round($value, 2); } seems to be the fix i needed. I dont know why i was looking for something easier than this, this was pretty dang simple lol. (*is_string is only important due to various types being passed through my method.)
  22. Hopefully a quick Q I have a string with the value "4,120.00" I'd like to convert this to a int or a float. (Im hoping without having to strip the string of its comma myself) the value is set using: $this->_value = round($value, 2); when I use $this->_value = ((float)$value); it just returns "4" (becuase of the comma). Same thing with (int). Anyone know a quick solution?
  23. Thats awesome. I hope no-one at work is calling em Jimmy though
  24. jstern

    Rush

    Meatloaf > *
  25. jstern

    Rush

    good call with H.I.M !
×
×
  • Create New...