Blog posts filed under “PHP”
RSS feed for PHP
-
Build a React app and test it inside its own environment and then wire it up to Drupal for seamless integration.
-
There's a neat little Drupal module called JSON Field and recently, I had a chance to play around with it. Out of the box, JSON field is a just a plain field where JSON data can be input and output on a web page.
-
Recently, I onboarded to a new project that required Lando, a popular local development server. When I am coding, I consider Xdebug to be of immense value for debugging and defining variables.
-
In this screencast video tutorial, I show you how to get up and running with Xdebug and PHPStorm using Docksal.
-
A common architectural model in Drupal is for one entity to reference another. For example, when using the Paragraphs module to build structured modular content, imagine that you have a paragraph type that references another paragraph type.
-
I get great ideas from users of both my Drupal contrib themes, Bamboo and Gratis. Typically a user will write to me and ask, "how do I do x" with your theme?
-
It's hard to believe I've been using both Features and Drush for a few years but didn't know you can create, update and manage your features all with Drush.
-
I've been pretty busy these days with a few different projects and a number of them required a user friendly way (editors not needing to know how to code) of implementing captions for images within content areas.
-
Lately, I've been designing and developing photo galleries for both clients and myself. I thought it would be nice to share some methods and practices that I've learned. This tutorial will focus on creating node photo grid galleries that can either be stand alone or attached to other content types.
-
In the course of a day as a Drupal Themer, I need to code a wide variety of functionality into a given site I'm working on. I try to follow Drupal best practices as well and this usually means implementing theme preprocess functions; these become key to a Themer's toolbox.
-
In my last article I demonstrated how to extract basic data from field array elements which is ideal for custom node theming. The key to this is using *field_get_items*. I'll expand upon that by adding in additional Drupal API functions to enhance and format these Field array elements.
-
In this article, I'll show how to really dig into data associated with a field and for that I'll use a preprocess function in your theme's template.php for the logic and then a variable for presentation in a custom node template.
-
The more Drupal web projects I do, the more I keep having to solve similar issues that arise during development or reusing similar code snippets. Typically you can use Features or write a small module for a lot of things but sometimes, you just need that one code snippet or quick fix.
-
I was recently tasked with theming a customized user login page in Drupal 7. I could not find a whole lot of documentation for this so the first place I looked was in the core modules folder hoping to find something like user--login.tpl.php that I would be able to copy and put in my theme folder for an override.
-
The Drupal 7 Account pages (user, user/register, user/password), all have the same Title, i.e. "User Account". I just ran up against this issue and my client wanted different / custom titles on these pages.
-
In this article I will show you how to theme a post date in Drupal 7. The goal is to take a boring date printed inline and theme it so it stands out as a design element.
-
I wanted the ability to easily create node galleries and this screencast shows you how to create and theme a node photo gallery using Drupal 7. I will also point out what modules are needed and make reference to those that would have been used in Drupal 6 and are now integrated into core in Drupal 7.
-
Recently I was configuring a Drupal view for a client's website that consisted of the user inputting a zip code and distance to find a store near them. I was using an exposed proximity search filter with a postal code in combination with the Gmap and Location Modules.
-
As a Drupal themers / front end developers, we are always asked to push the envelope of what's possible with design and theming. With Drupal 6, custom block regions are usually added in page.tpl.php which is normally outside of the actual page node content / comments. It would be above, below content or in sidebars typically.
-
Ask 10 Drupal Themers how they would accomplish a task in Drupal and you just might get 10 different answers. Most likely those 10 different ways of accomplishing the task would all be valid and unique. This concept would apply when theming a home page element in Drupal; there are several different ways of going about this.
-
I love it when we discover one of those wonderful Drupal gems that is not well documented and is very powerful in creating some nice Drupal Views theme customization. We were recently tasked with creating an events calendar that has a custom CCK field called "City". There's a drop down menu with a list of cities to assign the event to.
-
I recently developed a Drupal site where each page in the site was based on a custom content type and needed some very specific theming. Although my custom theme was based on 960.gs, I decided to borrow from the zen theme its custom body class implementation to give more meaningful CSS classes to leverage for theming.
-
When I was theming my blog in Drupal, I decided I wanted a better way to customize and display post info such as wording used and the way date was displayed. The first step is to have a look around and see where the code is coming from that renders this info. I viewed the files in my custom theme folder and discovered these few lines of code in node.tpl.php