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

SitePoint PHP Blog:
Effective PDF Generation in Drupal
Feb 03, 2015 @ 15:43:53

On the SitePoint PHP blog today there's a new post showing you how to create PDFs in a Drupal-based site making use of the Print module for the creation and formatting.

DF generation takes a slight change of mindset. As web developers, we have spent a lot of time convincing designers from a print background to stop producing pixel perfect designs that will be difficult to reproduce on the web. If you want to introduce PDF generation or any form of high designed print output, then we need to relearn some of our old skills we left behind. The nature of print means that it is precise and often needs pixel (or millimeter) perfect design.

He'd initially thought that the Views PDF module would be the natural choice, but after finding some unwanted dependencies, opted for the Print module instead. The Print module only creates the formatted output, though. This is then passed off to wkhtmltopdf to convert into final PDF form. He walks you through the configuration for the Print module and how to create some of the basic HTML structure for the resulting output. Next up is the addition of some styling and the process for exporting the HTML output over to wkhtmltopdf for handling. Output samples are included to help illustrate the final result.

tagged: pdf generation drupal tutorial views print wkhtmltopdf convert

Link: http://www.sitepoint.com/effective-pdf-generation-drupal/

NetTuts.com:
Five Hidden Gems of Laravel
Aug 22, 2014 @ 16:51:20

The NetTuts.com site has posted a list of their five hidden gems in Laravel, a popular PHP framework. They look at a wide range of these "hidden" features that can help make your Laravel experience even better.

Many developers who use Laravel are probably only barely scratching the surface of what the framework has to offer. While the documentation does cover the most common use cases and the obvious features, it doesn’t cover everything. Don’t get me wrong, the documentation is fine, it’s just that there’s so much you can do, it’s hard to document everything. Because of that, we're going to take a look at some of the hidden gems that lurk within Laravel.

The five items on their list come complete with summaries about the feature, when they were added, if they're documented and a code sample with them in use:

  • Cascading Views
  • Collections (with sorting, filtering and pagination)
  • Regular Expression Filters
  • The Message Bag
  • Fluent
tagged: hidden gems laravel framework views collections regex filter message fluent

Link: http://code.tutsplus.com/articles/five-hidden-gems-of-laravel--cms-21907

NetTuts.com:
An Introduction to Views & Templating in CodeIgniter
Jul 09, 2012 @ 17:09:48

NetTuts.com has a new tutorial that will interest the CodeIgniter developers out there about using views and templates in your CI applications.

Views are a key ingredient in any MVC application, and CodeIgniter applications aren’t any different. Today, we’re going to learn what a view is, and discover how they can be used to create a templating solution for your CodeIgniter projects. The first part of this tutorial will educate complete beginners to CodeIgniter on what a view is, and how to use them in a typical application. The second half will discuss the motivations for finding a templating solution, and guide the reader through the necessary steps for creating a simple, yet effective templating library.

They introduce you to some of the fundamentals behind views, templating, using multiple views and using the templating to push values out to the site.

tagged: views template codeigniter tutorial

Link:

Anna Filina's Blog:
Symfony - subfolders for partials
Feb 21, 2011 @ 17:14:32

Anna Filina has a new post to her site today about using subfolders for partials in Symfony applications and keeping them organized.

Symfony 1.2 - 1.4 expects all partials to follow this convention: templates/_partial.php. What happens when you need to organize your partials in subfolder? I tried a number of "Symfunky" avenues.

She tried a few ways - calling the helper with the include_partial method but it didn't resolve to the path she wanted. Next she tried a different path, but Symfony only interpreted it differently - and not the way she wanted. After a few more tries, she found a solution - using get_partial with a parameter that defined the subfolder to look in.

tagged: symfony framework tutorial partial views subfolder

Link:

NETTUTS.com:
How to Write a "Most Popular By Views" WordPress Plugin
Jun 18, 2010 @ 13:37:26

