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

Christoph Rumpel:
Using Facebook Messenger Quick Replies with BotMan
Jul 03, 2018 @ 15:53:08

Christoph Rumpel, lead developer on the BotMan chatbot project, has a new tutorial posted to his site showing how to use Facebook Quick Replies with a BotMan instance.

I guess you already used quick replies for text buttons, right? But did you know that you can ask the user for email, phone number, and current location? It is time to give you a refresh of Facebook Messenger quick replies and how they work in the BotMan chatbot framework.

The post includes a video of the process of integrating these quick replies but also steps through all of the code required. Adding the replies is as easy as using the Button functionality included with the package and adding listeners. The tutorial also shows how to use them in conversations (rather than just one-off calls). It also provides a more "real world" example of asking the user for location, phone number and email with quick replies.

tagged: botman chatbot framework tutorial facebook messenger quickreply button

Link: https://christoph-rumpel.com/2018/07/using-facebook-messenger-quick-replies-with-botman

SitePoint PHP Blog:
Powering Raspberry Pi Projects with PHP
Jul 13, 2016 @ 17:20:52

The SitePoint PHP blog has posted a tutorial from author Andrew Carter showing you how you can use the Raspberry Pi hardware to power a PHP-based application with a bit of simple setup.

A Raspberry Pi is a brilliant tiny computer that you can power off of a micro USB cable. The most recent model has WiFi, an ethernet port, 4 USB ports and an HDMI port. There’s also a micro SD card slot, which is where the “hard drive” goes.

It’s capable of running Raspbian Linux, which is a Debian based Linux distribution. This makes it familiar to Ubuntu users who can then just sudo apt-get install all the things. Like with any Linux machine, you can install PHP on it and make a website – but we can do so much more than that!

He starts with the equipment you'll need to follow along with the tutorial - a recent Raspberry Pi model with wifi and a bit of other electronics equipment (he also recommends a starter kit for those new to this hardware world). Once the Pi is set up, he then installs PHP via an apt-get package install along with the PiPHP: GPIO library that makes working with the input/output simpler via PHP. He then shows the wiring you'll need to do to get a LED and button connected. A simple script is included that sets up a watcher on the button input and, when the "push" event is fired, it blinks the LED five times.

He finishes the post with a look at some of his own testing and preparation for a talk on this same subject with some slightly humorous results.

tagged: raspberrypi project tutorial piphp gpio hardware led button listener event

Link: https://www.sitepoint.com/powering-raspberry-pi-projects-with-php/

Johannes Schluter's Blog:
NetBeans plugin for running phpt tests
Dec 18, 2008 @ 15:35:16

In a new post to his blog today Johannes Schluter talks about a plugin for the NetBeans IDE that allows you to run tests for PHP's regression test suite right in the editor.

The test system therefore produces a bunch of files, a file containing the expected output, one containing the actual output and a diff between these as relevant files. The problem there is that the diff, for being portable, is using a quite simple mechanism which only shows the lines which differ without any context.

[...] Lately I've changed my way of working and use vim less, I still use it, but I use NetBeans as an IDE more and more. So I thought a bit about that test issue and searched my brain for my Java skills and started playing around to see whether I manage to write a NetBeans plugin which can run the tests and report the results in a usable way.

Hes created a project for the plugin (where you can download the latest version - 0.6.0) and install it to your local IDE copy. It adds a toolbar icon, asks for the location of the binaries to test and runs the diff quickly and easily. You can see a screenshot of the tool in action here.

tagged: netbeans plugin phpt test regression toolbar button wizard

Link:

Christian Flickinger's Blog:
Ruby on Fails (story and stickers!)
Sep 19, 2008 @ 16:17:18

As a new meme was launched at this year's Zend/PHP Conference & Expo and, while it's not directly related to PHP, it was still very warmly accepted by the community - Christian Flickinger's "Fails" logos (see here). He's written up a post about it for his blog too:

So, a week before PHP|TEK 2008 I came up with the genius idea to take the Ruby on Rails logo, which is protected against re-use (hahaha), and parody it. I wanted to express my views of Ruby on Rails (though never have using RoR) through this modification.

I took the logo and simply changed the "R" to an "F" using a font that was almost identical to the original.

You can ask anyone that was at ZendCon this year about them - they were everywhere. Christian did a great job on a simple parody that shares the sentiment of many members of the PHP community (and others outside I'm sure). He has them for sale on his etsy shop if you'd like to pick up some of your own.

tagged: zendcon08 sticker ruby fails etsy order button magnet

Link:

Mikko Koppanen's Blog:
Creating buttons with Imagick
Nov 22, 2007 @ 23:05:50

Mikko Koppanen has another quick new tutorial on using Imagick in your applications - this time it's about making buttons dynamically.

The button in this example is created after this tutorial http://xeonfx.com/tutorials/easy-button-tutorial/ (yes, I googled "easy button tutorial"). The code and the button it creates are both very simple but the effect looks really nice.

The example code creates a simple round button with a fill color and white text. Their examples show a red, green and blue buttons.

tagged: imagick button tutorial round fill color font imagick button tutorial round fill color font

Link:

Mikko Koppanen's Blog:
Creating buttons with Imagick
Nov 22, 2007 @ 23:05:50

Mikko Koppanen has another quick new tutorial on using Imagick in your applications - this time it's about making buttons dynamically.

The button in this example is created after this tutorial http://xeonfx.com/tutorials/easy-button-tutorial/ (yes, I googled "easy button tutorial"). The code and the button it creates are both very simple but the effect looks really nice.

The example code creates a simple round button with a fill color and white text. Their examples show a red, green and blue buttons.

tagged: imagick button tutorial round fill color font imagick button tutorial round fill color font

Link:

PHP-GTK Community Site:
Playing with GtkStyle
Mar 21, 2007 @ 15:36:00

Marc Quinton has posted a pointer on the PHP-GTK Community Site about his article on how to use the GtkStyle Events inside of a PHP-GTK application.

Here you will find how GtkWidget standards buttons are built and can be drawn. Here we use ready to use methods from GtkStyle class to draw buttons, checkboxes and handles. You can use theses classes to override standard buttons features. It's also useful to understand how GtkWidgets work. This class study started when I was trying to display a handle and did not found any one.

It's less of a tutorial and more of a code dump, but it gives you a good idea of how all of the functionality can work together.

tagged: phpgtk gtkstyle gtkeventbox standard button phpgtk gtkstyle gtkeventbox standard button

Link:

PHP-GTK Community Site:
Playing with GtkStyle
Mar 21, 2007 @ 15:36:00

Marc Quinton has posted a pointer on the PHP-GTK Community Site about his article on how to use the GtkStyle Events inside of a PHP-GTK application.

Here you will find how GtkWidget standards buttons are built and can be drawn. Here we use ready to use methods from GtkStyle class to draw buttons, checkboxes and handles. You can use theses classes to override standard buttons features. It's also useful to understand how GtkWidgets work. This class study started when I was trying to display a handle and did not found any one.

It's less of a tutorial and more of a code dump, but it gives you a good idea of how all of the functionality can work together.

tagged: phpgtk gtkstyle gtkeventbox standard button phpgtk gtkstyle gtkeventbox standard button

Link:

PHP-GTK Community Site:
Easily empty GtkContainer/GtkWindow
Mar 08, 2007 @ 14:42:00

The PHP-GTK Community site has a quick new post today showing how to create/empty out a GtkContainer or GtkWindow in your code.

This function provides an easy way to empty a GtkWindow/GtkContainer. I use it when i need to refresh a part of my app by replacing some widgets with others. It can destroy or preserve the child widgets depending on your needs.

They provide both the code itself and a sample usage - a three line script that shows three ways to use it - empty out a container, empty out the container but keep its children intact, and how to use it in the event of a button click.

tagged: phpgtk gtkcontainer gtkwindow empty children button event phpgtk gtkcontainer gtkwindow empty children button event

Link:

PHP-GTK Community Site:
Easily empty GtkContainer/GtkWindow
Mar 08, 2007 @ 14:42:00

The PHP-GTK Community site has a quick new post today showing how to create/empty out a GtkContainer or GtkWindow in your code.

This function provides an easy way to empty a GtkWindow/GtkContainer. I use it when i need to refresh a part of my app by replacing some widgets with others. It can destroy or preserve the child widgets depending on your needs.

They provide both the code itself and a sample usage - a three line script that shows three ways to use it - empty out a container, empty out the container but keep its children intact, and how to use it in the event of a button click.

tagged: phpgtk gtkcontainer gtkwindow empty children button event phpgtk gtkcontainer gtkwindow empty children button event

Link:


Trending Topics: