Download & Extend

Auto-insert into wiki based on admin/settings/content-types setting per node type

Project:Liquid Wiki Engine Project
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:minor
Assigned:sorenp
Status:active

Issue Summary

Currently, the admin/settings/content-types/[node-type] page includes the "Bind node titles to wiki ID" setting. However, unless the page is created based on following a new page link from an existing wiki page, new pages won't be inserted into the wiki.

I would suggest a second option (or update the existing option to include this as well) which controls auto-insertion of new nodes into the wiki. This way, I could choose to make each new blog post (or more likely, wiki page) automatically part of the wiki, which is currently a two step process for new pieces of content.

Comments

#1

I made a hack on that part of the code to forcibly insert stuff into the wiki. It looks like the option in content types sets the default to Bind to wiki or not, but there is nothing for forcing content into the wiki, or getting rid of the "insert into wiki" option. I have something like:

  if (isset($_GET['wikiID'])) {
    $wikiID = $_GET['wikiID'];
    $form['title']['#value'] = liquid_decode($wikiID);
    $form['wiki_insert'] = array('#type'=>'value', '#value'=>'true');
    $form['wikiID'] = array('#type'=>'value', '#value'=>$wikiID);
   
    if (variable_get($type . PREF_LIQUID_BIND_TITLE, PREF_LIQUID_BIND_TITLE_DEFAULT))
      $form['title']['#attributes']['disabled'] = 'true';
  }
  elseif ($form['type']['#value'] == variable_get("liquid_default_type" , story)) {
    $form['wiki']['wiki_insert'] = array('#type'=>'hidden',
'#title'=>t("Insert into wiki"),
'#default_value' => true);
  }
          else {
/*hack     $form['wiki'] = array('#type' => 'fieldset', '#title' => t('Wiki'),
  '#collapsible' => true, '#collapsed' => !isset($_POST['edit']['wiki_insert']));
    $form['wiki']['wiki_insert'] = array('#type'=>'checkbox',
'#title'=>t("Insert into wiki"),
'#description'=>t("Check this box to insert the node upon creation"),
'#default_value' => variable_get($form['type']['#value'].'_bind_title', false));
    if (!variable_get($type . PREF_LIQUID_BIND_TITLE, PREF_LIQUID_BIND_TITLE_DEFAULT))
      $form['wiki']['wikiID'] = array('#type' => 'textfield',
      '#title' => t("Wiki ID"),
      '#description' => 'Wiki page name');*/
  }
}
      } else {
// This is an edit form
if (variable_get($type . PREF_LIQUID_BIND_TITLE, PREF_LIQUID_BIND_TITLE_DEFAULT) && liquid_is_in_wiki($node->nid)) {
  $form['title']['#attributes']['disabled'] = 'true';
}
      }
    }

+1 on the idea, preferably with a user_access or option somewhere for doing this.

#2

Priority:normal» minor
Assigned to:Anonymous» sorenp

This was an option in one of the first versions of liquid (never submitted). If you read through the original Liquid Forum Thread you will find several references to a "force into wiki" feature.

However, for some reason that I don't remember, this feature was removed.

Since the feature is really powerful together with the "bind title to wiki_id" feature this would probably be a good idea to look into...

...in time...

Thanks for your feedback!

(try out the new 5.1 version :D )

#3

Version:4.7.x-1.x-dev» 5.x-1.x-dev

It would be excellent if you could configure Liquid to auto-insert specific content types into the wiki. When setting up my site, I created a separate content type of "Wiki Page", but when users use this content type to create content, they frequently forget to check the "insert into wiki" box and then wonder why it's not in the wiki. So, probably in the Liquid configuration, I'd like to be able to tell Liquid to auto insert this.

Alternatively, being able to set the "insert into wiki" option as a default for that content type would also suffice...similar to how one can select default options such as "Published" or "Create new revision" when setting up a content type. I'm not sure which of these methods would be easiest to implement or most flexible. Possibly the latter?

#4

First off, thanks for the great module.

I concur, that my users lack the skills to click the 'add to wiki' checkbox. This is true regardless of the fact that the user is confronted with clear and simple instructions to do so, 3 times before they actually submit their article.

Thanks.

#5

i wish auto-insert feature too. thanks for this nice module!

#6

I can't believe that this isn't a feature yet. What's the point of a wiki plugin if it's hard to add pages to the Wiki?

I'm setting up a wiki/forum website, and I modified liquid.module to check "Add to Wiki" by default, but now forum topics are added to the wiki by default too unless "Add to Wiki" is purposely unchecked.

Liquid is really unusable without this feature.

nobody click here