Hi

Thanks for great module - I have this awkward problem :-(

My problem: Block edits links are sent in simplenews mails - both html and text:

 * [Edit]
   http://mydomain.net/node/2/edit?destination=node%2F13%2Fedit
 * [Delete]
   http://mydomain.net/node/2/delete?destination=node%2F13%2Fedit
 * [Edit type]
   http://mydomain.net/admin/content/node-type/politik?destination=node%2F13%2Fedit
 * [Manage fields]
   http://mydomain.net/admin/content/node-type/politik/fields?destination=node%2F13%2Fedit
 * [Display fields]
   http://mydomain.net/admin/content/node-type/politik/display?destination=node%2F13%2Fedit

Why: I have created a newsletter type with cck node referer, which shows node teasers in mails

Current solution: Turn off block edit for teasers - which is a sad solution

Idea for new feature: Block edit links are integrated with simplenews and links are turned off for simplenews mails

:-) Bo

Comments

hanno’s picture

Category: feature » bug

I have the same issue in combination with simplenews newsletters.
Edit links are sent to the subscribers when you have nodes included bij cck_nodereference and the person who sends the newsletter has node administration rights.

hanno’s picture

#789804: can we add a hook_perm() for viewing block edit links partly solved this problem because permissions can be set.

hanno’s picture

I suggest we check the var build_mode to accomplish this. We could add a check in function block_edit_visible (line 243)

      if ($node->node_build =="email_HTML")
       return FALSE;

This solution needs testing.

hanno’s picture

Found the solution.
Below a patch that disallow the edit links to appear on print, rss, preview and other build modes. Edit links only makes sense in normal (display) mode.

line 241

 // Content type settings.
      $node = $vars['node'];
+      if (isset($node->build_mode) && !($node->build_mode===NODE_BUILD_NORMAL)) 
+     //NODE_BUILD_NORMAL is 0, and ('whatever' == 0) is TRUE, so we need a ===.
+       return FALSE;
      $allowed_nodes = variable_get('block_edit_content_types', 
joelstein’s picture