tokens

Events happening in the community are now at Drupal community events on www.drupal.org.
Anonymous's picture

Rules to Automate Bookings

I am trying to set up a Rule and Rules Sets for the work-flow of an anonymous user making a booking.

The modules being used are: Bookings API & Event bookings.

What I think it ought to look like is:

RULE

Event is “A new booking has been added”

Then DO Rule set 1

        Arguments: Booking API + Content

        Revoke content permissions by role (protect each new booking page from future public access ie anon)
        Redirect to page (Thanks for booking)
        Send email to an arbitrary address (applicant's booking details)

    Rule set 2 – Scheduled in 7 days
Read more
vgebhart's picture

Question on available Form tokens in the rules module

I'm attempting to create workflow to consolidate our departments approval process for internal procedures. Want to have user submit request, and have it be routed to managers / directors based on conditions in the form. Seems fine so far, but I'm hung up trying to send an email to users with a link to the form url. I can't seem to find this as a token in the rules module. I copied all available tokens as displayed in the rules page and pasted them into the message but nothing seems to create a link to the node itself.

Read more
fago's picture

Tokens & RDF in d7 - can they benefit from each other?

Right now there is a issue for getting token into core and one for getting some RDF into it. I wonder if makes sense to base the token patch upon the RDF stuff. So once we have some semantics attached to our objects, we can use them as a starting point for doing the token replacements.

The other way round, the RDF patch could learn from the tokens code - as the actual problem to solve is quite similar. The way the patch in #74 uses simple handlers to get tokens would make sense for RDF too. Then the token implementation can go and build upon that and reuse the handlers returning RDF string literals. Similarly, the approach described in #77 for doing actual token replacements could also be used for getting chunks of RDF for a bunch of objects.

Then apart from avoiding inventing the wheel twice, we could easily make both APIs consistent, so they can be used the same way.

Read more
laken's picture

Does module exist to let site editors maintain own tokens and replacement text?

I really love token module! I'm especially loving it in pathauto and auto nodetitles - very powerful.

Is there a module to permit site editors to create and maintain their own tokens and corresponding replacement text, either through a UI or in a text file?

The site I'm building needs to let editors store snippets of text which can be reused in many places. For instance we might have this in node content: "McDonalds has sold [num_bugers_sold] in their history". We'd need a way to edit the value for [num_bugers_sold] and have that token update wherever it's used.

Read more
cwarden@xerus.org's picture

tokens in node body

What's the proper way to replace tokens within a node body?
I've created a simple module that implements hook_token_values and
hook_token_list, but to use my token within a node body, I've had to
implement hook_nodeapi, which doesn't seem right.

<?php
function mymodule_nodeapi(&$node, $op, $a3 = null, $a4 = null) {
   if (
$op == 'alter') {
     
$node->body = token_replace($node->body);
   }
}
?>

How about within a template? Is this discouraged?

<?= token_replace('[my-token]') ?>
Read more
greggles's picture

Barcelona Event

Following Dries' request for more presentations I decided that Token module would be a good topic:

Token Module: How I Learned To Use the Token API and Stop Re-Implementing Dynamic String Replacement

So, if you are headed to Barcelona and want to learn more about using Tokens, this would be a great session to attend. Similarly, we plan to use some of the time to talk about the "future of tokens" which should hopefully be a useful topic.

Read more
teleute's picture

Confirmation email token issue

Alright, I believe I know how to do some formatting (although I haven't done much yet, but I know it's working), and my custom cc processing module seems to be working. Ouch! My brain is melting. What a way to get my feet wet in the Drupal waters!

Anyway, two (hopefully!) final questions:

Read more
Subscribe with RSS Syndicate content