DrupalBin
Submit Code
About
Recent Posts
Serializable closures
Closures in menu item arguments
dpr($content['field_headshot'])
Fix for Git push error
Проверка
Code
$item['title'] = $item['title'];
Loading specific field
expire give non-aliased paths
Fix for 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
taxonomy
Fix for taxonomy_node_get_terms_by_vocabulary ain't workin dammit
March 2, 2012 - 8:49am —
Sheppard
function
company_tracker_sector_activity_view
(
$nid
)
{
$output
=
''
;
$sector_vocab
=
2
;
$result
=
db_query
(
"SELECT node.nid AS nid,
node.vid AS vid,
node_revisions.teaser AS node_r
taxonomy
taxonomy_node_get_terms_by_vocabulary
Read more
taxonomy_node_get_terms_by_vocabulary ain't workin dammit
March 2, 2012 - 7:55am —
Sheppard
function
company_tracker_sector_activity_view
(
$nid
)
{
$output
=
''
;
$sector_vocab
=
2
;
$result
=
db_query
(
"SELECT node.nid AS nid,
node.vid AS vid,
node_revisions.teaser AS node_r
taxonomy
taxonomy_node_get_terms_by_vocabulary
Read more
Looking to move the field_tags out of $content and into the header area. How can I do that?
August 18, 2011 - 2:27pm — Anonymous
<
div
id
=
"postDateArea"
><?php print $date; ?><
/
div
>
<article<?php print $attributes; ?>
>
<!-- Header Area -->
<?php if
(
!$page && $title
)
: ?>
<header>
<!-- Title and Comment Coun
content
field_tags
tags
taxonomy
Read more
how to put a term description in the header if you don't have the termid in the url
July 14, 2011 - 7:15am — Anonymous
<?php
$view
= views_get_current_view
(
)
;
if
(
$view
-
>
result
[
0
]
)
{
$tid
=
(
int
)
(
$view
-
>
result
[
0
]
-
>
term_data_tid
)
;
$term
=
taxonomy_get_term
(
$tid
)
;
print
(
filter_xss_admin
(
$term
-
>
description
)
)
;
header
php
taxonomy
term description
views
Read more
return all taxo terms for a given nid
July 9, 2011 - 7:58pm — Anonymous
<?php
return
db_result
(
db_query
(
"SELECT GROUP_CONCAT(name SEPARATOR '+') FROM {term_data} td INNER JOIN {term_node} tn ON (tn.tid = td.tid) WHERE nid=%d"
,
arg
(
1
)
)
)
;
?>
taxonomy
Fix for Get Taxonomy for page and display in page.tpl.php
January 26, 2011 - 7:53am — Anonymous
<?php
$taxonomy_terms
=
$node
-
>
taxonomy
;
foreach
(
$taxonomy_terms
as
$term
)
{
if
(
$term
-
>
vid
== 1
)
{
if
(
$term
-
>
tid
== 10
)
{
$catname
=
$title
;
}
else
{
$catname
= $
taxonomy
Read more
why don't I get a term name?
December 31, 2010 - 6:38am — Anonymous
<?php
$vid
=
1
;
$termid
=
(
int
)
arg
(
1
)
;
$tree
=
taxonomy_get_tree
(
$vid
,
$parent
= 0,
$depth
= -1,
$max_depth
=
NULL
)
;
?>
<h1>
<?php
print
t
(
'Products of '
)
.
$tree
[
$termid
]
-
>
name
;
?>
</h1>
taxonomy
taxonomy_get_tree
Preprocessor Get Taxonomy
December 18, 2010 - 5:26pm — Anonymous
function
MYTHEME_preprocess_page
(
&
$variables
,
$hook
)
{
if
(
$hook
==
'node'
||
$hook
==
'page'
)
{
if
(
is_object
(
$variables
[
'node'
]
)
)
{
// get the taxonomy term to put in the content he
taxonomy
Read more
Get Taxonomy for page and display in page.tpl.php
December 18, 2010 - 5:17pm — Anonymous
<?php
$taxonomy_terms
=
$node
-
>
taxonomy
;
foreach
(
$taxonomy_terms
as
$term
)
{
if
(
$term
-
>
vid
== 1
)
{
if
(
$term
-
>
tid
== 10
)
{
$catname
=
$title
;
}
else
{
$catname
= $
taxonomy
Read more
Fix for Remove 'Vocabularies' fieldset
December 18, 2010 - 2:25pm — Anonymous
/**
* Implementation of hook_form_alter().
*/
function
mymodule_form_alter
(
&
$form
,
&
$form_state
,
$form_id
)
{
if
(
$form_id
==
'mobileapp_node_form'
)
{
// Remove 'Vocabularies' fieldset.
fieldset
node form
taxonomy
vocabularies
Read more
1
2
3
4
5
6
next ›
last »