I am just moving from Joomla to drupal and I am trying to know better the system. I would like to know for instance how to create a second user as admin. A friend of mine got registered and now I'd like to change his role to Administrator. How can I do this? It's possible?
I have a list of nodes that I show in a block and I'm trying to trim the title because sometimes it overflows a line and goes to two lines and this messes up the block formatting, so I need to limit the title that is displayed to 25 characters or less. Anyway, I couldn't figure out any way to do this so I'm trying to use MySQL functions to do this. The MySQL query works when I run it, but when I put it in my page I'm getting zero output and no errors printing. Can anybody spot something wrong here (or come up with an easy way to do this)? To summarize, I'm trying to print the title if it's less than 25 characters and if not, I find the last space, get a substring up to that (so I don't split words) and than concatonate a '...' on it to indicate it's been truncated. I then try to load that manually via db_fetch_object rather than using node_load.
Here is my original page that works:
<?php
/**
* This php snippet displays content of a specified type, with teasers,
* from certain taxonomy term.
* Sorted by date of creation, most recent first.
* Works with nodes of the flexinode type too.
* To change the length of the list, change $listlength.
* To change the taxomony term, change $taxo_id.
* To change the type of content listed, change the $content_type.
* Tested with Drupal 4.6.3
*/
$listlength="5";
$taxo_id = "1,2,3,4";
$content_type = 'story';
Hello. I am trying to create a node with a long php-generated list and would like the teaser to show a shorter version of the list (e.g. a top-five in the teaser, but top-hundred in the page). If I understand correctly, the ability to edit teasers independent of node text no longer exists in Drupal without a third-party module, or without editing the node_revision row manually. Is there a way that I can determine programmatically in that node instance's PHP which list to generate?
i.e. If my node instance's text could look something like:
I have the actions module installed. I created an action which sends an email. Basically, the purpose of this email is to notify the sites admin any time content is updated.
Now, my question is, how do I fire that action?
I think I have to make a module which utilizes the hook_update function, but I'm at a loss on how to tell the actions module to fire the action during hook_update.