I believe there is an error in the code as show title checkbox does not seem to do anything. In protected_node.redirect.inc line 85 and protected_node.fork.inc line 130 you have
$node_title = variable_get('protected_node-'. $node->nid .'-show_title', FALSE);
if ($node_title) {
// embellish the title with double quotes
$node_title = '"' . $node_title . '"';
}
I believe it should be the following
$node_title = $node->protected_node_show_title;
if ($node_title == 1) {
// embellish the title with double quotes
$node_title = '"' . $node->title . '"';
} else {
$node_title = '';
}
If I'm correct I can submit a patch.
Comments
Comment #1
jphelan commentedHere's a patch
Comment #2
jphelan commentedAlso something worth considering. If you override the description then the checkbox does not do anything. So it might be worth displaying the title somewhere else rather than in the description, perhaps as a heading above the description.
Comment #3
jphelan commentedBTW great module!
Comment #4
AlexisWilke commentedjphelan,
Good catch. The TODO was actually saying that the variable needed to change with the $node parameter, but I guess at the time I moved the parameter to the node I completely forgot about the test in those two places.
Note that the protected_node_show_title variable is viewed as a Boolean, so the following was good enough:
Also it looks like the views were using the wrong word. I switch the "yes"/"no".
In regard to having the description overwriting the title, I use the token module to palliate. You can use something like [node:title] and get the title in the description. However, I agree that the interface does not reflect that...
Thank you.
Alexis Wilke
Comment #5
jphelan commentedNice.
Yeah I was using token to start with which I think is what confused me, because the checkbox won't hide the title if you're using token. Not a big deal, and I'n not sure there's an easy solution other than finding and removing [node:title] if it's not checked, but that to could confuse people too if they're expecting it to be there and it is not.
Anyway, great module, thanks for you work!