DrupalBin
Submit Code
About
Recent Posts
Code
8 hours 36 min
ago
Code
12 hours 53 min
ago
Logging without output buffer trouble
13 hours 45 min
ago
Code
14 hours 34 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
Fix for Code
View
Download
Fix
December 1, 2008 - 8:34am —
stborchert
<?php
if
(
(
arg
(
0
)
==
'node'
)
&&
is_numeric
(
arg
(
1
)
)
)
{
$nid
=
arg
(
1
)
;
$nd
=
node_load
(
array
(
'nid'
=>
$nid
)
)
;
//print $nid; // show me your nid!
print
'nid: '
.
$nd
->
nid
;
if
(
module_exists
(
'og'
)
&&
(
node_access
(
'update'
,
$nd
)
==
TRUE
)
)
{
$group_node
= og_get_group_context
(
)
;
$gid02
=
$group_node
->
nid
;
$gid
=
(
int
)
$gid02
;
if
(
$gid02
===
null
)
{
$gid
=
0
;
}
$output
.=
"irgendwas"
;
print
$output
;
}
}
?>
Comments
Post new comment
Your name:
E-mail:
The content of this field is kept private and will not be shown publicly.
Homepage:
Comment:
*
Web page addresses and e-mail addresses turn into links automatically.
Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockcode>
You can enable syntax highlighting of source code with the following tags:
<code>
,
<blockcode>
. Beside the tag style "
<foo>
" it is also possible to use "
[foo]
".
Lines and paragraphs break automatically.
More information about formatting options
Comments
Post new comment