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

SitePoint PHP Blog:
Sculpin Extended: Customizing Your Static Site Blog
Aug 19, 2016 @ 12:22:56

The SitePoint PHP blog has a new tutorial posted helping those Sculpin users out there get the most from their site with some helpful customization tips. Sculpin is a PHP-based static site generation tool that converts Mardon files and Twig templates into HTML documents ready for use.

If you’re a PHP developer and currently running a blog with a static site generator such as Octopress or Jekyll, wouldn’t it be great if you could use your primary language for it? Yes, it’s healthy for us developers to use more than one language, but let’s be honest – we often want to add some functionality to our blogs, but it’s difficult to accomplish in unfamiliar syntax. In this article, we’ll set up Sculpin, a static site generator for PHP. Just like any other static site generator, it uses markdown files and HTML templates to generate your blog, so the transition should be easy.

The tutorial starts by helping you get Sculpin installed (as a phar executable) and move it to where it's globally accessible. With that installed the article then helps you make a simple blog, customize some of the basic settings and start in on a new blog post. With that in place it then gets into the customization, adding in:

  • syntax highlighting
  • Disqus commenting
  • blog archive links

The post finishes up showing you how to deploy the resulting blog into a GitHub pages repository and pushing them out for public consumption.

tagged: sculpin extended tutorial static site github pages syntaxhighligh disquis archive

Link: https://www.sitepoint.com/sculpin-extended-customizing-your-static-site-blog/

Tighten.co:
Introducing Jigsaw, a Static Site Generator for Laravel Developers
Apr 20, 2016 @ 13:33:40

On the Tighten.co blog there's a new post introducing Jigsaw, a static site generator for Laravel developers they've created in the course of their own work.

That's right, Tighten has created a Laravel-based static site generator named Jigsaw, and we think it's pretty great.

Before I write another line of this post, I want to address the looming question: Why create another static site generator? In PHP alone there are two, and since we soft-launched Jigsaw there's already been another Blade-based static site generator launched.

The first part of the article lists three reasons for making the tool, pointing out the ecosystem they used (different from others), the focus on Laravel developers and the easy transition from a Jigsaw site to a full Laravel one. From there the post talks about what Jigsaw is and how you can get started using it (installation and configuration guide included). It also includes examples of "first pages" to help you get started and the result. The post finishes with a look at variable handling, custom front matter values, deployment and how to convert the site from Jigsaw to Laravel should the need arise.

tagged: jigsaw static site generator laravel introduction installation tutorial

Link: http://blog.tighten.co/introducing-jigsaw-a-static-site-generator-for-laravel-developers

Marko Pavlovic:
Restful Commander
Mar 23, 2016 @ 11:55:10

In this post to his site Marko Pavlovic talks about REST APIs, some of the non-CRUD (create, read, update, delete) operations that need to be performed and how the Command design pattern can help.

We’ve all been here: the data model has been designed, and we have the entities and relationships implemented. It is finally time to code up the business logic and we are faced with solving these problems: The actions we want to implement on a particular model are not part of the good old CRUD (Create, Read, Update, Delete) operations, and we need to make a lot of non-standard controller actions, and routes. [Also] the actions we want to implement do not belong to a any model, and we have to create a new controller just for the "API".

He gives a more concrete example to illustrate the problem using "sites", "visits" and a desire to add analytics functionality using each's data. He points out two common actions taken when something like this comes up: either new methods on the pre-existing controllers or possibly making a new controller to handle it. Instead he suggests using the Command pattern to handle requests themselves as self-contained items. This gathers all the logic needed in to one place and the Report instance can then be used as-is by the response that needs to render the results.

tagged: rest api command designpattern report site visit

Link: http://markonis.github.io/rest/api/design-patterns/2016/02/23/restful-commander.html

SitePoint PHP Blog:
Building an Spress Svbtle Theme – Responsive Static Blogs!
Feb 11, 2016 @ 12:47:11

On the SitePoint blog there's a tutorial posted showing you how to create a responsive site template in Spress, a static site generator written in PHP.

You may have heard of Sculpin – a static site generator for PHP. [...] While easy to use and fast to set up, Sculpin’s development has stagnated a bit and the documentation leaves much to be desired. Spress is, in a way, its spiritual successor. Much better documentation, much more flexible configuration, much easier to extend, and just as easy to use with almost the same API and commands.

He starts by helping you set up a basic site to work with on a Homestead Improved instance. Once that's up and running (including an install of Spress) he creates the simple site and starts in on the rebuild of the Svbtle theme. He briefly explains how Spress themes work and then includes the code/layouts you'll need to reproduce the theme. The post includes a screenshot of what the end result should look like in two different browser sizes (responsive, remember).

tagged: spress static site generator responsive theme svbtle tutorial

Link: http://www.sitepoint.com/building-an-spress-svbtle-theme-responsive-static-blogs/

Tom Schlick's Blog:
Wrench for FuelPHP
Nov 30, 2011 @ 12:40:57

Tom Schlick has a new post to his blog talking about a tool he's written for FuelPHP-based applications called Wrench. It's a command-line tool to make taking your site "offline" simpler.

If you have been following what I've been up to lately you would see that many of my recent projects are based on FuelPHP. Since Fuel is so awesome and allows you to create "packages" that can be dropped into your application, I have created a few that help me quickly piece together apps. The first package I'm "releasing" is called Wrench.

The tool works with the oil command-line tool already included in the framework to swap out the default action with a "Down for Maintenance" message. It will look at the current state of the app and switch it to the opposite when run, but you can also define "start" and "finish" manually if you'd like. You can find the source for the package on Tom's github account.

tagged: wrench site maintenance message tool task fuelphp framework

Link:

Victor Farazdagi's Blog:
New Project: Phrozn - static site generator in PHP
Apr 15, 2011 @ 11:02:03

On his blog today Victor Farazdagi introduces a new tool he's developed to help make the creation of static sites even easier - Phrozn, a static site generator that takes content and wraps it in a site's template and structure and outputs it for easy integration.

Given the scale of how client-side technologies (such as JavaScript) evolved, most of dynamic functionality can be implemented using client-side scripts + remote web-services (e.g. Disqus for comments). More than often we a going down that road even on our completely dynamic sites - it makes things more simple.

He gives the example of being able to write the content in VIM and run a single application - Phrozn - and generate the new page to add to the site. He sees it as a good alternative to something like WordPress where most people only use 1% of the functionality it offers. You can find out more about the project by looking into its documentation or you can just dive into the code by grabbing it from github. As a side note, several other tools, like Jekyll are "blog aware" and can be used similarly.

tagged: static site generator phrozn blog project github documentation

Link:

PHPClasses.org Blog:
Throttling Background Tasks: Unusual Site Speedup Techniques: Part 2
Oct 26, 2010 @ 09:17:55

On the PHPClasses.org blog Manuel Lemos has posted part two of his look at techniques to help speed up your site - a few things that you maybe hadn't thought of before.

In the previous article I talked about one important factor that often seriously affects the user perception of the speed of a site, which is the presence of content from external sites that slows down the load of pages, such as advertising and widgets. In that article I presented a technique that I am using to make external content not affect the user perception of the site speed. In this article I am addressing another factor that may also affect the user perception of site speed, but this time is related to aspects of the server side environment.

In this article he looks at things like other server-side background processes, throttling their CPU usage, throttling PHP's CPU usage and the use of a monitoring class to help you and your applications (and sysadmins) stay on top of what's happening with the server.

tagged: background task throttle site speed tutorial

Link:

Brian Swan's Blog:
Top 10 PHP-Microsoft Resources
Jan 29, 2010 @ 08:15:45

Brian Swan has a new post to his MSDN blog today with a list of ten great Microsoft+PHP references (including one or two that don't belong to Microsoft!)

As I've learned (and continue to learn) PHP and Microsoft technologies, I've found some very helpful resources on the web. But, they are sometimes hard to find, and they certainly aren't usually found in one place. So, before I begin drilling into some of the things I suggested in my first post, I thought I’d take a stab at consolidating the resources that I've found to be especially helpful.

Sites included in the list are things like:

tagged: microsoft resource site iis msdn

Link:

Blue Parabola Blog:
Magento Feature Analysis Series, Part 14: Site Management Offering
Oct 12, 2009 @ 10:09:11

Matthew Turland has posted the fourteenth part of his series detailing the features that the popular PHP e-commerce package Magento has to offer to the Blue Parabola blog today. This time the focus is on the site management features.

Features covered include:

  • Content Staging and Merging
  • Support for Multiple Websites and Stores
  • Administration Permission System Roles and Users
  • Web Services API
  • Fully 100% Customizable Design Using Templates

If the series interests you, you can mind more great parts in the series in this category on the Blue Parabola blog.

tagged: magento feature site management

Link:

Kae Verens' Blog:
Hosting multiple sites from the same CMS engine
Jan 21, 2009 @ 10:21:33

Kae Verens has a few tips to help simplify your life with your current content management system by using one code base to run multiple sites.

I haven’t studied how other engines do it, but here’s how I do it. First off, some benefits to sharing the CMS across separate sites: reduced resource usage, easier upgrades, easier bug-fixing. Convinced yet? Of course you are. Here’s how you do it.

There's four steps to his process:

  • Separate out the site-specific files from one another
  • Serve all site-specific files out through a "proxy" script that can intelligently grab the needed ones based on the site
  • Override the default configuration at request time (forcing it to use that "proxy" script)
  • Create that proxy file that the web server can funnel the requests through (his example is included).
tagged: host multiple website cms engine site specific configure proxy

Link: