DrupalBin
Submit Code
About
Recent Posts
TwitterFeed for D4D review
text
rewrite
Module to overrule the save settings of the "new node" form
Code
apidoc
Empty DateTime Object
Fix for listcars_manufacturer.module
listcars_manufacturer.info
listcars_manufacturer.module
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
test
theme
user
views
more tags
Home
CCK
Fix for Function to add taxonomy and content_taxonomy to a node object
August 25, 2010 - 1:03pm — Anonymous
// Sample usage:
$node
=
new
StdClass
(
)
;
$node
-
>
type
=
"story"
;
$node
-
>
title
=
"Hello world"
;
$tags
=
array
(
'red'
,
'white'
,
'blue'
)
;
my_nodeobject_add_content_taxonomy
(
&
$node
, 1,
$tags
,
'create'
,
CCK
content_taxonomy
Drupal 6
node_save()
Read more
Function to add taxonomy and content_taxonomy to a node object
August 25, 2010 - 1:01pm — Anonymous
/**
* Modifies a node object adding taxonomy terms and, optionally, modifying a
* content_taxonomy type field.
*
* @param <type> $node
* A node object.
* @param <type> $vid
* The voc
CCK
content_taxonomy
Drupal 6
node_save()
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 change CCK field path in Rules when node is saved - use Custom PHP
August 14, 2010 - 8:07pm — Anonymous
I put my own queries into the Custom PHP field
//this is the path to the actual uploaded to pass to the encoding.com script
$_SESSION
[
'videoup'
]
=
'[node:field_video-filefield-filepath]'
;
//upd
CCK
encoding.com
rules
Read more
change CCK field path in Rules when node is saved to receive the encoding.com transcoded file - doesn't change path
August 14, 2010 - 12:57pm — Anonymous
return
array
(
0 =
>
array
(
'fid'
=
>
'[node:field_video-filefield-fid]'
,
'filepath'
=
>
'sites/default/files/transcoded/[node:field_video-filefield-filename].flv'
)
,
)
;
CCK
encoding.com
rules
Using DATE fields on custom module
August 13, 2010 - 6:56pm — Anonymous
function
uc_otf_form_node_type_form_alter
(
&
$form
)
{
if
(
uc_product_is_product
(
$form
[
'#node_type'
]
-
>
type
)
)
{
if
(
module_exists
(
'content'
)
)
{
$fields
= content_types
(
$type
-
>
type
)
;
CCK
date
ubercart
Read more
Fix for fix non-sequential cck deltas
June 28, 2010 - 6:57pm — Anonymous
<?php
// Basically rewrite this to get an ordered list of nid, vid, delta from the content type or field that is insufficient.
$deltas
=
db_query
(
"SELECT cfgi.nid, cfgi.vid, cfgi.delta FROM co
CCK
Read more
fix non-sequential cck deltas
June 28, 2010 - 6:38pm — Anonymous
// Basically rewrite this to get an ordered list of nid, vid, delta from the content type or field that is insufficient.
$deltas
=
db_query
(
"SELECT cfgi.nid, cfgi.vid, cfgi.delta FROM content_fie
CCK
Read more
use a CCK field to switch node templates
April 30, 2010 - 8:58am — Anonymous
// ----------------------------- node templates
// $vars['template_files'] holds an array of template suggestions,
// from most generic to most specific.
// Here we add our own suggestions
CCK
template
theme
Read more
Fix for Updating a nodereference CCK field using node_save()
April 25, 2010 - 7:29pm —
sepehr
...
// Getting current reference delta.
$current_delta
=
db_query
(
"SELECT delta FROM {content_field_movie_node_ref}
WHERE vid = '%d'
ORDER BY delta DESC
LIMIT 1"
,
$existing_movie
-
CCK
nodereference
update
Read more
1
2
3
4
5
6
7
8
9
next ›
last »