DrupalBin
Submit Code
About
Recent Posts
Code
Fix for Fix for Code
Fix for Code
Code
Node type whitelist
an axe coach accessories
coach purses married
Fix for de las ghd alturas
de las ghd alturas
Code
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
image
Code to change image style to the image style set in another field.
January 9, 2012 - 5:39pm — Anonymous
function
mymodule_field_display_alter
(
&
$display
,
$context
)
{
// If the field is an image, then change the display settings depending on the value of the image size choice.
if
(
$display
[
'type'
]
=
fields
image
image field
Read more
Print Image URL
November 21, 2011 - 12:45pm —
scottrouse
/**
*
* I'm trying render just the URL of an image from a field on a node in D7.
*
* The field is named "field_leaderboard_img" and the image style is "leaderboard"
*
*/
<?php
print
ima
d7
image
Read more
Show all IMAGE fields used in a content type to select - not working
August 15, 2010 - 11:41pm — Anonymous
if
(
module_exists
(
'content'
)
)
{
$fields
= content_types
(
$type
-
>
type
)
;
$fields
=
(
array
)
$fields
[
'fields'
]
;
$options
=
array
(
''
=
>
t
(
'None'
)
)
;
foreach
(
$fields
as
$field_name
=
>
CCK
date
image
module
ubercart
Read more
Fix for Image to imagefield converter
March 19, 2010 - 9:39pm — Anonymous
php
/**
* @file
* Migrate all image.module nodes to imagefields in Drupal 6.
*
* PREREQUISITES
* -------------
* - You must create a single imagefield field to which all your images will be mig
CCK
image
imagefield
Read more
Fix for Error on update to Image module 2.x
July 29, 2009 - 5:45pm — Anonymous
Drupal database update
user warning: Duplicate entry '181-preview' for key 1 query: INSERT INTO image SELECT DISTINCT f.nid, f.fid, f.filename FROM files f INNER JOIN node n ON f.nid = n.nid WHERE n.
image
Read more
Image to imagefield converter
June 20, 2009 - 3:07pm — Anonymous
php
/**
* @file
* Migrate all image.module nodes to imagefields in Drupal 6.
*
* PREREQUISITES
* -------------
* - You must create a single imagefield field to which all your images will be mig
CCK
image
imagefield
Read more
Fix for Overview of new CCK Gallery module
June 14, 2009 - 5:22am — Anonymous
Dependencies:
CCK
Nodereference
Imagefield
Filefield
Content Copy
Views
Content Access
ACL
ImageCache
Image API
On install:
Set up default CCK content type for Image (imagefield and
6.x
drupal
gallery
image
module
Read more
Error on update to Image module 2.x
April 10, 2009 - 3:00pm — Anonymous
Drupal database update
image
Read more
Overview of new CCK Gallery module
January 22, 2009 - 7:34am — Anonymous
Dependencies:
CCK
Nodereference
Imagefield
Filefield
Content Copy
Views
Content Access
ACL
ImageCache
Image API
On install:
6.x
drupal
gallery
image
module
Read more