On NETTUTS.com today there's a new tutorial for the WordPress users/developers out there showing you how to create a "Most Popular By Views" plugin for your site.

As you continue writing for WordPress more and more, the level of difficulty and complexity of your plugins will eventually reach far beyond the simple back-end data manipulation, as demonstrated in our beginner’s article. In this installment we’ll cover in-depth: database interaction, Admin Widgets, and Sidebar Widgets. Today’s example will be a custom built “Most Popular by Views” plugin, which creates an admin area widget for us to view, and a sidebar widget for visitors to see.

Besides waling through the whole process, the tutorial offers a download of the source if you want to get started right away. The resulting plugin can be used on both the admin and public sides of the site as a widget that can be dropped in easily. Code to create both the widget and the database table it needs for a backend are included.

tagged: wordpress popular views plugin tutorial

Link:

DevShed:
Using Nested Views with CodeIgniter
Apr 03, 2009 @ 12:56:01

The "Introduction to CodeIgniter" series continues on DevShed with this new article, a look at nested views in their sample application.

In this third chapter of the series I’m going to discuss one that bases its functionality on the loader class that comes bundled with CI. [...] By means of this method, it is very simple to replace in one single step all the variables included into multiple views with actual data. Therefore, in the next few lines I’m going to discuss how to use it to generate a dynamic web document, which will display some database contents.

After a quick review of loading views sequentially, they look at the new stuff - a "master view" that can load multiple other views inside. To pass information into this master view, they use the "$this->load->vars()" method included in the framework.

tagged: nested views codeigniter framework load variables

Link:

DevShed:
Adding CSS to Handling Views with CodeIgniter
Mar 27, 2009 @ 13:46:10

DevShed has posted the latest article in their "introduction to views in CodeIgniter" series - a look at working with the views to add more layout/design to them with CSS.

Now it’s time to continue exploring the capabilities given by CodeIgniter when it comes to handling views. Since the visual appearance of the web page mentioned above was pretty rudimentary, in this second article I’m going to improve it a bit to make it look more appealing and professional.

To add in their CSS, they update their header_view.php file to includes the styles in the template. The views for each block are then loaded via the controller - header, content and footer areas.

tagged: codeigniter handle views css tutorial header template

Link:

Site News:
New PHPDeveloper.org Weekly Newsletter Offered
Jan 23, 2006 @ 14:56:18

Starting this week, PHPDeveloper.org is going to offer a new service to its readers. In conjunction with the daily news posting (and resulting feed), we are now going to proide our readers with a weekly newsletter - a summary of all of the stories that were posted.

Signup is quick and easy - simply head over to our signup page and enter your email address and submit the form. That's all it takes to get the latest weekly PHP news delivered to your mailbox.

And, of course, PHPDeveloper.org never shares any information it gets from its users with outside sources, so you can rest assured that your email address will not be shared or sold off to anyone.

So, if you'd like to recieve email summaries of all of the great news, views, and community happenings that you see here each week delivered right to your email, head over and signup now!

tagged: newsletter phpdeveloper.org weekly news views community newsletter phpdeveloper.org weekly news views community

Link:

Site News:
New PHPDeveloper.org Weekly Newsletter Offered
Jan 23, 2006 @ 14:56:18

Starting this week, PHPDeveloper.org is going to offer a new service to its readers. In conjunction with the daily news posting (and resulting feed), we are now going to proide our readers with a weekly newsletter - a summary of all of the stories that were posted.

Signup is quick and easy - simply head over to our signup page and enter your email address and submit the form. That's all it takes to get the latest weekly PHP news delivered to your mailbox.

And, of course, PHPDeveloper.org never shares any information it gets from its users with outside sources, so you can rest assured that your email address will not be shared or sold off to anyone.

So, if you'd like to recieve email summaries of all of the great news, views, and community happenings that you see here each week delivered right to your email, head over and signup now!

tagged: newsletter phpdeveloper.org weekly news views community newsletter phpdeveloper.org weekly news views community

Link:


Trending Topics: