rules
Modify the Theme after the user login or set user default theme on registration. How to?
Hi,
I am new to Rules.
I would like to change Theme after the user login. In my web site, the user cannot change the theme.
In my mind, I have two choices:
1) Modify the Theme after the user login
2) set user default theme on registration.
Could this be done by Rules? We all know that we have the trigger "after a user login". Therefore, my main question is how to create the Action? Is it a must to write some PHP code?
Thanks.
hosais
create trigger for rules to publish when user is added to group
Hi there,
I'm trying to do something that i thought would be fairly easy using rules, which is:
- publish a users content when user has role 'paid_member'. I cant use any on the existing triggers (such as 'on save new content) as they rely on the user clicking on the page to make the publishing process happen. To go with this i would need to create user driver triggers such as 'when saving new content' and role = 'paid member' then publish otherwise any new content they create wont get published.
Can Rules be used for gradual content delivery on a per-user basis?
I'd like each member of a site to receive access to nodes of a specific content type based on their length of membership. For example, I have 4 nodes of content type X, and I'd like members to access them in 2 week intervals, like so:
Day 1: Member A joins, sees node #1
Day 15: Member A sees node #1 & #2
Day 29: Member A sees #1 #2 & #3; Member B joins and sees node #1 ONLY
Day 43: Member A sees all 4 nodes; Member B sees node #1 & #2 only
Use rules to block specific field entries?
I'm fairly new to rules, but I've used it successfully to add a ton of great features to my site -- great module!
Now I'm trying to figure out if there's a way I can use Rules as part of a reservation system I created. Basically, I'm trying to create a rule that will disallow users from reserving equipment on a date if someone else has already reserved the equipment for that date. Is this possible with rules? Any ideas for ways I might test it out?
Any help is much appreciated. Thanks!
Userpoints, Rules, and Taxonomy (Oh, My!)
I have been trying to use the Rules module to grant points to a user based upon the taxonomy term used for organizing points. I have been successful at granting points to the user but it always adds the points to the first term in the vocabulary and no matter what order I load the user id and term id into the rule, it always seems to ignore the term id.
I assume I am doing something completely wrong and am hoping someone can point at me and say: "Did you click the, blah blah?" Any help would be awesome, thanks!
If I solve it, I will post back here.
Removing Completed Tasks
I'm new to Rules, and haven't been able to figure this out. I'm sure it's quite obvious, so maybe someone will be able to help.
I have a basic rule that alerts users of a certain role to the creation of a specific content type. Everything works great, except the task doesn't seem to remove itself after the first message is sent. It just sits there in the scheduled task queue. Now it seems that every time cron runs, the original message is resent to the users.
How should I go about removing the task after its been completed the first time through?
A little help PLEASE
I'm trying to get my head wrapped around the rules module and I've been searching for clues for 2 days now.
Scenario
I want to create a membership website that sells time based information
To bring prospective customers to the site I would like to show them information that our subscribers had access to but is no longer useful
That way they can see that at the time the information was published it would have been useful to them
I'm thinking the way to go is taxonomy by tagging the subscribers content as subscribed and the free content as free.
match an empty field
I am trying to write a rule to match an empty field and am not having much luck. I've tried about everything I can think of, including some very inventive regexes, but no luck yet. Anyone know how to accomplish this?
Using Execute PHP to set Permissions in TAC
require_once(drupal_get_path('module', 'taxonomy_access') . "/taxonomy_access_admin.inc");
function tgtbn($name) {
$db_result = db_query(db_rewrite_sql("SELECT t.tid, t.* FROM {term_data} t WHERE LOWER(t.name) = LOWER('%s')", 't', 'tid'), trim($name));
$result = array();
while ($term = db_fetch_array($db_result)) {
$result[] = $term;
}
return $result;
}
$srch_name = "".$author->name."-".$node->title."";
$roles = _user_roles();
$role_id = array_search($srch_name, $roles);
if(!is_numeric($role_id)){echo "role id is not a number";}
sql query in/as condition
I am looking for a way to use sql query in condition of rule - if sql query returns something - proceed with rule, if it returns nothing - skip rule. Can anyone suggest way to go in this case? Thanks.




