Friday, June 11, 2010

A Side Note on Google, Chrome and Dreamhost

While I enjoy some of the perks of Google Chrome and thought it was going to be my dream browser, it is starting to show some cracks. It doesn't handle the Javascript rounded corners as nicely as Firefox and Safari. Of bigger concern is the problems I've had with Yahoo email when in Google Chrome. I thought it was Yahoo at first. But I am beginning to think Google has rigged Chrome to mess with Yahoo. Some days I can't access my Yahoo email at all, but if I switch to another browser everything is fine.
It'll be interesting to see how Chrome plays out and if it can fine tune some of it's imperfections.
Another interesting tidbit: I took a survey from Dreamhost and they asked me if I would leave stay with them if they were bought out by Google. Dreamhost selling out to Google would be a big drag. I have to say, I absolutely would consider a departure. Dreamhost has amazing service, a great product, and incredible support. I can't imagine any of that would survive a buyout.

Thursday, June 10, 2010

A11: Rich Text Editor and Upload

I installed the RTE in class and pasted the code in at home. That didn't take very long. We also did the upload element in class. I just had a typo to fix. I ran a test and it works. It took me a few minutes to understand that the numbers associated with the RTE were actually table IDs and needed to be unique. I am now troubleshooting a few different issues:
1) I would like the RTE to actually edit text that exists rather than just add to the existing text. I don't know if this can be done without going into mysql and putting each paragraph in the table.
2) I would like not have a separate editor for each paragraph, but have one editor to edit the text of a page. If I do plug the text for each page into mysql, can I include HTML in the table to take care of paragraphs and the like?
3) Still trying to figure out how to assign different user permissions for table access in the admin area. Can't figure out the magic.
Hopefully can work them out!

Saturday, June 5, 2010

A10 and Thumbnails

Chapter 6, homework 10, the extra credit thumbnail piece, and Test 7 took about 4-5 hours. I also did some reformatting of the upload form, admin page, and the 3 separate lists for the menu boxes. The homework went well and was very clear. All of my questions are outside of the scope of the assignment and I sent in an email.
I'm looking forward to taking it to the next level.

Friday, June 4, 2010

A8 and A9

Assignment 8 - Paging. It didn't take very long to complete. Maybe 15 minutes after fiddling around with number of pages I wanted.
Assignment 9 - Admin Page. I completed this assignment in class. It was relatively straight forward, though I don't understand how to change Table access permissions for separate users with nmEdit. I do understand that I create separate versions of nmEdit for various levels of access, but not sure how I then associate those separate versions with the admin page so that when a lower level user logs in the lower level access version of nmEdit attaches.

Friday, May 21, 2010

Questions

1) Why doesn't it work to put the "require" statement in header_inc instead of in the config area of each page? I get an error that says get_header() is undefined.

2) Same question for $PageTitle.

3) Same question for $sql that is needed on every page (like a universal menu that appears on each page referencing database items).

4) How do I build my own "if" statements referencing data in the database? ie - if ['Genre'] == Short Story, then display ['Title']...where Genre and Title are database fields.

5) What statements, definitions, variables etc. are absolutely required to make a successful reference to the database? [I am thinking a neat list/diagram would make this much clearer]

5) Why is the $ dropped when referencing variables/properties defined within a class?

6) Is the difference between __construct() and the method just that the method is conditional and __construct() happens no matter what?

7) What is the difference between $selSQL and $SQL?

8) Can I delete the .TGZ file for A7 once it is unpacked?

9) There was mention of a trick that helps to not need an index file in every folder to prevent directory browsing - will this be discussed in class? (I think it is ht_access.)

10) How do I know when to use var, private, or public when defining a property within a class?(The Classes/Paging Lesson example for extending a class uses var, but when the parent was created private and public were used instead. While I understand that a public property is available outside of the class and private is not, I don't understand why var is used in the child.)

11) In the Class Classes/Paging Lesson example for extending a class the variable/property $is_price_negotiable is created but not defined and then passed through the method. Why couldn't the previously created $negotiable_price just be set to TRUE? Why is it necessary to create a new variable or property?

12) If the property is created in the class and not defined, is it defined later or was it already defined somewhere else? How is it stored (ie-in the mysql database?)? Is the lesson automobile example envisioning a form that the enduser fills out or are there dropdown menus with values for these properties? What is the context of the automobile example and what might the interface and output look like?

