Questions related to the Token module, or a form of token replacement system.

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

Creating token to display cookie counter

I need some help with displaying the cookie counter to user. A friend told me i should use token_replace() instead of defining my own token. That'd be fast and easy but being new, It seems difficult ...
0
votes
0answers
13 views

Passing variables to custom tokens in Drupal 7

I'd like to leverage Custom tokens to produce coding templates for repetitive work, with the option of passing data to them in order to achieve customised results. My aim is a little like this guy, ...
0
votes
2answers
28 views

Fatal error: Allowed memory size of 134217728 bytes exhausted

Hi everyone when I am trying to add token to create auto label error is showing can anyone tell me that how to resolve it?. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to ...
2
votes
2answers
34 views

Fixed number of digits from Token random number [closed]

I want to use the Token random number module, but it says it generates "A random number from 0 to 2147483647". How can i change this and get fixed number of digits? For example, i need a 4 digits in ...
0
votes
1answer
14 views

Get an item in a list of taxonomy

Hello Drupal Community, I am creating a menu which has a link to an "editorial". I created a taxonomy named "edito" and created articles (content type) that are tagged with this taxonomy. I need to ...
0
votes
0answers
26 views

How to get new password by mail instead of password reset url (Forgot password)

When we click on "Forgot your password" and enter email id, Drupal will send password reset URL by mail. But is it possible Drupal send any random password by email instead of URL? I have checked ...
0
votes
0answers
8 views

node destination as webform field

In a content type nodes, I am trying to put a path to a webform in a block, using the following code: <?php $options = array('absolute' => TRUE); $nid = 20; $url = url('node/' . ...
0
votes
2answers
31 views

Inserting custom HTML using tokens

I'm trying to reduce repetitive coding by adding my own static HTML content into some form of reusable token that can be added into page bodies amongst regular code, but can't find a method. Here's ...
0
votes
0answers
16 views

is using [current-page:query:service_name] token is safe from SQL Injection?

I'm using [current-page:query:service_name] token in my project to get parameters from the url into the database (using webforms and tokens). I was looking in the code to check if there is some kind ...
0
votes
0answers
16 views

Tranlated webform confirmation page Submission [field values] are not working

I translate my webform using Webform Localization module. After i submit the form in another language then the default English form: E.g the Dutch form. I see the following on the confirmation page: ...
0
votes
1answer
21 views

How to remove markups of 'div' and 'span' from the billing info displayed through token

I am trying to add token for billing information in order confirmation email . The token does its job but also displays markups of 'div' and 'span'. Whats surprises me is all the other tokens in the ...
0
votes
1answer
43 views

How to email the webform content to current page author email “Token [current-page:node:author:mail] is not working any more”

I have a content type topic, and a Webfrom "contact" as block which is available for topic content type only. Any registered user can create topic, and I want to use the Webfrom to contact the topic ...
0
votes
2answers
52 views

How to use tokens in a filtered text field

In Drupal, when you create a field, there is the option "Text Processing". You can select either "plain text" or "Filtered text". When I create a field with "Filtered text", I am unable to use it as ...
0
votes
2answers
32 views

Using menu tokens (or similar?) to create “invite user link” on OG Group page

I am new to tokens but was planning to use the menu to token to create a simple menu allowing group administrators to easily invite users without going to the Group administration menu. The default ...
0
votes
2answers
56 views

Grab Node ID from URL of Current Page?

How do I grab the Node ID in the URL of the current page and pass it through a link? 1) The URL on the current page is in the format: website.com/parameter/parameter/parameter and the third ...
3
votes
2answers
98 views

URL alias, tokens is replacing 0s and 1s with node and entity [duplicate]

Has anyone seen a case that url aliases or tokens end up replacing certain numbers in a url with the words node and entity. A UTC Timestamp in my url ended up replaced like this: ...
0
votes
2answers
55 views

