- π«π·France fgm Paris, France
And for a modern idea inspired by this: https://www.youtube.com/watch?v=GAMo4kQK-Io
[Moving mailing list discussion here for posting patches in the future.]
I'm talking about the displaying of nodes using PHPTemplate. Right now hook_nodeapi($op = 'view' or 'links' etc.) has a lot of modules adding to the body like this
$node->body .= $output;
Maybe there is a module_setting to put it on TOP of the body or on the BOTTOM. But most modules just append. When displaying the node, all of that comes into $content in node.tpl.php. So if you want to configure that, you have to redo the whole body yourself. Then, if you install another module that adds to the node body through hook_nodeapi you have to go manually add that to your node.tpl.php for each one.
If we constructed it like FAPI, with weights, etc. We could allow modifications of that right before calling render_body($node) or whatever. So hook_nodeapi('view') could do something like
$body['mymodule']['extra_stuff_added_to_node'] = array(
'#type' => 'markup', // Any other possible values or is it always markup? What about adding quick forms to send to friend etc.?
'#value' => '
',
'#weight' => 10, // or could even have variable_get('mymodule_extra_stuff_added_to_node_weight, 10);
);
We could even add comments this way and have much more flexibility to configure when, where, and how items are added to the node body. Also, configuring these options (value, weight) in _settings would be that much easier. Then, with hook_body_alter we can mess with the weights, values, remove just this ONE item without manually reconstructing $content in our node.tpl.php. Also, this could be applied to links I believe.
Patch coming sometime soon...
Fixed
5.0 β°οΈ
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
And for a modern idea inspired by this: https://www.youtube.com/watch?v=GAMo4kQK-Io