This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

letter to the editor module

We're releasing our modifications to the Letter to the Editor tool originally created by Downhill Battle Labs. Changes to the module include several functions which make management easier for the admin of the Letter to the Editor, as well as making the module compatible w/ Drupal's db abstraction layer. Using the Letter to the Editor tool as an additional module to Drupal, the admin can easily assign talking points to appear along-side the letter form, is given the ability to change text to explain the mission of the campaign, the addition of a graphical and numeric display of the number of letters sent, the addition of counting to which individual papers letters have been sent, and finally the ability to use a slightly modified version of the contact directory module to edit records in the paper database via the website interface.

A lot of work remains. First, the module is not very Drupal or CivicSpace-ish. Development standards are not met – these need to be met to make continued development easier. There are definite design limitations – we designed this version to work on a page within Drupal that does not use any blocks (no sidebars) to take advantage of horizontal space. Additionally, an external php mailer is used where Drupal’s built in capacity to send emails should probably be harnessed. Lastly, the tool only lets you run one campaign. The need to run muliple campaigns with a full feature tool set exists, but it needs to be spec-ed and coded. Anyone interested?

nobody use tinymce?

I have posted a question few day ago but i have no answer and a tried again

I have installed tinymce and select advanced theme but i cannot see the plugin button.
The file example3.htm include full advanced theme and this is thr code:
....................................................
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu",
theme_advanced_buttons1_add_before : "save,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
external_link_list_url : "example_data/example_link_list.js",

Things to know when making your own forms

... That took a while to find!

OK, some lessons include:

Avoid and declare Globals

Occasionally some of the libraries set global variables, some of with are then used by other libraries. This is of course to be avoided, doubly so now we are in a Drupal context where there's lots of overhead going on.
ALL GLOBALS MUST BE DECLARED EXPLICITLY at the top of the file (as sometimes we are running inside an eval() and file scope variables may not be global scope.

ALL GLOBALS SHOULD USE A NAMESPACE to avoid possible conflict with the environment.
global $param;
should be
global $MYMODULE_param;
... everywhere.

Beware of reserved parameters

You should not declare form parameters called:

  • q
  • destination
  • edit

unless you are intentionally messing with the Drupal functioning.
There may be more on this list - even modules may add some - can someone publish them?

Image module, simple question!

Hey all, just a simple question for all the developpers that i saw on a lot of Drupal websites.

How do you do to make the image module, so that when you click on "View original" that it displays the original image in a new window...? instead of putting the image in the whole frame... and even better could we be able to customize the new window, and instead of having a "view original" link could we just have the user click on the Preview image and that would open a new window with the wallpaper?

Thanks alot in advance for your help!

taxonomy_select_nodes() not working if 'administer nodes' not set

I've run into a very bizarre bit of improper functionality that I've not been able to track down. I am trying to get a list of all nodes in a given vocabulary, grouped by their taxonomy terms. Seems reasonable, and I've done it before. Here's the code:


function _resource_list() {

  $resources = array();

  $terms = taxonomy_get_tree(5, 0, -1, 1);

  if ($terms) {
    foreach ($terms as $term) {
      $nodes = taxonomy_select_nodes(array($term->tid), 'or', 0);
      $node_list = array();
      while ($resource_node = db_fetch_object($nodes)) {
            print "Found a node!";
	    $node_list[] = $resource_node;
      }
      print_r($node_list);
  }
}

(Plus various return stuff, but I'm trimming out everything not related to the problem.)

If the current user has 'administer nodes' permission, then the print_r() call spits out an array with the correct nodes in it. If the current user does not have 'administer nodes' permission, then $node_list is empty. taxonomy_select_nodes() and db_fetch_object() don't check user_access() anywhere, though.

All nodes in that category are of type "resource" (a custom node type). The hook_access() for that node type is trivially simple:


function resource_access($op, $node) {
  global $user;

 print "<pre>Op: $op</pre>\n";

 return true;
}

According to the print statement, though, it's never being called anyway (as it shouldn't be).

Python and Drupal?

Hi, I'm wondering if there is a way to develop Drupal modules in Python. Thanks.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions