This forum is for less technical discussions about the Drupal project, not for support questions.

Tip: News feed block based on keywords

I put together a simple block which I'm finding extremely useful and I think others might benefit as well. As opposed to having an agreggate news feed block based on a "bundle" I wanted one filtered on keywords:

 $result = db_query("SELECT * FROM item WHERE 
      lower(title) like '%microsoft%'
   or lower(title) like '%windows%'
   or lower(attributes) like '%microsoft%'
   ORDER BY iid DESC LIMIT ". variable_get("import_block_limit", 15));

  while ($item = db_fetch_object($result)) {
    $output .= import_format_item($item);
  }

  return $output;

This way if I have a feed marked as "Microsoft" in the attributes or a related word appears in the title of any feed it's in the block. I'm using this at MS Versus. Hope others find this useful.

How to determine what module called a block?

Is there any way to determine which module has called a block? Specifically, I'd like to make a change such that certain blocks, when called, get a different title background color. The only way I can think of doing this is testing who's calling the block, then use a condition statement to change a CSS class (or similar).

Plone like

May I suggest our developpers to have a detailed look at www.plone.org for very nice suggestions for Drupal v5, there is also a lot of good ideas for the interface, especially the help given during form input.

I'm working on a plone theme for drupal see in the theme forum.

Eric.

Multilevel menus?

Has anyone considered extending Drupal so that it could support Multi-Level menus? I'm finding that as I add more and more functionality to a site ... a good thing! ... the more cluttered the menu bar becomes, and harder to manage navigating for users.

How much work would it be to extend Drupal so that all modules had a configurable "menu level"? I'm not much of a programmer, but here are a couple of thoughts:

A simple Admin option that the admin could define "top level" (eg level 1), "secondary level" (level 2), "tertiary level" (level 3), etc... Then the menu bar would get built such that a CSS menu pops down or to the right, or to the left (depending on it's location) so that second/third (etc...) tier level menus are then exposed.

Another thought might be to have each module register itself within a Taxonomy vocabulary, then some function allows the admin to juggle the level settings of that?

I think this would go a long long ways to improving usability, ease of navigation, site cohesion, and better layout/design. Any thoughts?

I'm willing to do some of the work on this - but I'm not mucy of a programmer - so would need a lot of pointers or help.

v/r
Shane

Bookmarklet for Drupal

I have searched the forum and found a few references to bookmarklets, but no working examples.

Does anyone know of a bookmarklet that is compatible with Drupal. I use Bookmarklets alot in my pmachine, manila, and nucleus blogs and would love to have one for use with Drupal.

Problem with adding new block

I have created a small php form,which is working fine but,when i am adding this form into blocks and saving it as php it's showing an errors.....
don't know what's the problem.I think it's not parsing php.
.
Anyone help me.
Thanx in advance.

Pages

Subscribe with RSS Subscribe to RSS - General discussion