PHPBuilder.com: Highlighting What Section of a Website the User Is In
521899
PHPBuilder.com has a quick little article (an exceprt from "PHP 5 in Practice") that shows how, using a simple dynamic navigation system, highlight where the user currently is.   Although a site may not always warrant a full multilayer navigation menu, most websites usually have at least a few different sections. Often many pages have links back to the top pages of each section, and therefore it is useful to highlight which section the user is currently in. Listing 9.2.1 looks at the URL of the current web page and, based on that, determines what section of the website it is in and changes the section menu.   They provide the script and a brief explaination, but not much else. Seems like the snippet might make more sense with a little more context, but it's still useful.
541647
On Codewalkers.com today, there's a new tutorial posted concerning some of the looping features PHP has to offer.
595176
From Sonspring.com, there's a quick tutorial on a simple way to make "time-sensitive CSS" for your site.   Recently, there's been some discussion on the Godbit forum about how to serve dynamic, time sensitive CSS with PHP. I got to thinking, and the steps necessary to make this work are actually pretty easy. First off, let me say that most hardcore programmers will probably scoff at the simplicity of these examples. However, a hardcore programmer I am not, so basic tutorials are what I enjoy. Also, please know that this is not an exercise in JavaScript / Ajax. It is simply a way to provide unique CSS based on date and time.   They include examples of what the result of the code is for two different methods - the month-based CSS and the PHP + CSS Clock approaches. Their examples are just the sample uses of the code, but they also make each available for download. Check out all of the comments for even more tips!
473226
Damien Seguy has continued his series looking at PHP configurations around the web and is sharing the results in the form of two new reports over on Nexen.net.   I just published the second part of the serie about PHP configurations. This part focuses on three aspects of PHP: PHP extensions, PHP streams, and disabled functions.   You can find the statistics themselves here and the latest configuration statistics here. It's interesting to see the drop-off when it comes to the various modules that are installed ("php, ftp and http are the most common. Besides them, tough luck.") and to see the somewhat more gradual curve of which functions are disabled - with system() topping out the list (with good reason).
295577
Popular posts from PHPDeveloper.org for the past week:PHPBuilder.com: Fundamentals of PHP SuperglobalsGareth Heyes' Blog: Regular expression challengeAnyExample.com: Downloading files from Amazon S3Travis Swicegood's Blog: PHPT: A teaser...Nessa's Blog: Using PHP to Display Version Info (I and II)Laura Thomson's Blog: On Open Source: PHP Video PodcastSitePoint PHP Blog: Dynamic global functions in PHPJosh Sharp's Blog: Why you should be using a frameworkDerick Rethans' Blog: XDebug 2.0.1Tobias Schlitt's Blog: At IPC2k7: WebDAV will come over you...
445025
Popular posts from PHPDeveloper.org for the past week:Stijn Leenknegt's Blog: [PHP6] function-return-array idea!GeesNotNerds Blog: Free PHP + Ajax chat appStefan Mischook's Blog: Object Oriented PHP Tutorial Updated - Steps 18 - 22Dave Dash's Blog: SymfonyCampWebDigity.com: PHP geotargeting techniquesEtienne Kneuss' Blog: Late Static Bindings ExplainedDevShed: Handling Static Data with PHP 5PHP-Learn-It.com: Cooking Cookies with PHPMichael Kimsal's Blog: PHP PredictionJob Posting: Steinman Recruiting Seeks Senior Developer (Littleton, CO)
635920
Popular posts from PHPDeveloper.org for the past week:Padraic Brady's Blog: Complex Views w/Zend Framework - The Final Chapter: ZFE & Zend_Layout in Core!php|architect: Stuff your stockings: single issues 30% offDeveloperTutorials.com: How to Install PHP 5 on LinuxStoyan Stefanov's Blog: Fancy FormattingSymbianOne.com: Your S60 Web server gets a boostAndreas Gohr's Blog: MySimple.php - A lightweight PHPMyAdmin substituteNessa's Blog: Working with Permissions in PHPSymfony Blog: Symfony 1.0.10 is OutMatthew Turland's Blog: Web Scraping Article PublishedJan Lehnardt's Blog: REST Controller for PHP Applications
404798
The International PHP Magazine is back this week with the results from their latest user poll that asked the question "Which Stage Comes First in the Development of the Basic CMS?"   Of course, of the options they gave, "Planning your CMS" came in with an overwhelming lead of 60.5 percent of the votes. Lagging far behind that was "Further Development" and "Database creation". It is good to see that a large majority of the people out there think that taking the time out to plan out the application first is the best way to go. Throwing something together, especially something that can get as complex as a CMS, is a very bad idea.   Be sure and get your votes in on this week's poll that asks which of the given options including "Web and command-line interface" and "Generates a todo list from @todo tags in source") wouldn't be a good option to be added to the phpDocumentor functionality.
246639
In his continuing effort to redesign his blog, Shiflett.org, he's been working on one of the things that really makes a blog useful - the commenting system. Specifically, he wants site visitors to be able to add their own code listings to the comments they post. He gives more detail in this new post.   I've been playing with this tonight. Feel free to follow along as I go. The first thing you want to do is create an ordered list from the code you want to format ($code in these examples).   He gives an example of a listing using his system and explains how it all works. It's a mixture of:  PHP for parsing the data inside the 'code' tags CSS to correctly style the information, whitespace and all Some ini settings to set parameters for... ...the use of highlight string on the PHP code contents  A little str_replace magic later and you have list items styled as code blocks on your page. Check out his demo for an example.
285686
PHPBuilder.com has another in their series of excerpts from the Sams Publishing book "PHP 5 in Practice" today - a look at paginating results on a website.   When creating browse or search functionality on a website, you many find that you end up with more data than the page can easily display at once. In these situations it makes for a better user experience to give users only a certain number of results and then present them with options to see the next and/or previous pages.   The code listing is slightly complex, but it does provide a good, clear look at how to paginate the values in an array. They also explain a bit about the two functions that make it possible - http_build_ query and array_chunk.
609192
On PHPBuilder.com today, there's a new tutorial spotlighting the use of the cURL library with PHP:   cURL is one of the most powerful PHP extensions. It stands for Client URL, and allows you to communicate with other servers using a wide range of protocols. Perhaps that sounds fairly uninteresting, but give it some more thought.    As food for thought, they give a few examples of the use of this handy library - a script to look up the meaning of a word, how to access password protected pages, getting the information about a file from a remote server, posting to a remote script, and FTPing a file to a remote server. This flexible library allows all of these without making things overly complex and unmanageable.   You can check out the full list of features for the extension on this page of the PHP manual.
466722
On his blog today, Cocoliso talks about a handy bit of code to allow for syntax highlighting in your page - Geshi.   What if I told you that with as little as 3 lines of code, you could highlight code on your site? You'd jump at it, wouldn't you? Why not run with the big boys? Your users will love you for it and for good reason. It greatly increases readability.   He walks through the simple installation and how to use it in your page - complete with the code he uses to include the functionality in your page.
766893
Scott Klarr has pulled together a listing of the top cheat sheets that he's found out there relating to PHP (and things surrounding it) like:   this one from blueshoes.org a sheet covering filtering and escaping a Smarty cheat sheet a few covering WordPress and ones covering CakePHP and Drupal   Check out his page for more (and thumbnails for each).
703914
On his blog, Stuart Herbert has a quick tip showing how to mimic a feature of Ruby on Rails:   I'm still working on the next article in my series looking at PHP on servers, so in the mean time, check out this simple way to emulate Ruby's nice way of handling separate getter, setter and state query methods in PHP.   He admits his example isn't as elegant as the Ruby method, but it does get the job done. Code for the method is included in his post ready for cut and pasting.
43131
New on PHPBuilder.com today, there's a review of the Eclipse architecture pertaining to its use with PHP.
159475
Hannes Magnusson has posted about more updates that are being made to the PHP.net website today, including an upgrade to the "conference teaser" patch and the introduction of a new box to like directly to the latest releases on the front page.    Since I moved the 'current releases' info into "a giant" includable array, living in include/version.inc, we can now provide a simple XML feed (or whatever) for you to parse to get the latest release info simpler and more accurately...   What do you think? Is it worth it? What kind of format would you want it in?    He wants your feedback on this last point - would having an XML feed for just the version info be that useful? Or would it just be yet another RSS feed to add to the list to keep up with the new PHP releases?
388493
ProDevTips.com has posted part nine of their long-running series about using the Zend Framework (and Smarty) to create a CMS/Community website.   This piece covers creating a proper folder structure so that we can have a skin system. I've also created a folder for the admin section which is fully contained with it's own controllers folder and so on. Another unrelated change that has happened since the last part is sub menu logic which we will also take a look at.   They make updates to the bootstrap file to introduce another controller directory and, inside of that, create the Administrator controller and integrate it with a Smarty template to show different menu items if an admin user is logged in.