I tried 2 ways of selecting nodes with no success.

First Way: in the menu: Content Management>simplenews content selection creator. but what i have is a list of nodes too large and i don't know what criteria is using to show those nodes my sites has a large number of nodes (larger than the large list shown). Would like to know how to select or sort the nodes appearing in this list. Using in this ways an selecting some of the nodes shown, at least the newsletter is properly created.

Second way: I created a view and selected the nodes using views bulk operations and the option of create newsletter. Here the view is ok. The nodes shown are controlled and i can use filters etc, but when selecting the nodes and selecting create newsletter, I confirm the selected rows and, when the newsletter creation interface pops up i can't see any node/link in the body

Many thanks

Comments

dtrdewaele’s picture

Hello,

First way.
I'm working on that list. I'll add a few filter options in the next days.

Second way.
The selection of the nodes with views works with a jquery ajax when you select the node. Do you have Firebug running? Can you see something happening in the console window of the module? Is the view using editable fields?

egarias’s picture

I made some tests:
With the second way (views). I first used a views already available and included create newsletter in the bulk operations this doesn't work. Then i create a views from scratch and then i just selected create newsletter and then it works ok.
But, when today updated to views bulk operations 6x1.9 in the newsletter i only have "read more.." neither the title nor the teaser, so i come back to the previous version and it's Ok.

dtrdewaele’s picture

Thx for your tests.
I'm going to check the compatibility with views_bulk_operations newer versions in the next few days.

During development, i had some strange behavior with editable fields but it disappeared after a cache refresh.

I'll keep you posted.

hokumboy’s picture

Same problem. Only the read more link.

xxm’s picture

I've downgraded views bulk operations 6x1.9 to 6x1.8 an it works with nodes but not with own cck fields. They does'nt appear in the newsletter.
Are there any solution for that?

dtrdewaele’s picture

You have to override the theming function to add you own CCK fields to the newsletter. Full nodes are loaded, so you can change whatever you want for each newsletter item.

mbarcelo’s picture

Hello coworks_dieter,

Can you give me an example of overriding the theming function to add a CCK field like an imagefield. I've been trying to insert one imagefield/imagecache of my "news" nodes but I didn't get for myself.

Many thanks

dtrdewaele’s picture

function yourtheme_scs_node_output($node) {
  $output = '';
  	
  //Here you have a full node so you can do something like this.
  $output .= $node->field_example[0]['value']

  //To do this with imagecache, you have functions like
  $output .= theme('imagecache', 'I think here goes the preset', $field->field_myimage[0]['value'];
  	
  return $output;
}
dtrdewaele’s picture

Status: Active » Closed (fixed)

Problems with VBO should be fixed.

d.sibaud’s picture

For me nothing happen, I override the theme function as follow:

function mytheme_scs_node_output($node) {
	$output = '';
	$output .= '<div id="node_' . $node->nid . '" class="node">';
	$output .= '<h1>' . l($node->title,'node/' . $node->nid)  . '</h1>';
	$output .= '<p>'. node_teaser($node->body) . " ... [" . l(t('Read more'), 'node/' . $node->nid) . ']</p>';
	$output .= '</div>';
	
	return $output;
}

flush caches and using the admin/content/scs_node_selection ui to create the newsletter but the new theming function isn't overriding at all.

bisonbleu’s picture

I was able to implement coworks_dieter's 1st suggestion (#8)
$output .= $node->field_example[0]['value'].

I'm very happy because it's my very first overide experience. Feels like the sixties again... ;-)

Seriously, I'm using this code to override simplenews_content_selection's theme_scs_node_output function for a Simplenews newsletter issue I'm trying to theme (a saga in itself). I'm overriding inside my theme's template.php file (not sure wether this is good or evil) where the function is renamed phptemplate_scs_node_output. Found some help here.

Could it be the "mytheme" part of your function call?

dtrdewaele’s picture

If mytheme is the name of your theme you can override the scs theme function with mytheme...
If you theme is called foobar, you have to create function foobar_scs_node_output($node) in template.php.

I can give more examples here, but I think you know what I mean ;)

Template.php is the good place to do this ;)