Jump to content
Larry Ullman's Book Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Edward

  1. 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. Whichever way you do it the job is done.


    I think im going to build my own little Edward's Cents formatting class using some of the idea's from Fowler's class, i want to keep this as simple as possible. I know i will recode the whole site later anyway. Just waiting for Yii 3 to come, hahaha


    Thanks Larry and Antonio... :wub:

  2. 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?

  3. 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.

  4. 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.

  5. 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 they can do something about it.


    And i think for my website i will do https for all pages i mean come on its 2014 now, we should have the technology good enough to handle this kind of thing by now. We even have alien technology now in this world.

  6. Larry,


    Thanks for the reply. I am learning C# because it's easier than C++, and C++ today is losing its ground in the IT industry. Also I will focus on C#, coz it's actually a modern version of Java.


    What I'd do with C# is mainly two things:

    1. Since I have being learning PHP(your book), JS(your book), CSS & HTML, I can later also use ASP.NET to create websites. And many concepts and skills that I learned from PHP suite will also serve ASP.NET;

    2. I want to develop some mobile apps for iOS and Android, using C# Mono, because I am interested in mobile development too.

    3. Because I love playing video games, in the future I might take a look at the game engine Unity 3d, which use C# or JS to develop.


    Just feel that JS is becoming increasingly powerful, not a web font-end language anymore, but a general purpose script language.


    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.

  7. 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...



  8. 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(), does not interpret the string as HTML. Consider the following HTML:"


    I just had a go at trying to find stuff similar to your function in the jquery script but couldn't find anything http://code.jquery.com/jquery-2.0.2.js


    Thanks for your Help...

  9. 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.

  10. 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?

  11. <div id="social-networking" class="clearfix">
    				<ul class="nav social-icons clearfix">
    						<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 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 href="https://twitter.com/LarryUllman" class="fademe" target="_blank">
    							<img src="http://cloudfront.larryullman.com/wp-content/uploads/2012/08/twitter1.png" alt="">
    						<a href="http://www.linkedin.com/pub/larry-ullman/0/354/a32" class="fademe" target="_blank">
    							<img src="http://cloudfront.larryullman.com/wp-content/uploads/2012/08/linkedin1.png" alt="">
    						<a href="http://www.facebook.com/larry.ullman.5" class="fademe" target="_blank">
    							<img src="http://cloudfront.larryullman.com/wp-content/uploads/2012/08/facebook2.png" alt="">
    						<a href="https://plus.google.com/u/0/111123454294977208749/" class="fademe" target="_blank">
    							<img src="http://cloudfront.larryullman.com/wp-content/uploads/2012/08/google-plus2.png" alt="">
    						<a href="http://www.larryullman.com/contact/" class="fademe" target="_blank">
    							<img src="http://cloudfront.larryullman.com/wp-content/uploads/2012/08/email2.png" alt="">

    You could of just viewed the page source in the browser for this webpage and looked at the HTML to see how Larry done it. Don't forget your html list and list items.

    • Upvote 1
  12. 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() 
            	$this->date_created = new CDbExpression('NOW()');
            	$this->date_updated = new CDbExpression('NOW()');
    		return parent::beforeSave();

    Most of the times things work in Yii but there are the odd ocassions when they don't. But regardless of that I am very happy with it. If i am wrong about this and you know the way you can happily tell me how you did it below.

  13. 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!

  14. 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.

  • Create New...