Jump to content
Larry Ullman's Book Forums

Edward

Members
  • Content Count

    1115
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by Edward

  1. I love tenary operators they are something that seems to pop up every time i code. But there is a hitch, i don't think you can do nested tenary operators? I had a situation once when it would of been useful to do that.
  2. Thanks for your comments ill take a look into that. Larry's new book contains cents now, it seems we are all learning new things every day. Just a shame i didn't know that a year ago, well this the fun of sharing on this forum. This place can really get me confused sometimes, just like today. Just had a read of Effortless E-Commerce V2, Larry done the formatting in SQL if the price needed to be directly brought the page. He didn't have any classes but used the php format function to convert the value if it was price if it was brought in as an integer to PHP then needed formatting. Whicheve
  3. Save everthing as integers in the database, can you confirm that? I have more than 100 php script files to change now for this affect to take place. Is this what Stripe are doing? I wonder if ebay do that? Antonio i will write a lovely cents formatting helper class with some public static methods. May be i will name the class Cents.
  4. If you are using cents to work out the monetary terms should we save the database values like shipping costs, product prices and charges as decimals. Because if i am just pulling and displaying data from the database it would be easier rather than saving everything in cents. And if i need to use cents just change the decimal values into cents while running the php scripts for calculations? Actually do Stripe save their database values in decimals or cents that may help to answer the question?
  5. I was thinking of doing that but never bothered, if you check Joomla or other programs they just use one table for the users it easier that way. I guess if you wanted to be even safer you could have admin login from another type of software that was not php connected directly to the MySQL. I do worry that having a website that you can log into admin functionality online could be dangerous.
  6. That's very interesting to hear. The grid columns md-col-12 in V3 are very useful you can scale them down to single units md-col-1, that's what i like about it. It took me about 1 week to strip out most of Yii Booster from my project but ive still got some pages to do yet.
  7. Good Morning Jonathon, i have a question for you, did you land up going for the Boostrap V2 or did you use V3. I started out with V2 but i then decided to use V3 because the grids were improved and there were different size of text boxes which come in useful. The only problem i think it has is the buttons just really look terrible i thought the flat may work and i have given them a chance but they just make my site look so dry and boring. I think the whole situation leaves me with no choice but to import the old buttons. I am also considering writing a complaint to the boostrap team to see if
  8. I am using C# too for andriod development with MonoDevelop but i do have the option of using Java as well. But i do prefer the syntax of C# its generally easier to follow. I don't know which is better though never really done enough coding in either.
  9. I guess the reason i couldn't find your code in JQuery because it must be a part of .createTextNode() as mentioned in the JQuery .text() method.
  10. Edward

    Forum Back Up

    Really happy to see the forum is back up, OMG my fingers have been really itching to type something, haha. I have learned practically all my basic PHP and JavaScript from your books Larry, and if this forum was to disappear i would seriously feel like a part of me died inside. Glad too this forum is back open... Edward.
  11. I really like your answer, however i realize now i have gotten myself into a muddle. I have a server PHP function that retrieves members questions specific to there ID. It did occur to me that i would need to use something along the lines of your function. However now i realize i don't need it as the JQuery .text() method will already do this for me. $('#question').text(data); // http://api.jquery.com/text/ "We need to be aware that this method escapes the string provided as necessary so that it will render correctly in HTML. To do so, it calls the DOM method .createTextNode(), doe
  12. What is the best way to do a HtmlSpecialChars in Javascript? I am looking for a clean solution just like that php function equivalent.
  13. Edward

    Happy New Year

    Happy new year to you too.
  14. Let me know when you get your project done.
  15. Edward

    Happy New Year

    I just want to say happy new year. There is not much social talk on here but happy new year to you guys.
  16. C# seems to be a combination of Boreland C, JavaScript JavaScript(Web) as there is object chaining in it. I really like it. Actually Unity3d was built for the Mac but when you finish your game or animation or what ever you are using it for you can compile your code for Web Player, PC, iOS, Andriod, XBox or PS3. I don't actually work on Windows i work on Mac but C# sharp was the primary language used for development. Yeah for games C# is great.
  17. I am using C# now in Unity3d quite extensively now Unity3d also allows you to use Boo or Javascript. The C# syntax is very similar to PHP, its easy to understand what you are doing without really learning anything if you know PHP OOP well.
  18. Well there is still the possibly that i am wrong but i did test it and that was what i found. You can try testing this for yourself on your Yii Example Projects coming up on the Yii Book and see if you get the same results. May be its because i was on a local server however that seems to be unlikely. Oh i have an amazing picture to show you soon. By the way i saw you have many google plus accounts and was not sure which was yours as i wanted to add you to my circle, so what is happening there exactly?
  19. <div id="social-networking" class="clearfix"> <ul class="nav social-icons clearfix"> <li> <a href="http://www.larryullman.com/newsletter/" class="fademe" target="_blank"> <img src="http://cloudfront.larryullman.com/wp-content/uploads/2012/09/newsletter-button2.png" alt=""> </a> </li> <li> <a href="http://feeds.feedburner.com/larryullman/bMsj" class="fademe" target="_blank"> <img src="http://cloudfront.larryullman.com/wp-content/uploads/2012/08/rss1.png" alt=""> </a> &
  20. I just wanted to make a note here on my findings, i tested this in my active record: array('date_updated', 'default', 'value'=>new CDbExpression('NOW()'), 'on'=>'update'), This only worked for the first update of the record but if i updated the recorded once again it failed to work. The only way i could get a record update time to update succesfully every time was by doing this simple trick. public function beforeSave() { if($this->isNewRecord) { $this->date_created = new CDbExpression('NOW()'); } else { $this->date_updated = new
  21. Well i hope it will work out well for you, its an interesting idea to follow up on. I am building a basic marketplace for regular goods of any kind, may be i could add a category for virtual products so you can link your website. Once i get it build i will see what the options are. Have a merry christmas Jonathon!
  22. That's a good idea, are you a marketplace for different virtual products or selling your own individual bunch of virtual products? This will be my last question. By the way, i removed the yii-booster extension from my site and added Bootstrap 3 instead because generally it was more useful than the old one, the sizeable input were good for me and saved me doing separate css. But those flat buttons they just make the website look terrible, beveled were really the best. Im going to definitly need to add some new color styles for those buttons or possibly get the beveled one back in.
  23. I forgot to ask what type of things are you selling on your website?
  24. Okay cool, well good luck with it!
×
×
  • Create New...