DrupalBin
Submit Code
About
Recent Posts
trace
28 min 1 sec
ago
Fix for Code
7 hours 15 min
ago
Fix for Code
7 hours 15 min
ago
Code
7 hours 21 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
node
node suggestions
November 12, 2008 - 5:01pm — Anonymous
function
_phptemplate_variables
(
$hook
,
$vars
)
{
if
(
$hook
==
'node'
)
{
// Here is the way to switch to a different node-<something> template based on node properties.
node
suggestion
template
Add new comment
Read more
Node suggestions
November 12, 2008 - 12:23pm — Anonymous
if
(
$hook
==
'node'
)
{
$vars
[
'template_files'
]
=
array
(
'node-'
.
$vars
[
'node'
]
->
nid
)
;
return
$vars
;
}
node
suggestion
suggestions
template
Add new comment
Change tag based on date
September 11, 2008 - 3:55pm — Anonymous
UPDATE
{
term_node
}
SET
tid =
30
WHERE
tid =
29
AND
nid
IN
(
SELECT
nid
FROM
{
node
}
WHERE
changed >
0
AND
DATE_SUB
(
NOW
(
)
, INTERVAL
30
DAY
)
> changed
)
node
tags
term_node
not able to make custom node entry page
September 10, 2008 - 5:34pm — Anonymous
function
cckwizards_perm
(
)
{
return
array
(
'access wizdeadlines'
,
'access wizevents'
)
;
}
function
cckwizards_menu
(
$may_cache
)
{
$items
=
array
(
)
;
if
(
$may_cache
)
{
CCK
custom
module
node
Read more
Fix for save to ftp
September 3, 2008 - 3:09am — Anonymous
/**
* Implementation of hook_nodeapi().
*/
function
savetoftp_nodeapi
(
&
$node
,
$op
,
$teaser
,
$page
)
{
switch
(
$op
)
{
case
'insert'
:
case
'update'
:
$html_title
=
$node
->
title
;
ftp
node
save
Read more
Fix for module for saving a node to ftp
September 3, 2008 - 1:46am — Anonymous
/**
* Implementation of hook_form_alter. Define the form for saving to ftp.
*/
function
savetoftp_form_alter
(
$form_id
, &
$form
)
{
if
(
$form_id
==
'regpage_node_form'
)
{
ftp
node
save
Read more
module for saving a node to ftp
September 2, 2008 - 4:12pm — Anonymous
/**
* Implementation of hook_form_alter. Define the form for saving to ftp.
*/
function
savetoftp_form_alter
(
$form_id
, &
$form
)
{
if
(
$form_id
==
'regpage_node_form'
)
{
ftp
node
save
Read more
Example of avoiding $content and themeing $node sectins directly
August 5, 2008 - 9:28am — Anonymous
<div
class
=
"node<?php print ($sticky) ? "
sticky
" : "
"; ?> blog"
>
<?php
if
(
$page
==
0
)
:
?>
<h1
class
=
"title"
><a href=
"<?php print $node_url ?>"
title=
"<?php print $title
CCK
node
theme
Read more
Add next link to node
May 25, 2008 - 6:11am — Anonymous
<?php
function
next_node_link
(
$type
,
$object
,
$teaser
=
FALSE
)
{
$links
=
array
(
)
;
if
(
$type
==
'node'
&&
isset
(
$object
->
nid
)
)
{
if
(
!
$teaser
)
{
next link
node
template
Read more