News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Introduction to JadePHP
April 10, 2014 @ 10:30:30

Lukas White has posted an introduction to JadePHP to the SitePoint PHP blog today. JadePHP is a port of the popular Jade templating language more often used in Javascript.

There are dozens of templating engines out there, with options such as Smarty, Twig (used in the upcoming version of Drupal) and Blade (the default for Laravel) among the best known - as well as vanilla PHP, of course. [...] One which differs quite significantly from most is Jade, an engine usually associated with Javascript applications - it's supported out-of-the-box by Express for Node.js, for example. It's Jade I'm going to look at in this article; or more specifically the PHP port JadePHP.

He starts by briefly talking about HAML, a markup language that aims to make it easier and cleaner to write well-formatted HTML documents. Jade creates the entire document this way, meaning you could use it even without any templating needs (just outputting normal HTML pages). He shows you how to get started with the code and provides a simple example of a basic HTML page without any template objects to replace.He explains the markup and what each part does before moving on and showing how to add in the dynamic content and logic. He finishes off the tutorial by answering the question "Why use Jade?" touching on some of the good and bad of the templating engine.

0 comments voice your opinion now!
jadephp templating haml markup library tutorial

Link: http://www.sitepoint.com/introduction-jadephp

NetTuts.com:
How to Create a PyroCMS Theme
May 21, 2013 @ 11:19:25

On NetTuts.com today there's a new tutorial posted showing you how to create a theme for PyroCMS, an open source, PHP-based content management system with a large user base and community.

Like most content management systems, PyroCMS uses front-end themes. Though PyroCMS themes are built a bit differently than what you might be used to from other systems, they're still quite easy to create. They're so easy, in fact, that very little PHP experience is required to assemble them!

He walks through things like the folder structure of the templates directory and how to get started on a custom "Foo" theme of your own. He covers how to lay out the HTML markup for the theme and how you can use partials for the sections of the site. He briefly touches on using multiple layout files and how to use different layouts shown only to mobile devices.

0 comments voice your opinion now!
pyrocms theme tutorial introduction mobile markup patrials

Link: http://net.tutsplus.com/tutorials/php/how-to-create-a-pyrocms-theme

CodeIgniter.com:
New User Guide in Development
October 06, 2011 @ 09:55:48

The CodeIgniter development team is happy to announce work that's been done on the framework's user guide to help make it even better and easier to find the information you're looking for (now based on the Sphinx documentation generation engine).

In addition to handling the tedium of generating page and document tables of contents, or maintaining internal links and references, the documentation is now easier to write, as you can simply focus on the content instead of markup and presentation. Don't forget syntax highlighting of PHP, HTML, CSS, and JavaScript in code samples. Based on ReStructured Text, it's also more human readable in a text editor than HTML is, which is likely where you spend most of your time. As an added benefit, Sphinx can output HTML, PDF, and even EPUB formats all from the same source files.

There's also been a style redesign in the latest release (here on github) on the development branch of the framework. They warn of a few "bumps" that you might come across in using it, but they're working hard to take care of those quickly. If you'd like to see the new version, check out the nightly build results.

0 comments voice your opinion now!
usergruide development sphinx markup generation framework codeigniter


Jason Gilmore's Blog:
How I Learned to Stop Worrying and Love Zend_Form
August 22, 2011 @ 13:57:14

On his blog today Jason Gilmore has a quick post about solving one of his frustrations with Zend_Form (a part of the Zend Framework) - the default form decorators.

It is a fantastically productive framework, one which I happen to use almost every single day. There was however one feature which absolutely drove me crazy. The Zend_Form component's uses the dd, dl, and dt elements as the default form markup decorators, meaning that even a simple contact form consisting of name, email, and message fields and a submit button [is marked up with dl, dt and dds]. [...] It goes without saying that the overwhelming majority of developers do not use these elements to mark up their forms, with the sheer number of questions posted to StackOverflow and elsewhere about getting rid of these decorators backing this assertion.

He gives his simple solution to the issue, something better than removing all of the decorators and using setDecorator to replace them - a simple partial view that echos out the fields directly. The trick is to use the setDecorators call with a "ViewScript" option pointing to your partial and setElementDecorators() call to use a "ViewHelper".

0 comments voice your opinion now!
zendform tutorial markup decorator form


Benjamin Schneider's Blog:
Use PHP's Tidy extension to validate your (X)HTML markup
October 07, 2010 @ 10:59:30

In a new post to his blog Benjamin Schneider looks at how you can use the Tidy extension to clean up the (X)HTML markup that comes out of your application.

Tidy is a very cool PHP extension. You can let it tell you what kind of mistakes you might have in your HTML markup and even correct it for you - if you want. In my projects I use it to give me a hint if my generated markup is invalid. This way I can easily correct it during development without being dependent on external validators. In this post I will show you how easy it is and how few lines of code you need to make your application show any potential errors you might have in your HTML markup.

