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

How to turn off block column in module

I am looking to do something similar to what is done with this forum module. I have written (with the help of this forum) a small module for use on my site. I need to show a larger table than my theme allows. I would like to "turn off" the right side blocks when this module is called and allow the center block to use that area so that essentially while in that module the template changes from a 3 column to a two column display.

I hope this makes sense. Any help as always is appreciated.

No includes before hook_init

Copy of this issue for quick feedback.
--
I am having a trouble developing a module. In my hook_init() function, I call both the function drupal_get_path, and theme_add_style. Whenever I am logged into the admin user account, everything works fine, but when I am anonymous, it comes up with a fatal error because it can't find either function. In drupal 4.6, I can call require_once("includes/common.inc"), but in 4.7, theme_add_style is not found still.

Associate filter to a specific node type?

Hello,

Well, this has been brought up a few times before, but I think my case is a little different.
I developed node_article.module. Now, I need to make it work with our own magazine!

At Free Software Magazine, we use our own article format for a number of reasons (the main one being automatic composition). An example of an article is at the bottom of this message.

Now, here is what I need to do:

1) Create a new filter which transforms the XML below into HTML

2) Create a new input format which uses the above filter

3) Make this filter available ONLY for node_article nodes

4) Make this filter the ONLY option for node_article nodes

Why 3)? Well, because in the site I will also have blogs, and probably won't want people to input their blogs using the article format.
Why 4)? Because I definitely won't want authors to hand in articles in any other format

For what I see, the input format is set by role, rather than node type. Is this _always_ the case? If the answer is "yes", then I'll need to hack node_article so that it only accepts a specific input type. But this won't solve 3) (that is, a person who is a blogger AND an author will be able to hand in blogs using the article format).

Any ideas about this one?

Thanks a million!

-------
Example of an article:

<article>

<contents>

<p>This is the article's introduction. This paragraph will display as a blurb on the home page or wherever else the article will display. It's crucial to make this section interesting, so that your readers won't stop reading the article.</p>

Review of a module?

Hello,

I wrote node_article.module, a complete module that manages an article's workflow with author, editor, editor in chief and copyeditor. Everybody a part from chief and author are optional.

It's been created to work well while creating Free Software Magazine.

why should I use theme()...? PLUS, how to you make additional info available to PHPtemplate?

Hello,

As most of you know, I've written node_article.
My question now is about themes.

I wrote a function called:

theme_node_article_editing_info($node)

I followed the node_sample template to start with.
Then, a function calls:

Is it OK to have non-db values in node_load?

Hello,

I have just finished developing node_article.
Now: in the node, I store the editor's uid. However, when I deal with the node I want to deal with the editor's login name.
So, in node_article_load I put:

 // Work out the node_id for the chosen editor
  if($additions->editor_uid == 0){
    $additions->editor_uid_name='';
  } else {
    $tmp=user_load( array('uid' => $additions->editor_uid));
    if(!$tmp){
      $additions->editor_uid_name="ERROR LOADING USER '".$additions->editor_uid."'!";
    } else {
      $additions->editor_uid_name = $tmp->name;
    }
  }

then, in node_article_update I have:

  // Work out the node_id for the chosen editor
  if($node->editor_uid_name == ''){
    $node->editor_uid=0;
  } else {
    $tmp=user_load(array('name' => $node->editor_uid_name));
    $node->editor_uid=$tmp->uid;
  }

Is this structurally OK?

In this function, I also create:

$additions->editing_finished

This variable will check if the author and the editor are assigned AND they is OK with the current version of the article - if that's the case, $additions->editing_finished is set to one. This way, people loading the node know that the editing is finished.
Again: is this structurally OK?

Finally, I need an HTML "editing string", which give a LOT of editing information in a very tiny string (using colour codes and font sizes, it tells you if the author, the editor and the editor in chief are OK, who is currently in control, and so on).

Pages

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