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
taxonomy
hook_nodeapi
July 19, 2010 - 7:06pm — Anonymous
function
hook_nodeapi
(
&
$node
,
$op
,
$a3
=
NULL
,
$a4
=
NULL
)
{
switch
(
$op
)
{
case
'insert'
:
$node
->
taxonomy
=
array
(
1
=>
taxonomy_get_term
(
1
)
)
;
node_save
(
$node
)
;
}
b
taxonomy
Read more
Select vocab by name.
July 13, 2010 - 11:26am — Anonymous
/**
* Utility function to select a vocabulary by name rather than vid.
*
* @param $name
* The name of the vocabulary to retrieve.
*
* @return
* The $vid of the vocabulary name refer
taxonomy
Read more
Code
July 1, 2010 - 5:05am —
derhasi
$name
=
''
;
foreach
(
$node
-
>
taxonomy
as
$item
)
{
if
(
$item
-
>
vid
== 10
)
{
$name
=
check_plain
(
$item
-
>
name
)
;
break
;
}
}
taxonomy
Fix for Fix for Fix for Fix for Gets list of taxonomy terms
April 27, 2010 - 12:43pm — Anonymous
<?php
$vid
=
3
;
// Set the vid to the vocabulary id of the vocabulary you wish to list the terms from
$items
=
array
(
)
;
$result
=
db_query
(
'
SELECT tn.tid,
( SELECT count( x.tid )
FROM term_n
taxonomy
Read more
Fix for Fix for Fix for Gets list of taxonomy terms
April 27, 2010 - 12:40pm — Anonymous
<?php
$vid
=
3
;
// Set the vid to the vocabulary id of the vocabulary you wish to list the terms from
$items
=
array
(
)
;
$result
=
db_query_range
(
'
SELECT tn.tid,
( SELECT count( x.tid )
FROM
taxonomy
Read more
Fix for Fix for Gets list of taxonomy terms
April 27, 2010 - 12:38pm — Anonymous
<?php
$vid
=
3
;
// Set the vid to the vocabulary id of the vocabulary you wish to list the terms from
$items
=
array
(
)
;
$result
=
db_query_range
(
'
SELECT tn.tid,
( SELECT count( x.tid )
FROM
taxonomy
Read more
Fix for Gets list of taxonomy terms
April 27, 2010 - 12:35pm — Anonymous
<?php
$vid
=
3
;
// Set the vid to the vocabulary id of the vocabulary you wish to list the terms from
$result
=
db_query_range
(
'SELECT tn.tid, (
SELECT count( x.tid )
FROM term_node x
LEFT
taxonomy
Read more
Gets list of taxonomy terms
April 27, 2010 - 1:03am — Anonymous
<?php
$vid
=
3
;
// Set the vid to the vocabulary id of the vocabulary you wish to list the terms from
$items
=
array
(
)
;
$terms
=
taxonomy_get_tree
(
$vid
)
;
foreach
(
$terms
as
$term
)
{
$count
taxonomy
Read more
Enable WYSIWYG for term descriptions?
January 27, 2010 - 10:48am — Anonymous
function
my_module_form_alter
(
&
$form
,
$form_state
,
$form_id
)
{
switch
(
$form_id
)
{
case
'taxonomy_form_term'
:
$form
[
'description'
]
[
'#WYSIWYG'
]
=
TRUE
;
break
;
}
//switc
taxonomy
Read more
Fix for Remove 'Vocabularies' fieldset
January 14, 2010 - 3:15am — Anonymous
/**
* Implementation of hook_form_alter().
*/
function
mymodule_form_alter
(
&
$form
,
&
$form_state
,
$form_id
)
{
if
(
$form_id
==
'nodetype_node_form'
)
{
// Remove 'Vocabularies' fieldset.
fieldset
node form
taxonomy
vocabularies
Read more
1
2
3
4
next ›
last »