He shows how, with the help of output buffering, to grab the HTML output of your script and push it through the Tidy functionality (via a call to tidy_parse_string) and outputting the results. It even has a built in error catcher for when it finds invalid formatting in the generated markup. You can find out more about the features of this extension in the PHP manual.

0 comments voice your opinion now!
extension tidy markup html tutorial


Sameer Borate's Blog:
Templating with Haml
September 09, 2010 @ 12:51:40

Sameer Borate has posted about an alternative templating system that's currently being used in multiple languages - Haml (HTML Abstraction Markup Language). As Sameer points out, there's also a PHP port of it.

It has been a while since I've used a template engine during development, the last one I used was Smarty. Now there are a plethora of template systems, but most are a rehash of Smarty. Readers may beg to differ, but Smarty gets the work done, which is all that matters. The one that I found really interesting is Haml.

He includes some markup examples of how it's structured - the main structure of the site, tables, divs, etc - and what it comes out like on the other side of the parser. The phphaml and phamlp libraries let you run the template through with variable values set and display it. There are some downsides he mentions, though, like the rules on indentation and that the markup has to be all in one file (or combined before sending to be rendered).

0 comments voice your opinion now!
template haml markup abstraction tutorial phphaml phamlp


The Web Squeeze:
Using Prado - A PHP Framework
April 28, 2009 @ 12:54:18

On The Web Squeeze blog there's a recent post looking at a PHP framework that doesn't get mentioned that often (at least these days) - Prado. The post looks briefly at the framework at getting it set up for development.

This [word game] project was going to be slightly larger, and writing everything myself from scratch would have taken far too long. So I decided to use a PHP framework. PHP frameworks are a collection of code, meant to make your life easier and to aid you in the rapid development of dynamic websites. My choice fell on the Prado framework (see www.pradosoft.com).

He walks you through a first example script with both sides - controller to create/gather the content and the custom tag markup for it to inject the content into. He also includes a look at some of the Ajax support included with the framework. His example is the user clicking on a "Add to Cart" button to call the backend "onToCartClicked" method.

1 comment voice your opinion now!
framework prado introduction example custom markup


Developer Tutorials Blog:
Why you should be using YAML for config
January 25, 2008 @ 11:22:00

The Developer Tutorials blog has a new post mentioning the use of YAML structure for creating configuration files in your application.

YAML, or YAML Ain't Markup Language, is a "human friendly data serialization standard". It's essentially a very basic format for storing data, and uses far less syntax than standard PHP. [...] It's almost like English; it's as basic as you want. Of course, that's not to say it doesn't support complex structures - this example demonstrates the power of the format.

He also points out the spyc extension that makes working with the files in PHP a breeze.

0 comments voice your opinion now!
yaml config markup language configuration file spyc


DeveloperTutorials.com:
Create a Facebook Application With PHP
January 07, 2008 @ 09:36:00

The DeveloperTutorials website has a new tutorial posted that walks the reader through a step-by-step process to create a PHP Facebook application of their very own.

Everyone is talking about Facebook and their new Application Platform and I have to admit I think it's pretty cool too. So I decided to create an application that uses the Facebook Platform. I'm writing the application in PHP and I thought it might be useful for others to know how to write their own Facebook applications with PHP.

They show you where you'll need to go to set up an ID with Facebook to develop with, the developer application you'll need to add, where to grab the Facebook developer API and, finally, creating a simple application.

Their example is just of the "Hello World" sort, but it gives you a good foundation to start from. They also include pointers to the Facebook Markup Language and a reference for the Facebook REST-based API interface.

2 comments voice your opinion now!
facebook application library developer api rest platform markup facebook application library developer api rest platform markup


Zend Developer Zone:
Using YAML With PHP and PECL
October 02, 2007 @ 07:54:56

The Zend Developer Zone has a new article today by Vikrim Vaswani covering the use of YAML (Yet Another Markup Language) with PHP via the PECL packages that support it.

If you've ever encountered the same need, or if you're just curious about the YAML format and how it can be used with PHP, then today is your lucky day. Over the next few pages, I'm going to give you a crash course in YAML and in PHP's ext/syck extension, showing you how it can be used to efficiently translate data structures from PHP to YAML, and vice-versa. Come on in, and let's get started!

The tutorial starts with an example of a YAML file before getting into the application portion. He shows how to grab the Syck extension, install it, create a simple YAML file and create a configuration file (and parser) for a simple form application.

2 comments voice your opinion now!
yaml pecl tutorial syck markup language yaml pecl tutorial syck markup language



Community Events





Don't see your event here?
Let us know!


podcast laravel artisanfiles symfony tool series list library language version security opinion introduction community voicesoftheelephpant framework conference release composer interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework