Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Sierpień, 2011

Customizing the Yet Another Related Posts Plugin

Customizing the Yet Another Related Posts PluginI love WordPress. I really do. Maybe not as much as Olaf, but he’s made a convert out of me. I’m using it more and more for my sites but am getting increasingly frustrated at how many of the ‘standard’ plugins and widgets don’t seem to be as complete as they could be. So many [...]


Source: http://feedproxy.google.com/~r/WebDevelopmentBlog/~3/4db-ezQMHPs/

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Customizing the Yet Another Related Posts Plugin

Customizing the Yet Another Related Posts PluginI love WordPress. I really do. Maybe not as much as Olaf, but he’s made a convert out of me. I’m using it more and more for my sites but am getting increasingly frustrated at how many of the ‘standard’ plugins and widgets don’t seem to be as complete as they could be. So many [...]


Source: http://feedproxy.google.com/~r/WebDevelopmentBlog/~3/4db-ezQMHPs/

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Customizing the Yet Another Related Posts Plugin

Customizing the Yet Another Related Posts PluginI love WordPress. I really do. Maybe not as much as Olaf, but he’s made a convert out of me. I’m using it more and more for my sites but am getting increasingly frustrated at how many of the ‘standard’ plugins and widgets don’t seem to be as complete as they could be. So many [...]


Source: http://feedproxy.google.com/~r/WebDevelopmentBlog/~3/4db-ezQMHPs/

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

DashExamples.com: Add a Content Security Policy(CSP) to your Web Site with PHP

DashExamples.com: Add a Content Security Policy(CSP) to your Web Site with PHP

Related to this other post about content security policies in PHP sites, DashExamples.com has a quick new post about what you’ll need to add to your application to implement a policy of your own.

Content Security Policy(CSP) is a mechanism in the browser that restricts what content will be requested and run by the browser. CSP does this by passing in a specific response header that tells the browser what resources (images, javascript, css, frames, etc) can be requested and accepted to execute. There are multiple ways to setup CSP for your web site, you can use your web server configuration like I showed in a previous example or use a dynamic scripting language like PHP.

What it really boils down to is setting a header, either X-Content-Security-Policy or X-Content-Security-Policy-Report-Only, to tell the browser what security policy to use and how to honor it. You can find out more about content security policies from this page on the Mozilla wiki. CSPs allow you to define how your site’s content interacts and help to prevent issues like XSS and data injection.

Source: http://www.phpdeveloper.org/news/16774

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Theme.fm: Deploying WordPress with Capistrano

Theme.fm: Deploying WordPress with Capistrano

In this recent post to Theme.fm they have a guide to deploying your WordPress site (or really any sort of PHP-driven site) with Capistrano. There’s some WordPress specific bits in there, but it’s a good overall guide to deployment with this handy tool.

I’m not a Capistrano expert (yet) and in this post I’ll try to give you an overview how to set it up and how to deploy WordPress applications (websites) in seconds. We’ll work with only one server today but the principles in deploying to two or more are pretty much the same.

He starts by introducing Capistrano and talking about some of the major benefits it can bring to you and your project (most importantly – simple deployments). The tutorial helps you install Capistrano and get it set up to work with your Github repository to pull the source. The WordPress specific bit has to do with configuration files and suggests an “if” check to see if there’s local config first. Also included are the updates you’ll need to make to the Capistrano config file and the commands to push the latest as well as rollback to your previous version.

Source: http://www.phpdeveloper.org/news/16773

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Robert Basic’s Blog: Importing Symfony2 security settings from a bundle

Robert Basic’s Blog: Importing Symfony2 security settings from a bundle

In a new post to his blog Robert Basic takes a brief look at importing Symfony2 security settings from a bundle he’s been creating back into the main configuration.

I started to work on/figuring out the security part in Symfony2 and one part where the docs fail so far is to explain how to import security settings from a bundle. Once I put some thinking into it, it’s pretty easy actually. Simply import the needed security file in your main config file.

His trick is to use the “imports” key in his YAML config file to define the resource to pull from in his config.xml. More information on the format of the security file can be found here in the Symfony documentation. It helps you define authentication mechanisms, authorization models and working with access control and roles.

Source: http://www.phpdeveloper.org/news/16772

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

James Morris’ Blog: How to Strip EXIF Data Using Imagick

James Morris’ Blog: How to Strip EXIF Data Using Imagick

James Morris has a quick tutorial today showing how to pull the exif data from a photo and make it into something useful you can either display on on the site or store for categorization.

Today I spent a good amount of time trying to figure out how to strip exif data from an image using Imagick. The first port of call was the (pathetic) documentation at php.net. I searched for ‘exif’ but found nothing. [...] I was tipped off by a colleague to the method Imagick::stripImage() which apparently did what I wanted. The only mention of exif is in a rather helpful comment at the bottom of the page.

This comment pointed him to the Imagick::stripImage() function that pulls off the data and returns exif information (or, as the documentation calls it, “profiles and comments”). His seven line script is included in the post that initializes the Imagick object, pulls in the file and runs the stripImage() method with the option for “exif:*”. The resulting properties are then displayed including aperature value, date taken, exposure time, make and model of the camera, shutter speed, resolution and much more.

Source: http://www.phpdeveloper.org/news/16771

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Srdjan Vranac’s Blog: Custom Repository with DIC in Symfony2

Srdjan Vranac’s Blog: Custom Repository with DIC in Symfony2

Srdjan Vranac has a new post to his blog showing you how to create a custom repository with the dependency injection features that already come with the Symfony2 framework.

I am currently working on some Symfony2 bundles, I needed a custom repository to house hold my custom queries, that part is easy with sf2, and quite nicely explained in the Manual.

He walks you through the setup of a simple custom repository (a part of a Code4Hire bundle) and a (less elegant) call that can be used to reference it and its methods. To make things a big more clean and take advantage of the full dependency injection features of the framework, he makes a change to move the repository into the services.xml. This defines the container and makes it available to the application directly in function calls (like his render() example near the end of the post).

Source: http://www.phpdeveloper.org/news/16770

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

IT World: Lost programming skills

IT World: Lost programming skills

On IT World there’s an interesting article about the programming skills that seem to be lost in today’s coders and how what they may not know might hurt them in the end.

Some of these skills aren’t likely to be needed again, any more than most of us need to know how to ride a horse or (sigh) drive a manual-transmission vehicle. But other skills and “lessons learned” may still or again prove relevant, whether developers are banging their heads against legacy systems, coding for new mobile and embedded devices… or other devices and applications we haven’t yet thought of. [...] Here’s what some industry veterans and seasoned coders think the younger generation doesn’t know … but should.

He’s broken it up into a few different sections – one dealing with the lack of general hardware knowledge by a good section of the today’s developers, another noting that programming is not the same as software engineering (yes, really). He also touches on the lacking idea of “thinking before coding” and how planning for errors has become less and less of an importance.

Source: http://www.phpdeveloper.org/news/16769

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Blast from the Past – One Year Ago in PHP

Site News: Blast from the Past – One Year Ago in PHPHere’s what was popular in the PHP community one year ago today:

Source: http://www.phpdeveloper.org/news/16768

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>