Jump to content
Larry Ullman's Book Forums

Edward

Members
  • Content Count

    1115
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by Edward

  1. Edward

    My Project Diary

    My php is much better now, i hae had to rewrite parts of my project as my coding got better. The thing is when you improve things change the way you think and the way you structure things. So its quite hard because you have to go back and fix things. I am using model classes much better now, i have many many for each modell. This helps to cut down the code and help me organize things much more. So programming is really difficult especially on a big website, when you get better you have to keep fixing things so the process takes longer and longer the bigger the website gets. I think the main pr
  2. Edward

    My Project Diary

    Still working on this.
  3. This is a good forum. I have learned a lot here. Especially with my object orientated codeNibcan develop a good website after learning from from you? Because I know better object orientated code. This helps as its more advanced as to the general code that is written
  4. It's good you signed up with Larry Ullman he is a good web developer. You you will get a lot of knowledge from him he has many years.experience in web design.
  5. I got the search up and running now. It took me a while to get it integrated into my website. But it was worth it this search engine is much better than the original search. Lucene worked out really good it has some advanced search features rather than the basic Myisam databases. So after a bit of extra work I got it figured out.
  6. Edward

    My Project Diary

    Still working on this.
  7. That's why i love you Larry, i just created the a .bash_profile file in my home directory added the line you suggested export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home" and then everything works. Amazing. Thanks for your help, christmas is coming soon.
  8. When i run java -version from terminal, it comes with: java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode) Java 1.6 is unsupported by ElasticSearch, i have installed Java platform 1.8, product 1.8.0_25 with path /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java I am not sure what i have to do to change the Java being used. I don't know anything much about terminal. I have found this other thread that can help but when i tried this elastic search still giv
  9. I installed Java version 8 it shows the java icon in System Preferences on my iMac. When i try to run ElasticSearch from terminal i get this message coming up: Edwards-iMac:~ EDWARD$ /Users/EDWARD/Desktop/Elastic\ Search/elasticsearch-1.4.0/bin/elasticsearch ; exit; Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/Elasticsearch : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
  10. Thanks for the link, i came across this one before actually from StackOverFlow while running a search. Thanks for your help. Edward,
  11. Thanks for the fast response. I need such a request for such a page like eBay has for example http://www.ebay.com/sch/i.html?_from=R40&_trksid=p4712.m570.l1313.TR0.TRC0.H0.Xlarry+ullman&_nkw=larry+ullman&_sacat=0 This is their listings page. If i know where a user is from by either locating their country or using their signed in account info, i could add data to item listings specific to them for example if the seller offered international shipping or had free shipping available. There also has to be a buffer just incase i can't find their location and then I could just
  12. If a user is surfing your website, how is the best way to get a users two letter country code e.g "US" if we don't know where they are located? I found the following options so far: http://php.net/manual/en/book.geoip.php http://ipinfo.io/developers https://developers.google.com/maps/documentation/geocoding/ My website will require numerous API requests for this info so i am looking for a sensible solution. Edward.
  13. I love the new book its well written. I found that if you have a website with buyers and sellers and not just an individual seller the carts database is not suffice. I think that in this case it would be best to create a cart and a cart_content database like this to make it easier to sort out members shopping carts with some simple relational queiries as apposed to some PHP logic. CREATE TABLE cart ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, buyer_id INT UNSIGNED NOT NULL, seller_id INT UNSIGNED NOT NULL, date_created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, date_updated DATETIME DEFAU
  14. I was thinking about this as well you could just put user/member/username So loading up by there username instead of their id, i guess this only applies if your members have a username though.
  15. The problem happened because i used an echo in my controller like this: if(ItemShippingInternational::model()->isInternationalShippingAvailable($modelItem->itemItemShippingInternational)) { echo 'International Shipping is available!'; } $modelItem = new Item('scenerio-name'); $this->performAjaxValidation($modelItem); if(isset($_POST['Item'])) I think i spent about 6 hours on this, thanks to the person above that clicked the switch and got me out of this mess.
  16. Its okay got it working i stripped down my controller. So now i know its something in my code around it that is causing the problem. Edward is still not too old yet and his detective work is still up to scratch after his many years in those old spooky mansions in "Alone in the Dark". Hope all is well for you Larry, Christmas is coming soon, its coding all the way till then.......
  17. I have discovered that Yii will not run custom validators when I have enableAjaxValidation enabled. I have tired everything, setting validators to safe using scenerios etc, nothing works. When i submit my form without ajax and JS Client Options disabled the validator works. Did anyone else suffer from this problem, or know how to fix it?
  18. Yeah i understand where you are coming from everything has its time before its time to move on, we get busy with other stuff, daily lives etc. You have done an amazing job in answering all those posts, its really not easy trying to understand exactly what someone else is talking about when they make a post, but for you it seemed very natural at it. Regarding the Uploadifive i did pay the $5 and downloaded it but after taking a further look at it i decided to stick with SWFUpload for now. You see i have already implemented SWF for user image upload and item listing images. I think figuring
  19. Nah, array('date_updated','default','value'=>new CDbExpression('NOW()'),'on'=>'update'), This only works when you do the first update, but if you are to update a record again it will not work. So you are better of with: public function beforeSave() { if($this->isNewRecord) { $this->date_created = new CDbExpression('NOW()'); } else { $this->date_updated = new CDbExpression('NOW()'); } return parent::beforeSave(); } You could convert that to a tenary operator if you don't have other stuff you have to deal with. Just
  20. Seriously sometimes i think i have a bad spirit going through my iMac, i mean one minute the code works then the next minute it doesn't, then it does again. I can't find any logical explanation for such errors. I am working a problem since yesterday i spent nearly 5 hours now and i am getting random results which is making it hard to pinpoint an exact error location.
  21. Funny stuff this! Today i can get the date_updated to update with array('date_updated','default','value'=>new CDbExpression('NOW()'),'on'=>'update'), God knows what i was doing before!!
  22. Well its too late now, i paid for it today and i am going to start building it into my site. It should be easy to implement as the js handers are almost identical to that of swfupload. HTML 5 file uploaders here we come. Larry remember my item create page code i done a year ago it was about 300 lines plus in the controller, now its only about 20 lines. I pulled the whole load of code into separate model functions i even recreated the save functions. I think every time i look back i code i can always improve it in some way, its never perfect but to be honest i don't care anymore so long as
  23. Yeah there is no one like him really is there.
  24. Keep up the good work Jonathon.
×
×
  • Create New...