Jump to content
Larry Ullman's Book Forums

Jaepee

Members
  • Posts

    76
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Jaepee

  1. Display is spelled incorrectly... document.getElementById('modal').style.disply
  2. Suprisingly I see all kinds of people using iPads, iPhones, and iMac laptops at Google. Although the Chief engineer of facilites has a Samsung Galaxy S3, He asked to see my iPhone 4s and he said he liked it better than the Android...lol. The buses pick up workers from all over the valley and bus them in to work. All have wifi and they can start work from inside the bus. It's amazing how spoiled those Googlers are!!! Everyone gets free food, 2 meals a day, all kinds of perks. I guess its an awesome gig if you want to write code for 75+ hrs a week. Check this link out they put a race car in their building http://blu.re/psHv
  3. I took it with my iPhone 4s using the panorama picture mode iOS 6. I work at Google as a part time contractor, I got to go up on the roof and the view was great.
  4. I just spent the last 16hrs @ google. But I did get a great picture from their roof.
  5. Update I added the following code to fix the problem with firefox , unfortunately have not found a remedy for safari window.onscroll = function(){ var pn = document.body.parentNode.scrollHeight; document.getElementById('modalMask').style.height = pn +'px'; }; maybe not the best way to do it, but it worked. I'll keep on trying for safari.. Running Mac OSX 10.7.5 FireFox Mac 15.0.1 Safari 5.1.7 jp
  6. Your right Hartley San I had an error in my css code for body: I had it set for auto changed it to 100% that seemed to have fixed the problem. Thank You jp
  7. Thank You HartleySan! You have pointed me in the right direction! Although I'm having another issue. When I run firebug to test alert(document.body.offsetHeight); It pops up at only 38 on my page. I don't know what the problem is but I'm investigating. Thanks jp
  8. Hi everybody! hope all is well. So I have made a modified modal window(using Larry's example) and it works great except on my iPad (kinda). The modal is a confirmation window and the mask background area is not covered completely. If a user scrolls up the background is exposed. Does anyone have a suggestion on how to remedy this. You can see a picture of what i am talking about below. http://blure.com/sharE/?b_id=10&img=VMpzXeAm9sc7.jpg Thank you everyone. Jp
  9. I might consider a non login version however I would need to make a more secure upload script (i.e. porn)... I really would not want objectionable material easily uploaded, to prevent this I am requiring valid email.
  10. Thanks Guys. Its still a work in progress. But is a website ever really done? I would venture to say, No. At least I'm finally doing something creative since I've had the domain for 13 years now... I guess I am not procrastinating any longer. One thing I am proud of is that I coded/integrated in the album script a Pin It button that users can Instantly Pin their pictures to pinterest.com J.P.
  11. Okay Well I have spent most of the summer coding actualy (since December) and learning how to code PHP. Along the way I have learned HTML, CSS, dabbling still in Javascript, jQuery, objective-C (want to program my Mac ) MySql and well thats about it. My project I figured I would share it now, it's http://blurE.com/ (itsblurry.com) Its a picture hosting application. It's almost usable and 100% hand coded using Textmate and the PHP I've learn from Larry's books. So I thought I'd share it. Suggestions are Welcome. http://blure.com/sha...FujS7VAobTy.jpg Here is a Picture I took East of Yosemite Nat'l Park I also have a url shortener http://blu.re/ which I would like to incorporate somehow to make picture sharing more url friendly than the above link.. Thanks Guys j.p.
  12. It appears that your two pages in IE9 and IE7 on the top are a different design than the lower two pictures (i.e. Geometry). I would check your source html / css code. I have spent hours trying to figure out a PHP error and all that was wrong was an equals = that I forgot to assign in my HTML J.P.
  13. Hi Edward I had a similar error message with a search script I made(e.g. clicking the back button). The following code fixed my problem. // call this before session_start(); // session_cache_limiter ('private, must-revalidate'); $cache_limiter = session_cache_limiter(); // session_cache_expire(60); // 60 minutes I beleive it keeps the form data from the headers stored in the server cache for 60 minutes. jp
  14. <input type="text" name="a" value= "<? $product_search; ?>" /> I beleive is incorrect. it should be use 'post' <input type="text" name="product_search" size="40" maxlength="60" /> Then $product_search = $_POST['product_search']; // you have to assign your GET or POST data to the variable that you are trying to match in the database... if (isset($_POST['product_search']) { $product_search = $_POST['product_search']; } I highly recommend that you read more than just the e-commerce section of the book. Doing so will enable you to fully understand the internal workings of php and the code that is above. cheers jp
  15. You could use the query $first_name = $_POST['first_name']; //don't forget mysqli_real_escape_string() function. $last_name = $_POST['last_name']; $q = "SELECT * FROM your_table WHERE first_name LIKE '%$first_name%' AND last_name LIKE '%$last_name%'";
  16. Thanks for the insight Larry. You are positively correct Its is an awesome library.
  17. Post your source code ... Por Favor. Could you have mistakenly called mysql_connect instead of mysqli_connect? or _fetch_array or any other function?
  18. Thank you very much Richard. I'm just starting out with OOP and writing classes along with functions.
  19. Hi all, I was wondering if class properties that are only assigned in a particular method belong only to that method. Like the getC() method and insert() method $r, $t, $q are unique to each method is that correct to assume? <?php // comment (doT) php // class Comments extends database { // picture comments class im new to this OOP thing protected $_picId; protected $_comments; function __construct($pic) { $this->_picId = $pic; $this->getC(); // returns all comments if there are any from database } // construct on instantiation get all comments protected function getC() { // gets comments from submitted picture id $this->_picId = $pic; // $pic picture id from _GET array $q = "SELECT comment_id, picture_id, DATE_FORMAT(comment_date, '%b %e %Y %r'), name_of_commentor, db, comment FROM db WHERE picture_id=$this->_picId"; $r = @mysqli_query($this->dbc, $q); $t = mysqli_num_rows($r); if ($t == 1) { $this->_comments = mysqli_fetch_array($r, MYSQLI_ASSOC); return $this->_comments; } else { return false; } } // end of getC function protected function insert($picture_id, $noc, $bid, $comment) { $p = mysqli_real_escape_string($this->dbc, $picture_id); $n = mysqli_real_escape_string($this->dbc, $noc); $b = mysqli_real_escape_string($this->dbc, $bid); $c = mysqli_real_escape_string($this->dbc, $comment); // this function inserts a comment of a picture in the database $q = "INSERT INTO db (picture_id, comment_date, name_of_commentor, db_id, comment) VALUES ('$p', NOW(), '$n', '$b', '$c')"; $r = @mysqli_query($this->dbc, $q); $t = mysqli_num_rows($r); if ($t == 1) { return true; } else { return false; } } } // end of Comments class Thanks all in advanced jAe pEe
  20. When you find your answer post your solution so we can see how you implemented the randomness !
  21. How about Math.floor(Math.random()*100000+1); That would give you a random number between 1 and 100k i believe... But if you are having a browser specific issue... I too by no means am an amature js programmer let alone expert...
  22. Very Nice Websites! Excellent design skills. I'll post my project when Completed...hopefully by fall.
  23. http://www.larryullman.com/books/php-and-mysql-for-dynamic-web-sites-visual-quickpro-guide-4th-edition/#downloads
  24. Hi everyone, hope all is well. First, I wanted to say thanks again to Larry for making his books and supporting them with this forum. Second, thanks to all the active forum members and all of their support, while I haven't been posting that much I do find myself coming to the forums quite often to read and learn as much as I can. I have learned leaps and bounds. I also try and help out other forum users when I can. I was looking at my phpinfo(); function and saw a class that appears to come with the php installation. It is called IMAGICK. I read on the php.net page about some of the methods that come with this class and started to code a simple image Rotation script and a Thumbnail generation script. My question, is it perfectly safe to use IMAGICK vs. Writing my own scripts to handle rotation and thumbnail generation. Does anyone have any suggestions on my code to make better? Here is a simple sample code that I wrote using some functions on the php.net page http://www.php.net/manual/en/class.imagick.php $image = new Imagick("/home/{$JAEPEE}/public/{$user_folder}/{$main_pic}"); // main image $thumb = new Imagick("/home/{$JAEPEE}/{$folder}/thumbs/{$thumb}"); // thb // this code rotates an image ... // $image->rotateImage(new ImagickPixel(), $degrees); // main 180 flip // 270 rotate left // rotate right // $thumb->rotateImage(new ImagickPixel(), $degrees); // thb// 180 -> flip// 270 -> rotates left // 90 -> rotates right // // thumbnail code ... //$image1->thumbnailImage(150,150,true); // creates thumbnail to size 150 //$image1->cropThumbnailImage(150,150); // crops and keeps aspect ratio // writes image to folder $m = $image->writeImage("/home/{$JAEPEE}/public/{$user_folder}/{$main_pic}"); $t = $image1->writeImage("/home/{$JAEPEE}/public/{$user_folder}/thumbs/{$thumb}"); // saves the thumbnail at the given destination if ($t && $m) { echo 'Image was rotated'; } else { echo 'No go on the rotate'; } The rotate feature works pretty darn good, and it's really fast too. Thanks Everyone jp
×
×
  • Create New...