See the Mailing lists or Drupal Issue queue. There are also various working groups on groups.drupal.org

A different selection box for filters in admin/content/node

It seems costly to query the DB every time a subfilter is selected.

Rather is would be nicer to select filters on the screen and then do a query.
So, I wrote a different one. After picking my way through the form API tricks and tracing down map keys, etc.
I came up with the following, (no claim to an optimal solution):

{One more note: I used a string substitution for the top level checkbox state, where it should have probably been handled with #default_value. But, this code works for now.}

/**
* List node administration filters that can be applied.
*/
function node_filters() {
// Regular filters
$filteroptions = array();;

$filteroptions['status-1'] = t('published');
$filteroptions['status-0'] = t('not published');
if ( module_hook('publisher','fromstatic') ) {
$filteroptions['static_out-1'] = t('static');
$filteroptions['static_out-0'] = t('dynamic');
}
$filteroptions['promote-1'] = t('promoted');
$filteroptions['promote-0'] = t('not promoted');
$filteroptions['sticky-1'] = t('sticky');
$filteroptions['sticky-0'] = t('not sticky');

$filters['status'] = array('title' => t('status'),
'options' => $filteroptions
);
$filters['type'] = array('title' => t('type'), 'options' => node_get_types('names'));
// The taxonomy filter
if ($taxonomies = module_invoke('taxonomy', 'form_all', 1)) {

IS there a way to make a block visible/invisible on a perticular node type ?

Hi ,
It might seem weird but i have node type called image and i don want any block on the left side of this node can i find a snippet to do this or should i jus configre the block by node name ( as done regularly).

You Rock!

Well done. Well done. This wins a AO Do it Right Award.

http://www.ascendant-online.net/main/index.php?name=News&file=article&si...

http://www.ascendant-online.net/images/do-it-right.gif

(Who knows one day this might even mean something LOL ;-))

htaccess 301 redirect code is incorrect

I'm not sure whether this was done intentionally, but the current .htaccess 301 redirect code used to redirect non-www URLs to the www version of the domain actually redirects everything to the home page.

I believe this is incorrect from a SEO standpoint, as well as a end-user usability standpoint.

Example...

Some one has linked to:

http: domain.com/category/specificpage

But when the htaccess 301 redirect kicks in, they're sent to

http: www.domain.com

proposed change to node.module: Leave the teaser break in

How about we don't remove the delimiter "!--break--" from the node body (node.module line 741)?

it does no harm to leave it in, and it means one can call node_teaser() again later, e.g. in an implementation of hook_nodeapi to insert an ad in the node body. By the time content gets to _nodeapi, $node->content['body']['#value'] may differ from $node->teaser, so results are unpredictable if we try to break $node->content['body']['#value'] at strlen($node->teaser).

it is much cleaner to be able to call node_teaser() again to find a good breakpoint.

How drupal_eval() works

This is just a question meant to satisfy my curiosity. The documentation for drupal_eval() says,

"Using this wrapper also ensures that the PHP code which is evaluated can not overwrite any variables in the calling code, unlike a regular eval() call."

I want to see if anyone can explain why this is so. I suppose it's because of the output buffering, but I don't see any indication that that's right.

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core