You are here

PHP

Error message

  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; views_display has a deprecated constructor in require_once() (line 3047 of /homepages/3/d267786686/htdocs/pangus/includes/bootstrap.inc).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; views_many_to_one_helper has a deprecated constructor in require_once() (line 113 of /homepages/3/d267786686/htdocs/pangus/sites/all/modules/contrib/ctools/ctools.module).

Drupal 7 - Simple Settings and Configs

Creating content types for pleasure and fun sometimes means that you need to have fields populated with data when first presented to the author during node creation. This functionality usually involves two things: someplace to create/modify those default values and injecting that value into your node creation forms. For this example, we're going to create a simple content type with a title, body, and an extra textfield and we'll populate that textfield with a value we specified using a settings form we added to our very own configurations section.

Tags: 

Drupal 7 - Making Your Own Tokens

According to the Drupal API:

Tokens are placeholders that can be put into text by using the syntax [type:token], where type is the machine-readable name of a token type, and token is the machine-readable name of a token within this group.

Tags: 

Drupal 7 - Adding Roles to Users Dynamically

This post builds upon a previous post: Drupal 7 - Adding Roles

Tags: 

Drupal 7 - Adding Roles

This post builds upon a previous post: Drupal 7 - A Simple Content Type: Permissions & Access

Roles and permissions are central to managing user access to content within Drupal. Out of the box Drupal has three user roles defined:

Tags: 

Drupal 7 - Adding Vocabularies and Terms

In a couple of the Simple Content Type examples we have done so far there has been a required helper module which creates and adds a vocabulary with some terms using the Taxonomy module. Creating vocabularies and terms through code is a fairly straightforward process. We will use two hooks and several helper functions to handle all the lifting.

Tags: 

Drupal 7 - An Annoying Error: Part the Second

This post refers to an earlier post titled Drupal 7 - An Annoying Error in which I claim to have found a fix to the annoying "comment_node_type_delete()" errors I would get when uninstalling a custom built content type. The solution I found works well when having a base value of "node_content" suits the method you are using to build your content type, such as using the Field API, but if you roll your own base type and delete your custom content type during uninstalling then you are bound to see this from time to time:

Tags: 

Pages

Subscribe to PHP