02
Aug
2015

Apply patch in NetBeans

Posted by hamu

NetBeans

To apply patches to code using NetBeans:

Open the project and right-click on the file or folder you want to patch.
Tools > Apply Diff Patch...
Browse to and select the patch file you want to apply. > Click "Patch".

Quoted from Drupal.org site

I used it to apply patches on Views Calc module. It worked only when I initiated the action from the file, and not from the module's folder.

Tags: 

Need: I have a content type with a File field. When this field is displayed, I want it to show only icon without any text.
The current formats are either "Generic file" (icon + file name), "Table of files" (icon + file name + size) and "URL to file" (the entire file's URL).
I want to add a format "File icon", that will display an icon that utilizes as a link to the file.

What I did:
I created a very simple module called "File icon". I placed the file_icon directory in sites\default\modules

Problem: Site is multilingual, and I use translation for select list values. It works fine on the input data form (edit mode), but on "view", the saved values are shown in English and not in site's language.
Solution:
1. Go to the content type's Manage Display tab.
2. Change the Format value, next to the select list fields from 'Default' to 'Default translated'

I found the solution here: https://drupal.org/node/1101128

01
Sep
2013

Duplicate existing data field

Posted by hamu

Duplicate existing data field of a content type

  1. Edit your content type: Go to Structure » Content types . On the MANAGE FIELDS tab, Add new field. Use the same FIELD TYPE as in the field you want to duplicate. Save
  2. Still in content types: Go to the MANAGE DISPLAY tab, and verify that the new field is visible (it is not displayed under Hidden)
Tags: 

Pages