This tag is going to be deleted; instead, use one of the following tags: batch-api, db-api, entity-api, field-api, form-api.
0
votes
1answer
12 views
How should I implement an alternative file upload?
I want to write a module for Drupal 7 to integrate http://filepicker.io's awesome functionality. It's a simple JS widget that returns a URL of where the file is hosted.
I've never written a D7 module ...
0
votes
0answers
16 views
Uploading images in forum not possible
I want to allow forum users to easily upload an image and insert it into the forum topic body, I've add an image field to the cck forum. Each time I click on upload I have this error pointing to the ...
0
votes
0answers
11 views
Ideas for killing overlay on small screen resolutions that don't involve hacking core?
See http://drupal.org/node/1260800 this link which gives details and various patches on how to kill the Drupal overlay for widths below a certain number. I had this requirement for a site and used one ...
0
votes
0answers
18 views
How to show textbox on image click
I am loading multiple images using theme() function inside hook_theme. When user clicks an image I want to display a TextBox beneath the image.The Textbox will display the dimension of clicked image ...
0
votes
0answers
12 views
hook_views_post_execute already has rendered fields
I have a view with a date field that I would like to move back a few minutes e.g. $timestamp - 60.
I run hook_views_post_execute() but, when I look at $view it already has rendered markup in it:
...
0
votes
0answers
31 views
Can't add content?
I have a content type called Video with a node title and a video field where i put the url of the youtube video i want ( Video Embed Field module ) .
Everything goes fine until i installed some ...
0
votes
1answer
58 views
Finding out what file was called immediately before error
I'm getting the following errors in dblog whenever I look at a page:
Notice: Undefined offset: 0 in _menu_check_access() (line 635 of /home/mysite/public_html/includes/menu.inc).
Notice: Undefined ...
1
vote
2answers
132 views
Using Ajax, how can I populate a div with Database Content from a form select?
This is what I have so far. I can populate the select field just fine, however when another option is selected I can not get the data to populate in the ajax callback div.
function ...
0
votes
1answer
42 views
How to pass variables between preprocess functions
I've some problem with themes and preprocess functions.
I see that, if I declare a variable in, for example, MYTHEME_preprocess_region(&$vars), this variable is available ONLY in region.tpl.php ...
1
vote
1answer
152 views
Why is Drupal adding token on image url
When I'm use the image_style_url(), function I got this token at the end of the URL: ?itok=yjoxJwQh.
Drupal uses a different token for styles and script, eg ?mk4o7m.
How does this affect caching and ...
0
votes
0answers
17 views
Ubercart quickbook integration in drupal 6
Did anyone integrate the quickbook program with ubercart in drupal 6?
I have searched on drupal.org but was not able to find any recommended modules for this. Only development versions of the modules ...
0
votes
2answers
76 views
How to Redirect search form to search api views
I'm struggling to redirect the core search form /search/node/* to the search api views /s* .
I took a look at but nothing happens ...
...
0
votes
1answer
138 views
Show repeating event just once in Views while sorting by date
When using repeat date API on a field, Drupal allows you to group events so they don't appear multiple times.
However, when sorting by date it seems like Drupal ALWAYS shows all of the entries no ...
0
votes
2answers
63 views
query API calling db_query result a non-object, but SQL works
I query my database using the following query API code, but Drupal tells me that the result is a non-object. I can't find any reason to it
in what situation does db_query return anything but?
The ...
1
vote
2answers
54 views
Create a bunch of pages automatically
I would like to add few pages with some content in some categories
automatically with some commands.
Is it possible to do that with drupal ?
For example, using some API.
EDIT:
To be more precise, ...
0
votes
1answer
74 views
How to programatically get the machine name of a node?
I want to add the machine name of every node into my page.tpl.php template as a class on the body. How can I get that machine name?
I have access to the node object, but I don't see the machine name ...
0
votes
0answers
126 views
Sending JSON data on webform submission
To start off I would like to point out on a bit of a Drupal noob still. So bare with me please :). I would appreciate it if you can be very specific with your answers. Thank you before hand!
I want ...
1
vote
2answers
42 views
How to define a non-database relationship for the Views module
Basically, I have an array of nids (node ids) stored in a $_SESSION variable, which is updated according to user actions (it holds a history of visited node pages).
Now, I would like to create a view ...
0
votes
0answers
44 views
Problem with save session array
I've got a problem with sessions and AJAX request.
In my module I've got AJAX request, that runs 3 times. And do:
function my_ajax_request(){
if(!isset($_SESSION['set_info']))
{
...
0
votes
1answer
57 views
Integrate Quiz module with any chart api for working locally offline
I'm now working on a local offline network website, which needs a graphical chart report for their quiz, but since its offline i cant use google chart API and there's no way for that, I tried ...
0
votes
1answer
45 views
Building a simple webservice
I need to build a simple JSON webservice for an iPhone application and i would like to give drupal a go :)
Here is the content structure i need, admins should be able to create a Newsletter a news ...
0
votes
0answers
21 views
How to access a node from within rules
I'm writing a new rule for the rules module, and it is designed to be triggered prior to content save so that it can make changes to the node being saved (I'll call it nodeA), as well as create a new ...
5
votes
1answer
392 views
What API function do I use for redirecting to external URLs?
When writing a module, for redirecting to Drupal paths, one uses drupal_goto.
Is there some API function that I should use for redirecting to external pages?
Or is setting the Location with ...
1
vote
1answer
36 views
How to display custom content when viewing node?
I am using the Biblio module and I like the display mode (e.g. full, teaser). I would like to tack on custom text and information when a user views the content below the display. How do I append my ...
0
votes
1answer
27 views
Is there a way to get all values for a particular node?
I would like to create a customized view and search page by writing my own module because I believe that Views is unable to do what I want. This requires me to write my own SQL queries, as well. Is ...
0
votes
0answers
26 views
How to get a list of all templates rendered per page?
I want to see a list of all the templates that were used while rendering the current page. My goal is to gather this list programatically in a custom module. I want to start with D7, but am also ...
1
vote
1answer
46 views
Why timestamp format was chosen for users.created field
When I looked into users.created field in the database, it says, that is has type int. Does anybody know, why Drupal team chose this format instead of datetime? Cause timestamp will end with the end ...
-1
votes
1answer
126 views
use of render array in drupal theming layer?
why render array used in drupal theming layer instead all theming functionality can be achieved by using print statements in templates files.Any analogy that explain use of render array in theming ...
5
votes
1answer
207 views
Using Drupal 7 multisite framework for a ReSTful API and Auth Strategy
My Situation
I have a small app with a public interface. I'm interested in making an API for this to be used in a mobile environment and even eventually as a public API. I want to keep it simple with ...
0
votes
0answers
136 views
problem in showing google map using pretty-photo plugin
i created aview that list the latest locations which contain the latitude and longitude
<a class="map_link_a" ...
2
votes
2answers
674 views
How do I programmatically get a styled version of an image via imagecache in D7?
I want to save locally to the server, a styled version of an image attached to a node. "Styled" as in filtered through a custom image style that I have already configured. What is the correct ...
7
votes
3answers
453 views
How include hash (#) in drupal_goto path?
Is there any way to include a # in drupal_goto?
i want something like this
function MYMODULE_preprocess_node(&$variables) {
$node = $variables['node'];
switch ($node->type) {
case ...
1
vote
0answers
99 views
How to use Form API and and node_submit to insert taxonomy data
I have a content type with a number of text fields and a field linked to a taxonomy vocabulary with about a dozen terms.
I have successfully developed code using the Form API to insert data from my ...
0
votes
1answer
139 views
Is $site_name , $logo ,$site_slogan are part of render array $page? [closed]
is $site_name , $logo ,$site_slogan variables values are store in render array $page? or they are independent from $page? if they are independent.then list of variables that have same nature?
1
vote
0answers
52 views
Image field: How to directly upload an image to get a preview, after choosing a file [duplicate]
Possible Duplicate:
How can I automatically upload images on file selection rather than pressing the upload button?
I'm trying to change the default behavior of Drupal when adding an image ...
0
votes
1answer
110 views
Is it possible to retrieve partial forms?
Is it possible to retrieve only parts of a form for display, that is, only certain form elements?
I am looking at the stack for building the node form, and so far the functions I've seen work with ...
0
votes
2answers
57 views
Is it true that CCK has no API to work with from other modules?
A colleague of mine was trying to import some huge data (from Excel) into a drupal 6 project with pure PHP and MySQL. The result is supposed to be few content-types(CCK), thousands of nodes(CCK nodes ...
0
votes
1answer
417 views
Get all fields for a given content type including title
I'm using field_info_instances($entity,$bundle) to read through every field in a given content type in their weighted order. However, field_info_instances does not include the node title. Why not and ...
1
vote
2answers
167 views
Inserting NULL value with db_query OR db_write_record
I have a table called foo_bar whose fields are as follows
id int(10) unsigned NOT NULL AUTO_INCREMENT
name varchar(255) DEFAULT NULL
amount float DEFAULT NULL
I want to enter the value to this ...
1
vote
1answer
106 views
Which is better approach “taxonomy_get_term” or using SQL to display term name on template file
I have a View page with term id in its URL as argument and I have found two ways to display term names on Views template file.
One is using taxonomy_get_term
and the other one is consulting DB ...
1
vote
1answer
830 views
Dependent dropdown values up to 4 select boxes
We are working on the form API which having 4 dependent drop downs, and also the dependent drop down having the option to Add one more (Adding 4 drop downs once again)or remove one set.
The values of ...
2
votes
2answers
239 views
fetching user photo or image URL
i am trying to fetch loged in users photo to make a welcome block. i have applied a code which is not working
$userphoto = $user->picture;
so what to do to fetching user photo or image URL, any ...
1
vote
1answer
240 views
If end date is empty show “Now” or “Current” or something else
In some of the content type I have a field date with collects start date and end date.
The end date is not required and is empty as default value.
When I show date in teaser or node or view it will ...
0
votes
0answers
242 views
Convert “long text” field to “long text with summary”
On my site I've many nodes with a "long text field".
Is there a way to change, also programmatically, this field to a "Long text with summary" field?
0
votes
1answer
79 views
Multiblock Module D7 $edit
Using the multiblock module, I haven't been able to retrieve the $edit variable my custom hook_block_configure() or hook_block_view(). According to the readme:
add an optional $edit
argument to your ...
0
votes
2answers
642 views
Recoverable fatal error on nodes after leaving Maintenence Mode
our site was in maintenance mode for several days, and when we came out of maintenance mode a bunch (we don't know how many) of our nodes display this error:
Recoverable fatal error: Object of ...
0
votes
0answers
42 views
How can you use the form API to render check boxes inside an item list?
I am creating an item_list as follows:
$element['items'] = array(
'#theme' => 'item_list',
'#attributes' => array( 'id' => 'example' ),
'#value' => NULL,
'#items' =>
...
1
vote
2answers
55 views
Is there a way to make aliases as short as possible?
For instance, if you have three tokens, let's say [city], [state], and [country]
is there a way to do this:
/[city]-[state]-[country]
and then let's say there are three cities, Venice, in different ...
1
vote
1answer
51 views
How to perform action after a file is deleted?
Is there an API hook I could use to run some custom PHP code after a file is deleted? I need access to the name of the file which has just been deleted.
I attempted using hook_nodeapi, and testing ...
1
vote
0answers
100 views
How do I add additional query arguments through the Views API?
I've implemented hook_views_query_alter($view, $query) where I'm replacing a field with a subquery (which returns a single COUNT value). However, even though it works very well to replace the field ...

