 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: WordPress Plugin Development
by Chris Cornutt February 20, 2012 @ 10:50:39
On PHPMaster.com today there's a new tutorial showing how you can create a custom WordPress plugin for the popular PHP-based blogging/CMS tool.
If you've ever used WordPress to build a site quickly, chances are you've used one of the many plugins that are offered to extend the functionality of this popular blogging software. Plugins are one of the many things that make WordPress so attractive. [...] There are times, however, when you can't quite find what you need from existing plugins. This article will show you how to create your own WordPress plugins by walking you through an example to display some text using a widget in a the sidebar.
He walks you through all of the steps you'll need to create the plugin - making the main plugin file (definition) and using some of the methods available to create the functionality: update, form, widget and the constructor to set it all up.
voice your opinion now!
wordpress plugin development introduction simple text form
Martin Psinas' Blog: Watermarking with text and ImageMagick
by Chris Cornutt October 04, 2011 @ 11:44:35
Martin Psinas has submitted a new tutorial he's written up (complete with sample code) showing how to watermark an image with ImageMagick.
In my most recent venture with PHPMaster I was asked to write an article about watermarking images with PHP using ImageMagick. Virtually no documentation exists on the PHP API, although there are plenty of command-line examples from the official ImageMagick website. I spent a solid day and a half attempting to convert command-line code into PHP before (due to miscommunication) the topic was covered by someone else and my work was no longer needed. Although disappointed, it gave me something to blog about! Yay.
His script is pretty straight forward - it loads a sample image, sets up some watermark text and applies it with a "gravity" setting of "southwest" and adds it to the image (annotateImage). The output is pushed back out as a JPEG image. Also included is a slightly more complex example showing how to give the watermark an embossed look and a "text all over the image" look to prevent use of any part of the image, not just one section.
voice your opinion now!
watermark text image tutorial imagemagick emboss
Christian Weiske's Blog: A MIME type for .php files
by Chris Cornutt April 14, 2011 @ 09:17:06
Christian Weiske has a recent post to his site looking at something most PHP developers don't even think about when serving up their scripts - the MIME types for PHP files.
While setting some svn properties at work, we wondered about the correct MIME type for .php files.
He found several in the official IANA list including "text/php", "application/php" and "application/x-http-php" - all valid but none of them considered a standard. He talks about the ones supported by linux distributions (like Debian/Ubuntu) and some reasoning that might make "application/php" the best choice of the list. He points out some downsides to the choice, though, including the fact that something starting with "application/" should considered "machine readable" only despite PHP just being text.
voice your opinion now!
mime type application text iana linux machinereadable plaintext
Michael Maclean's Blog: Using Pango for PHP a taster
by Chris Cornutt February 22, 2011 @ 12:58:27
Michael Maclean has a new article today talking about the Pango graphics library and how it can be coupled with the Cairo PECL extension to more easily create better looking text in dynamic images.
The PECL/Cairo library is pretty good at drawing vector graphics (in our opinion, as the developers, at least!), but one thing it's not able to do by itself is draw text with mildly advanced layout. [...] That's because the developers of the Cairo library decided to let another more specialised library handle the job of text layout.
Michael has created a wrapper for Pango in PHP (github) and some sample code that can be used as a test to ensure it's all setup and working. He steps through each part of the image creation and describes what's happening and what each method is doing along the way.
voice your opinion now!
pango image creation cairo text render tutorial
NetTuts.com: How to Send Text Messages with PHP
by Chris Cornutt January 25, 2011 @ 10:14:39
On NetTuts.com today there's a new tutorial showing you how to send text messages via SMS directly from your script to the user's cell phone.
Text messaging has become extremely widespread throughout the world - to the point where an increasing number of web applications have integrated SMS to notify users of events, sales or coupons directly through their mobile devices. In this tutorial, we will cover the fundamentals of sending text messages with PHP.
Their method "cheats" a little bit and uses an interface many of the cell phone providers offer to their subscribers - a link from an email address to SMS. Most providers have their domains you can send the email to and have it automatically forwarded to the user's cell as a text. Thankfully, this requires nothing more than the mail function to accomplish. They include the sample code and HTML+CSS to make a basic form as well as mention PHPMailer as a more powerful mailing alternative.
voice your opinion now!
text message tutorial send phpmailer mail
Samuel Folkes' Blog: The Tools You Need For PHP Development
by Chris Cornutt October 17, 2009 @ 06:26:19
Samuel Folkes has posted a few of his ideas on the tool(s) that every PHP developer needs to have on his belt to make their work easy and more effective.
Quite often, I am asked the question "What tools do I need for PHP development?". [...] For those who will listen, I have one very simple answer to that question: Aside from a server running PHP and a text editor, you need absolutely nothing. That answer may seem extreme but its the truth. Lets break it down.
Samuel suggests that, while the choices for IDE, debuggers and other tools for PHP development are too many to count, nothing is as good and clean as a basic text editor (his choice is Notepad++). There are a few things that can make your code more effective like phpDocumentor or PHPUnit, but those are more about good coding practices than how you develop.
voice your opinion now!
tools development simple text ide
DevShed: Building Helpers in PHP 5
by Chris Cornutt July 21, 2009 @ 07:56:28
DevShed has started up a new series of tutorials today with this first part of their "helpers in PHP5" series. They look at some of the first steps into creating these helpers and the handy methods inside.
Despite its seeming simplicity, building helpers can be a pretty challenging process, particularly for beginners whom are just starting to implement the object-oriented paradigm in PHP 5. [...] I'm going to introduce you as gently as possible to creating different types of helpers, which hopefully will make you understand the basis of this process and encourage you to create your own.
They start off with a text helper that gives you methods to change newlines to <br> or <p> tags. They extend the class a bit more by adding in a few other methods - convert newlines to <div> tags, and uppercase/lowercase/uppercase the first letter in a string.
voice your opinion now!
tutorial text helper
PHPFreaks.com: PHP Add Text To Image
by Chris Cornutt January 26, 2009 @ 12:04:06
This new tutorial from the PHPFreaks.com website shows how to add text into a custom created image (they go with an Arial font in a PNG image).
One of the standard features of a message board is allowing members to have a signature, which is appended to the bottom of each post they make. Posters can put whatever they want into the signature (within forum settings). Putting quotes in one's signature is one of the more popular things to do. [...] Soon afterwards, I started receiving messages on a fairly regular basis asking me "What kind of sorcery is this?? How do I do that??" You know, I think it's kind of funny people should ask, because this is really nothing new.
His code (the full script is here) sets up the font size, the font face (Arial) and the quotes to be randomly pulled from first. The image manipulation comes next - making a PNG resource, adding a few colors and shapes, and dropping in the text.
Each line of the code is covered in detail so you'll understand exactly what's going on. The end result is a script that makes a simple image and can be easily expanded to work with other sources (like databases or flat text files).
voice your opinion now!
tutorial image dynamic gd text signature forum random
Sameer Borate's Blog: PHP built in functions map
by Chris Cornutt January 16, 2009 @ 09:31:22
Sameer has put together a few images, the results from the Wordle website when he plugged in the names of the built-in functions included in PHP.
The application is simple. You enter a bunch of text and Wordle does the rest. The applet provides options to change color, font and layout. Just for fun I created a Wordle cloud to display php's built in functions. Two samples are shown below. The size of the font in the cloud is proportional to the number of functions starting with the particular name.
Among the largest on the list are words like "array", "get", "mysql" and "mcrypt". He used a call to the get_defined_functions() method and looped through the "internal" subarray to build his lists.
voice your opinion now!
function wordle builtin output image text size
|
Community Events
Don't see your event here? Let us know!
|