redirect to another page on webform submit using [current-page:query:?] token

I am trying to configure a webform to redirect to another page after submission by including the redirect location in the url: http://mysite/content/barb?destination=content/discus According to ...
4
votes
1answer
170 views

Tokens causing incorrect text substitutions

I'm running Drupal 7 on Ubuntu 14.04 server, core and all modules up to date as of today (7th May). We have noticed today that zeros (0) are not displaying correctly in blocks that have a custom ...
2
votes
2answers
91 views

Using token in Block title

I want to use token to show user name in block title. But it is not working. I tried like [user:name] Thanks in advacne
0
votes
0answers
22 views

Redirect Module - Tokens

I am trying to redirect my users from a [uid] page to the front page via the Redirect Module. I use the Redirect module together with the Redirect Token module. The Redirect token module only allows ...
1
vote
0answers
14 views

What is the correct format for a Timefield in an email body?

I'm using the Timefield API to define a "time" field. The field represents an arrival time for an event and is formatted to look like HH:MMpm (for example, 5:30pm). I'm trying to format the time in ...
1
vote
2answers
183 views

How to use views replacement patterns while using the PHP filter?

In views, when using the standard text formatter you can place replacement tokens such as [title] into the HTML code either in a rewrite or in this case global text for Drupal to render. In this ...
0
votes
0answers
25 views

Use Address tokens in view

Within a view display, I am trying to display only the first name of a customer. The information is collected via a standard addressfield form. Within the available "Replacement Patterns" none of ...
1
vote
0answers
22 views

How do I debug Commerce Order Comments token not expanding in Message?

Using Kickstart 2 with Commerce Message. The token [message:message-commerce-order:field_order_comments] has begun to -sometimes- not expand. ie. sometimes it render as expected, but sometimes not. ...
0
votes
1answer
29 views

Redirect user to dynamic url

I am writing a custom rule, I do not know how to approach getting the correct URL for the redirect. I have a page - website.com/content/newsletter-activity-001 that needs to redirect an anonymous ...
0
votes
3answers
58 views

Get content page field value

I have a content page contain three field. Number A: Number B and Total Number. During add content page, I fill up Number A: 20 and Number B: 30. How to let Total Number auto display 20 + 30 = 50?
0
votes
1answer
33 views

Use Tokens and/or Replacement Patterns in Shortcodes

Looking for a way to add a token/replacement pattern into shortcode. For example, creating a button where different text and link is required depending on other factors - something like the ...
0
votes
0answers
30 views

How do I add Webform-CiviCRM tokens into Webform emails?

The following is the HTML from a form I have created using the Webform CiviCRM integration module: <input class="civicrm-enabled form-text required" type="text" ...
0
votes
0answers
10 views

Advanced Entity Tokens - tokens are not rendered for none-admin users

I have advanced_entity_tokens installed. When I insert a token into a textfield, the token is rendered for the admin users fine. But not for the none-admin users. I didn't find any permission or any ...
0
votes
1answer
29 views

Field values of nodes available as tokens

we would like to habe a node type only for side wide available values. We think we have a title and a 'value' field. When we need one of these values in text areas/fields we would like to type ...
1
vote
1answer
32 views

Why might the user's email address not show up in Views Send or as a Token?

I have set up a User view, with User: Email as one of the fields (the others are username and some text fields) . The email address of each user shows correctly in the view, either formatted as text, ...
0
votes
0answers
29 views

Extracting first few letters from tokens

I am trying to generate Product SKU through Auto SKU which uses tokens, but with tokens I get full names from fields such as store city, store name, product name, serial field. ...
2
votes
0answers
31 views

How do I make an object available as a token?

I have created a custom token. Inside my token's code, I'm getting a node object. I want to give the users the option of displaying this node's properties. So, for example, assuming that my token's ...
0
votes
2answers
19 views

How to specify English path alias for Chinese?

I created a node of type Post in English, and translated it using Entity Translation to Chinese, Traditional. I then set the path alias for the content type to be ...
0
votes
0answers
29 views

vbo action to reset back to default value

Text field's default value is set using field_default_token and it is working fine. There are several nodes present prior adding default value and needs to be set in bulk(no input is required again as ...
0
votes
1answer
47 views

Replacement pattern for one value of a multivalue field in views

Rewriting the results of a views field, I wonder if there is a way to use a replacement pattern for the first, second and third value of a multivalue field. In my case, as example: I have tried to ...
0
votes
1answer
36 views

The %element-title is using the following invalid tokens

I have defined few tokens that are grouped in few separate groups similar to [node:content-type:name] scheme. For example I'd like to have a token like [master:sub_group_1:tokan_A]. So This is how ...
0
votes
0answers
87 views

Drupal 7 node save gives intermittent token validation error

When submitting a content type node I'm occasionally seeing a form validation error regarding tokens being invalid. I've tried reducing the token tree depth too using Token Tweaks which helps on ...
0
votes
1answer
33 views

Taxonomy view : add token term_name in url

I have a view overriding taxonomy term pages with the help of Panels. I defined that pattern in URL aliases : destinations/[term:parents]/[term:name]. Now I'd like to set a clone of that view, ...
0
votes
0answers
58 views

correct usage of token in href link text

I have a content type with a text field and want to use that text field as the text in the href link in a block on that page. The block appears as a button and I want to use the text field as the text ...
0
votes
0answers
44 views

display suite code - set token value of color field module as php variable an convert to rgb

$hex = "[node:field-ref-participants-category:field_color]"; print $hex; list($r, $g, $b) = sscanf($hex, "#%02x%02x%02x"); echo "rgba($r,$g,$b,.9)"; Why does $hex printed correctly, but doenst work ...
0
votes
0answers
23 views

How to get Currency module exchange value token for block?

I've recently installed the Currency module with the Yahoo! Finance co-module and was wondering how to post the current exchange rate into a block using the token system. [currency:USDtoJPY] or just ...
0
votes
1answer
84 views

Views Custom Field Handlers tokens

I am using simple views custom field handler. And I would like to make list of custom tokens for this $data array I have. How could I do that? class custom_views_handler_field_hostname extends ...
0
votes
1answer
37 views

Webform component permission

I have webform in my site, so I need to do that there are 2 user approval field components in my webform so they both should be unique value, in my case its working like if my name is joy then I ...
0
votes
2answers
64 views

Entityform redirect from query

I am struggling to get the appended parameter from the url when redirecting an entityform. I have an entityform that user can get to from multiple pages on the website. I want to redirect the user ...
0
votes
1answer
58 views

image in newsletter does not apply image style (defaults to original size)

I'm using a simplenews template (simplenews-newsletter-body.tpl.php) to output with mimemail in html. Everything works as it should except that the image in my newsletter is always taken from the ...
0
votes
1answer
76 views

How can I get the node ID inside my implementation of hook_tokens()?

I am trying to implement a custom token using the following code. /** * Implements hook_token_info(). */ function hook_token_info() { $type = array( 'name' => `enter code here`t('xyz'), ...
0
votes
0answers
34 views

How can I get Node tokens to be available for my fields

I am currently using Background Field module to set a background image and I want to set the css selector to incorporate node->nid. However it seems to not be available for me to use in my field but ...
0
votes
1answer
244 views

Shipping line items not displaying with [commerce-order:line-items]

I have Commerce and Shipping and Flat Rate installed and working correctly. Shipping is added to an Order and charged to the customer. But when I go to display the shipping line items, e.g. in a ...
0
votes
0answers
13 views

Modify a token from pathauto module

pathauto provides a hook called:[node:menu-link:parents:join-path] /** * Implements hook_tokens(). */ function pathauto_tokens($type, $tokens, array $data = array(), array $options = array()) { ...