Jump to content
Larry Ullman's Book Forums

Edward

Members
  • Posts

    1115
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by Edward

  1. Edward

    My Project Diary

    Today i have shortened the length of my activation codes to be a string of 10 alphanumerical characters, it seemed a waste of database space to hold a md5 32 characters string, so i used the PHP substr function to cut they md5 generated string to 10. This makes the verification email look a tad better. Another thing i done that i forget to mention was i moved the login form which was part of the site controller over to the user controller, so now to login, you access through user/login. I think this is the way to go, keeping the login related to user. The other advantage was i scrapped the LoginForm model and moved over the methods required into the user model.
  2. I tried to use the Verify route from the book. 'verify/<x:\w+>/<y:\w+>' => 'user/verify', i added a verify action to my user controller, public function actionVerify($x, $y) { } i will be passing an email and activation code to it. http://localhost/myyiisite/verify/email%40gmail.com/1d2860f7df however when i tested it i receive this message: Error 404Unable to resolve the request "verify/email@gmail.com/1d2860f7df". Does anyone know what i am doing wrong?
  3. Larry Sorry about my bitching the other day, i just needed to cool down and get some patience, that always seems to work. All is going well so far. I just wanted to ask if possible, you may already be doing this but in the Javascript chapter for Yii, would it be possible to have a how to's for adding say dynamic text boxes, say we have an item and we need to add in an Attibute and a Value, this could be for example condition, new. But for attibutes and value text boxes a customer may require 0 to as many as they need. The other things that would be useful is for username using javascript and ajax if they username was taken or not. I know we can already set this with the unique attribute in the model but what if we wanted to customize our message more rather than using the standard error message. Another thing say we had to load in our product images up to 10 for example, how can we upload but then show the recent uploaded picture to the page, then load up another one, then possibly delete one. Anything that would help for the process of this would be helpful. I couldn't find any plugins online for this to do what i need so it looks like it needs to be a custom job. Would be grateful if you could add any info in the book to help out with these thanks.
  4. They didn't mention changing from Traditional to HTML5 in the Yii-Booster Setup documentation, i just changed it. I managed to get Captcha to work which is good so i will continue on with Yii Booster. It would be nice if you could explain in your chapter on Extensions of how to use and install the Yii Booster, and which css files would be safe to edit. The problem i see with making your own edits is that if they upgrade you would have to go back and edit all those parts again. So i guess adding your own rules to the bottom of the style sheet seems to be the best way and then its just a matter of copy and pasting them to the upgraded sheets. The widgets will slow down the loading process rather than hard coding in the css.
  5. I tried to remake my project using Yii-Booster, it all seemed okay but then i relize now that you can't use HTML5 with it and also captcha wouldn't work either. Seriously i am pissed off now, i spend three days coding stuff together to find out that now it doesn't work smoothly and there is no help online for fixing the problems. I seriously think that the way i started of just implementing the twitter boostrap framework and doing my own customizations was far better. So far all of the extensions i have used have sucked and have been more of a hinderence than a benefit. The only things that have been useful was changing some of the things you noted Larry in your chapters, ive done that and that all worked 100%.
  6. That's great, well i had a look at Booster in more detail and i don't see the need to use that either the Yii-Bootstrap, you get more flexibility with your own custom coding. There is also the factor that hard coded CSS will load faster than CSS which has to be interpreted by a widget, that could be costly on a site with many page views. I think the gold is in the Twitter Bootstrap not the silly extensions.
  7. An update i like Booster it is much easier to install and does not hinder the original structure of Yii. I will use that as i don't have to come back to manually edit the framework files css each time i do a Yii upgrade. Will you use Boilerplate too or just Yii-Booster?
  8. I am having trouble with Yii-Bootstrap the same as Jonathon pointed out above, i thought you were going to do that as it was in your contents. Seriously right now i have my hands in the air and am screaming literally, i bet Jonathon will be doing the same. I really believe that just customizing myself was better over using Yii-Bootstrap, after getting to know it a little more i really didn't like it. I guess i can take a look at Yii-Booster and see if it will work for me, it does look to be better. I'll try it now urgggghhhh!
  9. I got a small problem with bootstrap extension in for yii due to the fact that if you use their theme then the site view files are in the themes folder under bootstrap, which is very ugly. Every time i try to move the files i loose the bootstrap theme css. The thing that is interesting is when you use the bootstrap generator to generate CRUD in gii the files all go to their original place in the protected folder. So i hope Larry in your Extensions chapter that you will include some reference on how to install bootstrap and possibly bypass such problems.
  10. If one method is static I think they all have to be? Maybe you can't access it because of variable scope.
  11. I would change the database password variable type from Varbinary to Char, this generally works better. If you use Varbinary it needs to be 64. For Char if I recall correctly 64 characters also for sha256 just run the hash_mac in a print_f and then count the number of characters.
  12. Shouldn't you create an instance of the Photograph object with the "new" keyword. I don't see how that would work because those methods are not even static.
  13. Edward

    My Project Diary

    Working on changing my activation page to a verify method using Yii routes. I have also decided to have user create their username aswell as contact details on registration page, this cuts out the activation page later on in the website. If users do not verify there accounts within three months, there records will be deleted, and usernames they have orginally taken will be available for others.
  14. That would all be extremely helpful, it would be great seeing you involved with writing Yii documentation 2.
  15. Yeah there are still things i have to go back and edit, ive made a list but i struggle more with planning than coding. Planning takes more time than coding and i think due to it, since i haven't over coded i may use Yii 2. They are getting closer to the release check this out? https://github.com/yiisoft/yii2/wiki/Yii2-Development-Roadmap Looking forward to read your Authentication chapter Larry, i did setup the interface but i would like to know how it works more throughly so i can adjust my user databases. One thing that has struct me, it seems we have to have members and admin in the same user table as an enum type, as how can we implement two interfaces for separate admin and member table. It would be possible if there were two user interfaces that admin could have the same id as members, so i thought possibly one user table would be a better solution. And Larry will you really be doing Yii 2 updates in your book, i think what you have got is a lot of work already, what do you think? Since my planning takes long, i may just go for it in Yii 2 if they release it quickly, the only problem i can see with that is lack of documentation online as apposed to what we have now for Yii version 1.
  16. Aren't you missing the return statement in your afterSave method. Please ignore I made a mistake.
  17. Since the Yii book is taking time to come out, would it be worth doing the Effortless Ecommerce Coffee shop example or would it be better to wait for your ecommerce example in Yii and practice Yii for the time being?
  18. Use the PHP email filter extension FILTER_VALIDATE_EMAIL with filter_var function.
  19. Edward

    My Project Diary

    Removed login cookies from website and have set a session time out of 15 minutes. Have set encryption keys and moved restricted words array in to config/main.php param array. I have also implemented Yii Booster this is incredibly useful with some editional features provided by clevertech.biz.
  20. Edward

    My Project Diary

    Still working on my project have about 20 databases and 20 models. I struggled with yii at the beginning but now it's okay. Took me about 3 days to work it out. Well i thought i had worked it out until i read more of Larry's YiiBook and realized there was some things i done the PHP way rather than the Yii way so some edits were required. Seems as though i did manage to get about 75% of the main stuff learned by myself.
  21. Jonathon did you read my thread? Let me know if that was useful.? I also updated my project diary with the thread to help you.
×
×
  • Create New...