Hey all,
Will insert_view be updated to use on 5.0 ?
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | insert_view.info | 431 bytes | JumpingJack@drupalcenter.de |
Hey all,
Will insert_view be updated to use on 5.0 ?
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | insert_view.info | 431 bytes | JumpingJack@drupalcenter.de |
Comments
Comment #1
JumpingJack@drupalcenter.de commentedYou need the file "insert_view.info" (is attached) in the insert_view directory.
Content of insert_view.info.
Code changes in insert_view.module:
replace $op == 'view' with $op == 'alter' in insert_view_nodeapi
old_code
function insert_view_nodeapi(&$node, $op, $arg) {
if($op == 'view' && function_exists('views_build_view')) {
$node->teaser = _insert_view_substitute_tags($node, 'teaser');
$node->body = _insert_view_substitute_tags($node, 'body');
}
new_code
function insert_view_nodeapi(&$node, $op, $arg) {
if($op == 'alter' && function_exists('views_build_view')) {
$node->teaser = _insert_view_substitute_tags($node, 'teaser');
$node->body = _insert_view_substitute_tags($node, 'body');
}
Ciao
JumpingJack
Comment #2
Julien PHAM commentedSeems it doesn't work well... I tried this, but before putting the insert_view module instead of the view I had the code "[view:actualites=3]" instead, of course, and now that I have put and activate the insert_view module with the modifications given in this thread, I have nothing in my node, no view, nothing.
Comment #3
Julien PHAM commentedMy mistake, it works... that was my view the was messy when I upgraded drupal to 5 version...
Comment #4
gregglesMy attempts at creating a patch for this came out poorly (maybe due to different line endings or something) but the proposed changes worked in my basic testing.
Comment #5
ray007 commentedThe patch works for me too ... maybe it's time to create a new release for drupal 5?
Comment #6
ray007 commentedfirst test with the new release seems to work fine for me, guess it's time to set the status to fixed?
one small nitpick: the insert_view.info file could use a line
package = Viewsso it shows up with all other views-related modules in the modules administration page.
Comment #7
drewish commentedit works fine with 5
Comment #8
(not verified) commented