13) Should every class be defined in separate _inc.php document like Pager_inc.php? Would you ever define in config?

Monday, May 17, 2010

Homework 7 and Lessons

Travelling through a wrench into my week. Having the ability to view lessons online was very helpful. I uploaded the assignment 7 sql file through phpMinAdmin and updated the require statements in the list and view files, but still have to customize it for my site. My client hasn't sent me his files so I may need to make fake files for the assignment.
Listening to the 5/12 lesson, reading the lesson documentation, starting the homework, and completing the test was all done on the 5hr 20min flight from NJ...minus take off/landing and snack break.

Sunday, May 16, 2010

PHP Documentor (extra credit)

I added PHP Documentor. This doesn't seem like a good thing to load in the root, but maybe I'm wrong? The "files" option reveals the physical path for the config. This seems like a major problem to me, unless the there is a way to conceal it. Also, why would I want to parse my inc files located outside of the root? They contain all of the information we've been trying to protect. This seems like a major security risk.
Would love some feedback on this. I didn't parse my inc file outside the root for the reason above.
Adding PHPDocumentor took me about an hour to do. I was confused about adding the .ini file. Not sure I understand it's purpose, but I created and it's in the user file.

Homework 6 (continued)

Homework 6 was successfully loaded to Zephir. Now working on loading it on Dreamhost. Questions:
1) Do I set up I actually enter the username and password for the if() switch and admin/delete/insert/update/select?
2) If yes, are the usernames and passwords all the same as the mysql usernames and passwords?
3) Should I go ahead with a prefix? The lecture indicated that it makes things complicated in the string, but it also makes it more secure.
4) What are the crazy characters in the functions in Common? Do I change these?
5) Do I do anything with Common at this point?

Everything is successfully running on Dreamhost. Looks good. All permissions set up correctly. After reviewing the lessons from this week the purpose of each file is much clearer. Hopefully, the documentor loads smoothly.

Correcting homework 6 didn't take very long. I mainly needed to fix my permissions and adjust my file paths for files existing outside of the root. Maybe an hour.

Sunday, May 9, 2010

Homework 6

This was the most challenging assignment yet. I wasn't able to get it successfully running on Dreamhost. So I ended up putting it on Zephir. Once on Zephir, I couldn't get it to incorporate the css. I tried using the "get_html" method as well as the standard style tag with URL@. I put the CSS in a number of different folders and it still doesn't work. I have tried entering the path absolutely and relatively and it still doesn't work. Everything else still seems to be working, but I don't feel great about. I feel like the assignment was very confusing and I felt unclear about what I was even doing. More than anything I just feel like my code is now a big mess with a lot of foreign stuff I dumped into it and I don't really understand a lot of it.
I think my big issue with making this assignment work in Dreamhost was that I don't understand how to refer to files that are stored outside of the root, like header_inc and footer_inc. While I see how this is done with Zephir I wasn't successfull in translating to Dreamhost.
I'm going to listen to the lecture again and re-read the lesson, but I think I really need help with this. I re-did the assignment several times and feel a little lost.

Wednesday, May 5, 2010

Homework 5

Completed this assignment in class - installing phpMinAdmin. I installed on both Zephir and Dreamhost. Both work. Yippee! The Dreamhost installation took about 2 seconds (simply uploaded to the root). Uploading to Zephir was pretty easy, with the corresponding how-to.

Sunday, May 2, 2010

Lessons & Homework Week 4

This week we dove into UNIX and MySQL. Accessing Terminal on the Mac was very easy. I had some short correspondence with Dreamhost to make sure I configured access to the command line appropriately. It all went swimmingly. I will definitely need to keep a glossary of commands for MySQL and utilize online resources. There is no way I will remember all of them, but repetition will help.
The lessons and book reading took about 2-3 hours to complete this week. The homework was started in class. It took me an additional 1.5 hours to complete because I decided to fiddle around with the CSS and nix the table the form was set into. I was having a very difficult time centering the reCaptcha iframe. It wouldn't respond to margin:0 auto; or text-align center. I was finally able to center by setting specific right and left margins. I am sure there is a better way. I didn't want to mess anything up in recaptchalib.php so I stopped playing once I got it to look ok.
The only other issue I encountered is that my template.php guts included a background image in the CSS that I didn't know how to undo for other pages in the site. So I took the image out of the CSS and put the image tag in the template.php file so it wouldn't appear in contact.php.
I dig reCaptcha and eager to add it to my own website. Hopefully will get that done tonight along with applying the php for changing title tags and highlighting the active navigation that was taught in the reading from the book. I was wondering how that was done and excited that it was included in the reading.

Friday, April 23, 2010

#3

Assignment #3 successfully completed! I think because my job requires that I spend so much time with Excel logic and that I have spent so much time trying to resolve IE CSS bugs, this assignment was (gasp!) fun for me. I kinda enjoy fixing things. It went well. I used the combination of PHP bugs and Firefox Error Console to resolve most issues. The only thing that really held me back was that prior to Wednesday's class I didn't know you could start a PHP tag before "html" and close it after. So I initially thought I had to delete the (seemingly) incomplete tags. I also didn't realize that html opening and closing tags could span across multiple php commands, like the use of "h2" in the assignment. I spent less than an hour on this one. Maybe 30 minutes? I did most of it at the end of class on Monday.
I think I might love PHP.

Wednesday, April 21, 2010

Lessons 5 and 6

Lesson 5 was pretty straightforward. My only question/confusion is what the necessity of global keywords is. From the example in the lesson it looks like the keywords are just there to say "these are constants and not variables." They aren't being defined, just listed. Do the keywords just serve as indicators that those variables are actually constants and not variables limited to the context of that function? Can keywords be used outside of functions?

I appreciated the Lesson 6 Form video tutorial. Very nice and very helpful. Definitely digging all of the resources in this class. While the amount of information can be overwhelming, I don't feel lost and there are a lot of options for getting answers.

My only question on Lesson 6 is regarding the last sentence of the POST vs. GET section. Confusion in green text:
"The method attribute identifies one of two ways the data can be sent along with the web page, either via "POST", or "GET" Neither of these is not part of PHP, but of the HTTP Protocol."
I think I am just confused by the double negative (neither/not). I assume what is being said here is that POST and GET are not part of PHP, rather, they are HTTP.

Could use a little more info on unset(), which was used in the two form examples at the end of Lesson 6, but maybe it is covered in Lesson 7.

Started reading around 10am this morning. Spent some time with the links, videos and examples. Started the homework in class on Monday. Spent about 30 minutes on it. Just a little further to go.

Saturday, April 17, 2010

#2 Complete

Site template busted apart and loaded. The actual work probably took less than 30 minutes. I spent a bunch of time messing around with how I wanted to organize my files and ended up wasting a little bit of time renaming .css and .js file paths and reloading to server, etc.
Unclear from the documentation and class discussion as to whether I need to put "_inc" in each file name.
I think I will get PHP set up on the Mac (locally) so I don't have to bounce back and forth with the server. Will definitely save time.

#2 (cont'd)

Saturday: Finished reading lesson 4 and the book (about 40 min.). Decided to play around with stock photo (artist included the AI file!). Now getting ready to bust it apart...

Wednesday, April 14, 2010

#2

I started assignment #2 last night. I prefer to create my own templates as I am very comfortable with HTML and CSS. Undoing someone else's code to customize takes twice as long as doing it myself. Plus you could inherit their errors and inefficiencies. I spent about an hour on the layout and kept it simple. Having fun and looking forward to how this unfolds.

Lessons & Other Thoughts

Everything is relatively straightforward so far with the lessons and reading. I have to get used to the php.net format. I find it a little cryptic and not so clear for the beginner. Some of the pages I couldn't make any sense of despite numerous readings. The class textbook, however, lays information out simply and in a manner easy to follow. Php.net seems like it should be helpful, so I'm optimistic that it eventually will not look like Greek.

After reading Lessons 1-3 and chapter 1-2 of the book, I do have a few questions about choosing .php vs .aspx. If based on what the client uses, is this specifically for large clients that will be self-hosting on their own servers and clients that will somehow be integrating their website with their intranet? Most of my clients are small businesses that are solo practitioners, artists, photographers, writers, or small firms that don't have servers and the type of operating system they use may vary. Does it matter what operating system a small client is using? Isn't the primary concern what type of servers the host has? I get the sense that it is only with large corporate clients with in-house servers and lots of integration that this is really a concern. Would be good to have small client/big client scenarios (to the extent they differ) in class discussion and lesson readings.

Monday, April 5, 2010

#1

So far so good. It's been 5 minutes and the blog is up and running. Next stop: Project Plan. Seems like the hardest part will be figuring out how to log in on the class site.