By sparkguitar05 on
I've been using Drupal for about 6 months and so far it's given me all the tools I need to make websites. But now I want to create a site that goes beyond what any current contributed module can do. I want to create my own module, but I don't have any knowledge of PHP. Can someone please point me to a good tutorial for learning PHP. I don't mind spending money on a good book that will teach me what I need to know. Thanks in advance!
Comments
Go through www.w3schools.com
Go through www.w3schools.com and www.php.net
www.w3schools.com is a great start
I agree www.w3schools.com is a great start. Tons of visual examples that are easy to understand, and a few quizzes to help with terminology.
I would recommend picking up
I would recommend picking up a book. Websites like php.net are excellent references but they can be overwhelming when trying to learn from them. Most of the popular publishers, such as O'Reilly, Apress, and Wrox have PHP books that will teach you at a moderate pace from the ground up.
What do I need to know?
I have a book from Apress, but it's 913 pages and I have a feeling it contains way more information than I need to know to create a pretty simple drupal module. The author says at the beginning that he wrote the book in a way that you can read certain chapters without reading the whole book. So which chapters do you think I should read?
Here is the list of chapters for the book. http://www.beginningphpandmysql.com/book/toc
Definitely chapters 1-3. :)
Definitely chapters 1-3.
:)
What else do you need to do?
http://www.trailheadinteractive.com
Here's what I want my site
Here's what I want my site to do:
When I create a node, I want the node to go into a queue. I want to be able to give some of the nodes dates (date module?). I want the home page node to change every day (at midnight). When it changes, it should randomly select a node out of the queue unless there is a node that corresponds to the current date. (For example, every day in December there will be a random node on the home page, but on Christmas it will display the node that has the date set as December 25.)
Which chapters in my PHP book (see above post) would I have to read to learn what I need to know? Also, if there are any tutorials on creating a module, links to those would also be great.
=-=
goto the documentation link on top of drupal.org
click on documentation
find the mdoule developers section
invest in the apress pro drupal development book
as far as what information in the PHP book you will need to know, this soley depends on the depth of knowlege you see. Use the book along with api.drupal.org. Not only do you need to know PHP but you need to understand how Drupal core works so that you can incorporate the proper techniques to use the resources of the API's in drupal and make your life easier.
so in its most simple terms
knowledge in langauge php helps you learn how drupal is written
learning drupal apis helps you write drupal modules
Knowing that you're focused
Knowing that you're focused on Drupal, I think you'll find chapters 4, 5, 12 and 24 useful because they're fairly generic. The other chapters are important stuff, but Drupal tends to wrap platform specific things in it's own (usually) simplified APIs. So I agree, you should pick up the apress Drupal Development book to get the Drupal specific bits. If you find that you're good at reading API documentation, api.drupal.org is a great resource. Not everyone learns that way thought...
http://www.trailheadinteractive.com
I have yet to come across a
I have yet to come across a good book or for that matter any solid documentation that explains the Drupal PHP way of doing things. I expected something in depth that explains from the ground up Drupal architecture principles, how the various software components are meant to come together, how new software comonents can can be created, and more. Obviously Drupal's "lego like" software architecture is unique and a lot of other projects can be built using the same principle, if only it would be explained properly - integrating both the PHP aspects and the software requirements together. A lot of software developers seem to be relying mostly on guess work.
=-=
api.drupal.org is a good resource if you've not stumbled on it yet. The core code itself is also very well documented.
My favorite starting point
My favorite starting point for learning just about anything technical related is the O'Reilly Headfirst Series.
Check out http://headfirstlabs.com/books/hfphp/
Although I bought it, I had already learned PHP from experience. I just like collecting those books. From what I read in it, it seems real good especially if you are a visual learner and like solid explanations with contingencies, like myself.
wow...a good book they should
wow...a good book
they should make more of this...
text only is boring it's so 20th century...
Ditto the recommendation for
Ditto the recommendation for this book. I was able to plow through it and begin working on a drupal site after 1 week. Its definitely a fast track to getting a beginners handle on php and mysql.
- Ryan
Check Your Library!
I was about to buy this book when I thought to check my local library. They have it available online in a database called Safari Books along with a lot of the other Head First Series.
Love the library...
It is a great starting book
I have that book at home somewhere! I'll have to read it again I do remember it being very easy to pick up the basics with.