All in one mini-features
This module is a concatenation of many little things that I like to have and usually would have to create a "mini-module" to get them to work.
The idea is simple: if I wanted to have a Delete tab on my nodes, a second Submit button in my node/edit/* pages, have a text field for the minimum number of words to enter in a node, etc. All those things are very easy to do, but creating a new separate module for each one of them is tedious and uses much more resources on my Drupal installations.
Please, don't hesitate to post issues about features you'd like to have. If it is for a 3rd party module that I use, I'll add it. If it is a module I do not use, then we'll need to have several others test the change before I integrate it. But many of those changes are against the core module anyway since extra features for 3rd party modules are usually added to those modules directly.
The currently existing features are as follow:
- Rebuild menus: hook_menu().
- Rebuild theme registry: hook_theme().
- Rebuild schema: hook_schema().
- Remove the Delete button from the Node edit form.
- Add a Delete Tab to each node.
- Redirect of front page depending on the domain (HTTP_HOST).
- Let external application query your Drupal SQL database.
- Test the number of sessions on your website, if very large, you probably have a PHP setup problem. (probably doesn't apply to Drupal 7.x, although it is informative)
A word on the redirect: I tried the domain module and it is just way too heavy. It is really great if you need an incredible granularity of which domain presents which node, or if you want two different sites but a single database... Yet it is not workable if you have the necessity to use the securesite module. However, for a few landing pages for a site, that's just crazy. However, I still need a redirection and most of the other redirect modules I've seen redirect URLs within a site, but nothing about redirecting on the host.
Mini DB Query
This module can be used to expose a field to the external world. At this point, no access is being checked beyond the menu access and since you are likely to give access to the anonymous user, that means anyone can see what you expose. In other words, I strongly suggest you only use that feature on a system where the data you are going to expose is already public but may change with time.
The follow are the existing security levels:
1. The query happens with a path such as: dbquery/secret/title/1
The secret path is something you setup in the interface. Until set, the queries won't work.
The title is the name of the field and 1 is an ID (i.e. nid in my example.)
2. The query uses a menu which has permission: 'mini dbquery access'
3. The fields must be defined in the administration screen to even remotely exist
To retrieve the title of any one node you can enter:
in the Authorized fields text area. The identifier ([nid] here) must be specified when the field declaration includes it. And vice versa, it must not be specified if not present in the declaration. So this example will return a node title (whether published, accessible by that user, etc. or not):
On the other hand, this one will return access denied:
To authorize the version without the identifier write this field:
And the path you can enter now looks like this:
WARNING: not entering an identifier means ALL the rows are returned...
I now added Mini Tests which is a collection of tests useful to verify your Drupal installation. You can install this module, run the tests and then uninstall (and then even delete the whole mini module if everything worked.) This module has no other purpose than testing things. It does not add functionality to your site.
- Check db_affected_rows() after UPDATE—it can be a problem with MySQL 5.1
The idea of creating this module came from my Discuss this module which, when it receives spam, would be better with a Delete tab. But such a tab is not practical inside the Discuss this module itself. Thus I created this module.
The name of the module comes from this page: http://drupal.org/node/246039
http://www.drupalproject.org/project/nodeformsettings (tweak node fieldsets / buttons)
If you know of another similar project, let me know so I can include it here. See
Made to Order Software Corporation is the Mini sponsor. Check us out, we have additional Drupal modules available just for you!