"Variables" is the term used in Drupal for persistent variables, which are the variables set with variable_set().
0
votes
1answer
6 views
noob question about call-time-reference
I have issues with this, it returns me
"Fatal error: Call-time pass-by-reference has been removed"
however if i change &$major_array to $major_array, then will return me another error message
...
0
votes
1answer
14 views
Render Drupal variable in CKeditor
im trying to render/display a breadcrumb in a mini panel using both with text format 'PHP code' and 'Display suite code' but it display nothing. it works when i tried with common php code;
<?php ...
0
votes
1answer
28 views
Where does the variable for the left sidebar get set in Drupal 6?
I have a Drupal 6 site where I've added a submenu for a new set of products:
products
-old products set 1
-old products set 2
-new products set
--new product 1
--new product 2
--new product 3
that ...
2
votes
1answer
63 views
In which table should I save the value of system_settings_form in Drupal 7?
I am using Drupal 7 and creating a form with some fields like position.
function mycustom_form($form, &$form_state){
$form = array();
$form['position'] = array(
'#type' => 'textfield',
...
0
votes
1answer
11 views
Cronmonitor with import-html
So I'm trying to get the import-html module to import files every time there is a cron run. However, I was hoping someone could help me understand what the format of file_list, profile_id, and ...
1
vote
1answer
15 views
Form does not save value to variable
I'm loosing my head. This is the function for generating my admin form:
function section_description_and_images_settings() {
$form = array();
$form['images_style'] = array(
'#type' => ...
1
vote
1answer
36 views
Variables in template files
In my .tpl.php template files, I have several links and names of external websites. I would like to print these as variables, which are defined in template.php. That way, if I have to change a link, I ...
3
votes
1answer
47 views
set_variable site name in installation profile
I'm writing a custom installation profile, and most things work, except that I can't get it to change the site name.
function myprofile_install() {
include_once DRUPAL_ROOT . ...
0
votes
2answers
22 views
Configuration form settings
I would like to create a settings page for a user which allows them to save the options of a list which is to be used in a custom form. The list is called marketing source and it is added to a form ...
1
vote
1answer
25 views
What's the best way to create variables that are available to every single URL on my site, based on node id or taxonomy id?
On Drupal site A we have a bunch of links to non-Drupal site B. For marketing and tracking purposes all these links have a different URL variable appended to them, so that when a user registers on ...
1
vote
1answer
62 views
Can't find View's Filters variables
I'm trying to create a button that create a new content type based on the one selected in the view filter. I have had some problems finding the correct variables to use them in that case. I'm actually ...
0
votes
1answer
27 views
How to add Variables in Drupal (and how to visualize them)?
I'm new to Drupal Answers, but I've been programming for a few years now.
I'm looking to create something simple (at least I think) within the Drupal CMS to use throughout the site. I want to create ...
2
votes
0answers
42 views
Custom module data storage
In Drupal 6, I'm writing a custom module that generates several pages (as a Drupal newbie). Mainly public form pages for soliciting donations - users fill out their info (amount, frequency, etc.) and ...
1
vote
1answer
453 views
IDs for content type fields
how can you add the ID to the content type fields (drupal 7), all I see are classes, and from my understanding seems that there is nothing in the variables.
Please keep in mind I am not coder, and ...
0
votes
1answer
26 views
local language variables to use in code for queries(NOT GLOBAL LANGUAGE)
I'm building a site in multiple languages (Italian and English) and I would like to ask you to intervene on the code to add selections 'if' to my queries to the user's local language.
At first I place ...
0
votes
4answers
261 views
How to define settings from an install profile
I am looking for the way to set some settings at the install step.
function genius_profile_final() {
// Enable default permissions for system roles.
$filtered_html_permission = ...
1
vote
0answers
41 views
Invalid Variable: drupal_private_key
I just updated my live Drupal install and now I receive the following notice in the admin:
Found one invalid variable
When I go to /admin/reports/variablecheck it shows that the variable ...
0
votes
1answer
34 views
How can I set values in the $conf array using the admin interface?
I am using the Journal module and in order to limit the forms its text box appears on the form ids have to go into a $conf variable. The docs say it has to go into settings.php but I don't watch ...
0
votes
1answer
51 views
How to set a page level variable that views has access to
I'm trying to build a custom responsive theme using Zurb Foundation. I'm also using Views to render a grid of nodes, let's call them Events, that are each wrapped in Foundation classes to lay them out ...
0
votes
1answer
33 views
a little javascript help [closed]
I'm trying to pass some basic tracking information into a javascript snippet. this is the example they provide.
woopra.identify({
email: "[email protected]",
name: "John Doe",
...
1
vote
1answer
96 views
How to delete a variable during uninstall?
I've never run into this problem before, but the variable I set in my module won't delete during uninstall. What am I doing wrong?
I set the variable in my module like this:
...
5
votes
2answers
307 views
Best way to delete all variables when uninstalling module
I'm writing a module that writes several variables (three, four variables for every content type, and other).
Which method should I use to delete them on hook_uninstall?
Is it safe to perform a ...
0
votes
0answers
319 views
Why Am I Seeing Notice: Undefined variable: _POST in include_once()
I just recently started seeing this on a site that I'm working on. Everything was working fine up until a few weeks ago. I've been scouring looking for resolution and cannot find anything that will ...
0
votes
1answer
39 views
User Import: Possible to use other variables in the user notification email?
We are using the User Import module to populate the User list, and having it send out a notification email with a temporary login URL. In the notification email section of User Import configuration, ...
0
votes
0answers
25 views
Why some variables aren't listed on strongarm feature component list?
I want to export 2 variables from domain navigation module:
domain_nav_block
domain_nav_theme
I am sure that this vars exists in variables table, but in strongarm tab there are missing...
0
votes
2answers
987 views
Saving values using variable_set through an array
i have used variable_set to save one value.How can i save multiple values through array using variable_set. Please provide the solution
0
votes
2answers
55 views
How long does variable_set last?
Is variable_set just creating a session variable or can I retrieve this variable from a cron job?
I can load the page over and over, but I always get this output. It seems as though the data is not ...
0
votes
2answers
94 views
How to expose a persistent variable as a field for use in view
the problem
I've been searching around for a while now and have not found a way to achieve this, which I find quite surprising so must mean I'm missing something. I have a particular base path ...
1
vote
1answer
348 views
What is the correct way to translate variable_get string values entered in admin input fields?
I'm developing a simple module with and admin page, where admin can fill some textfields with custom strings that will generates a piece of html to be used later.
So for example I have fields like ...
0
votes
1answer
324 views
How can I modify the values in variable table using phpmyadmin?
I modify the site name in variable table using phpmyadmin as below.
s:21:"[email protected]"; to s:21:"[email protected]";
But then when I run cron I get the follwoing message.
Warning: ...
0
votes
1answer
57 views
Conflicting realm variables when using i18_variable
I'm using i18_variable, and I'm using the hook_variable_info, hook_variable_group_info....I enabled the custom variables I defined after that from the admin/config/regional/i18n/variable page.
But ...
2
votes
1answer
70 views
Delete variables and file folder on module unistall [closed]
Is there any drupal API function for deleting variables and file folder on module uninstall or on module disabling?
0
votes
1answer
175 views
How to tell variable_get to get the value from the database and not the $conf array?
variable_get seems to always used $conf array which is fetched a single time. In a long running process where the value of a variable may have changed during operations this causes problems. Is ...
1
vote
1answer
44 views
How to filter a view by the value of a global variable (as with the variable module)?
I have a global variable, which is the id of a node representing a current organic group that changes every year. I'd like to have a rules view that filters on members of that group. I've added the ...
0
votes
1answer
54 views
Accessing variable_get when loading bootstrap from an external file
I am loading the core drupal 7 components through an external file by loading bootstrap. While the core drupal functions work properly, when I try to access variable_get I keep getting the default ...
0
votes
1answer
69 views
Need Help passing field data from one content type to another
I am working on an Equipment Checkout system using Drupal 7, MERCI, views, panels, rules, and many other modules. I am working for a community college in Oregon. I am upgrading features on an already ...
0
votes
2answers
265 views
Using Drupal variables in CSS?
I'm using CSS to implement a banner image in my theme:
#banner {
background: url("../images/banner.jpg") no-repeat fixed
}
Site users would like to be able to change the image within Drupal. ...
0
votes
2answers
119 views
Different Site name and slogan for Organic Groups based multisite architechture
I am using OG based multisite in Drupal. I need to override sitename and slogan of default values so that each organic group has its own set of system values like Sitename and slogan etc.Also I am ...
0
votes
1answer
294 views
Rules for how Drush vset works
I want to perform some admin configurations through drush using vset the way I've used it in the past, such as the following:
drush vset site_name Example;
drush vset site_offline 1;
drush vset ...
0
votes
1answer
189 views
Custom Block - How to get additional variables
I am new to Drupal and slowly getting my head around it.
I'm using Pay to Publish module on my site, I've setup a custom block that gets recent posted advert (very simple) now I want to style the ...
3
votes
2answers
314 views
How to set translated variables' values from settings.php (or similar)
When using the Variable translation module (part of the Internationalization suite), how can I set the value of a translated variable from the site's settings.php file ?
Using the $conf in the ...
1
vote
1answer
615 views
Rules: how to display the value of variables?
I use the Devel module on Drupal 7 to debug some rules of my site but I can't debug without knowing the value of variables I created.
In the case, I have a loop where I sum different values and at ...
0
votes
1answer
107 views
How is webform node type is defined in webform module?
Reading the webform module code I could not figure out how webform content type is defined. I only found this piece of code:
function webform_node_type($op, $info) {
$webform_types = ...
0
votes
0answers
36 views
can't save variable from a form
i'm reviewing the source code of a module, the following is the code
/**
* Implementation of hook_userpoints api().
*/
function uc_userpoints_discount_userpoints($op, $points = 0, $uid = 0, $event ...
0
votes
1answer
403 views
Rules: how to create variable with PHP and $_SERVER['HTTP_REFERRER']
I want to parse the query string off the HTTP_REFERRER and make that available as a variable for actions to use.
I feel like one of these options should let me do that, but I can't be sure...
...
1
vote
1answer
25 views
How to replace I18nVariableLanguageRealm controller?
I have done custom module with .class.inc and .module file. Class file is added in module info file.
Inside class file:
/**
* Controller for Language realms.
*/
class ...
1
vote
1answer
157 views
Can I create an “unlimited” values variable?
I'm trying to create an exclude list of sorts that is configurable via the variable admin interface. I have created lots of single value variables, but never a variable as an array where through the ...
0
votes
1answer
463 views
For multilingual sites, where are translated variables for the non-default language stored?
I'm managing deployment using the Features module.
Using Strongarm, I have added the site_403 (access denied page) variable to my feature. However, this only contains the value for the default ...
2
votes
1answer
50 views
Is there anything like get_variable storage that doesn't get loaded every page?
I have a custom module and I want to store a long bit of text (~20kB).
I was going to use variable_get but as I understand all vars accessed this way are loaded for every request, which is a memory ...
1
vote
3answers
2k views
How can I create a variable with different values for each domain using Domain Access?
I have a numeric value that is unique to each domain (using Domain Access) on my site. I'd like to use the same variable name so I can use the same theme and display this value on all domains. Is this ...