I'm using hook_node_access to determine which site visitors can view which content, and all is working fine. The problem is that when viewing a book page, it's showing content that would be rejected by hook_node_access.
Read more »I'm using hook_node_access to determine which site visitors can view which content, and all is working fine. The problem is that when viewing a book page, it's showing content that would be rejected by hook_node_access.
Read more »Hi,
I have sucessfully done a form validation on a specific user field, a file field to be exact.
My code runs perfectly and does exactly what is should.
Now, in user profile, i have also defined a field, named field_fileparsedok which is originally a checkbox which can be of values
0 or 1.
The problem that i now really dont understand is when my validation runs on the file my code looks like this
(pseudocode)
...
setFieldValue(0);
if (fileparsedok) setFieldValue(1);
Hello, I'm new. for the first time I couldn't find the answer in google.
I made an custom field for statistic data for car sales world wide by dates:
each Car model has a maker field (Term reference: makers) and my custom field-stats:
stats field is build from:
1. quantity - how many cars have sold
2. month - each month
3. year - in each year
4. country - where in the world
this field is multiple.
Hello,
I am working on a drupal site and I have an issue. I have logged into my site in two different browsers in one as admin and in another as normal user. After admin changes the password of that particular user, the user who logged in another browser, when refreshed or clicked on any link, gets "Access Denied", Instead I want it to display "Session Expires".
Can anybody help me? Thanks in advance...
Read more »Hi,
I'm new drupal coding standards, I have some doubt on how to use one web form values to another web form?
I will clearly explain further.
Case 1 :
I'm created one web form which works well and creating one more form, in that i want to show values in selection box from first webform, How I will do?
Please help me in this.
Thanks and Regards,
Balaji.
Read more »I add content to an article (either administrator or as content user) and I save the changes as Full HTML. I copy and paste the whole code as summary(i.e. my summary and body of the article I compose are the same.
The changes are seem as expected in the Full HTML format but after a period of time (2-4 hours) the content changes to Filtered HTML and the summary is blank.As a result the layout is all messed up without the Full HTML styling.
I AM TRYING TO SHOW A 3 LEVEL TAB ON THE USER PROFILE , BUT I JUST CANT FIND A WAY OF DOING IT.
I MANNED TO GET SECOND LEVEL WORK BUT NOT 3,THIRD LEVEL IS WHAT I NEED.
below is what i have.
Hello,
I have recently started Drupal and would like to compose a page where I can show a PNG image that I generate from PHP code. The later part is easy if I try it in a separate PHP file (outside Drupal), but when put that PHP code in the Drupal page I only get a large mass of funny letters and characters instead of an image. Please help me understand what I'm doing wrong or if I have missed some fundamental fact about Drupal that I need to learn first.
Read more »Scenario:
I've developed a module where a multisite-administrator can add some text and photos that are available on all sites throughout the system.
Problem:
I need the image info stored in a shared file table (eg, shared.file_managed). All the regular images (not pulled from module) should still live in a site.file_managed table.
Anyone have any documention, tips, or references how to achieve this? Is it possible to change the table_prefix for only certain modules/functions? Or am I going to have to clone file.inc and modify it?
Thanks!
Read more »I could be missing this but I can not seem to find anywhere to download ctools. I go to this page and do not see anywhere to download it. http://drupal.org/project/ctools
Can someone help me out?
I need to combine and return two forms into a single form. The code below combines my two forms...
Read more »Is there any way, when creating a sortable table, that I can specify which field the table should initially be sorted on? I can easily do it like this:
However if I am making a sortable table (by adding clickable headers) I have to order it like this:
Read more »Hi,
I'am stuck with a module that I am testing:
I made an extra form in the node/add screen. I succeeded in saving the data form the extra fields in the database, but it didn't saves the node id.
Can anybody can tell me how to do to get the node id for putting it into the database?
Thanks!
Read more »I am looking for a somewhat easy way for users to be able to upload and download file's to our site.
I see I can create a field to allow this but I want to have one single area where a user can go and see all the files that are currently uploaded, upload additional files and download current files.
I was playing around with the module "filedepot" but seem to be having issues with getting it configured correctly. Is there an easier way to deal with this sort of thing?
Read more »Hi!
I'm making a web application that would insert node into my Drupal database.
So far I figured that I have to insert records to 'NODE' table and 'NODE_REVISIONS' table.
But if I do that, only users that are logged in can see the created node.
What am I missing?
Thanks.
Hi,
I'm currently developping a module which creates 1 node per file uploaded. I've implemented the file_insert() hook and it's working ; I also want to have 1 node per file for my older files so I've implemented the cron() hook. But it doesn't work.
After calling 10 times node_save() in my loop, I get this error :
Read more »Is it correct to add a #process function in order to change #options of an element based on the selected value of another form element?
I'll give an example:
Lets say we have 2 content types:
- order
- product
and 1 taxonomy vocabulary:
- color
In the order node form we have 3 form elements:
- select element, color (taxonomy) required
- select element, product (node reference) required
- input element, order count required
I'm searching for a module which can handle customers swapping items process like http://www.swapden.com/ or http://www.swaphood.com/ ?? is there any module can do so, or i have to code it myself?
Read more »Hi,
I'm trying to write a module that will allow me to display the node content across 2 pages.
I have set up a custom content type 'stadt' with defined pathauto path '/country/city' for which I wish to register a sub-page to be available under /country/city/info.
On this sub-page I wish to display the body and other cck fields for that content type and hide them on the regular path.
Here is the code for my custom module:
Read more »Hi
I have been trying to build a graph using "Charts and graphs " module with open Flash Chart 2 in Drupal 6.
For the graph I am fetching the data from a MySQL database. Below is the function which gets the data and generates the graph:
Read more »I created a views block, with a jump menu format.
the jump menu is Showing cities list in drop down select list. When user select a city, the content is displayed according the city which are linked to Taxonomy terms.
I also checked the "Select the current contextual filter value"...in jump menu settings. Which will show the current user selection,which is OK.
What i need is if someone select a city,then the city to be saved in cookies for somedays before he/she changes the selection.
How can i do this,either in theme layer or custom module.?
I have created an Entity that has no custom fields, just columns in its schema, so it is implemented by Drupal as a flat table in the database.
Using the Views UI I can construct a View that uses the columns in the Entity
but...
In Taxonomy I can't add columns from the Entity
Is this a current limitation of Taxonomy?
Thanks!
Read more »I am new to building modules. I have the Location module enabled, which provides a zip code field for my content type. Everything works great, except that on submit, I want to alter the functionality so that, when saved, the field is validated against the database to check if the zip code actually exists. If not, throws an error.
the validation code to check against the database works fine, I just dont know where to put it. Do I use hook_form_alter on the node form? to I plug it in somehow to work with the Location module validation code?
Read more »I get the feeling that if I want to have the most useful objects possible, I should make them nodes, in which case everything will be a field or custom field..
...but...
if I want to be able to scale, and avoid the custom field scaling issue...
http://drupal.stackexchange.com/questions/16718/fields-scalability
Read more »Hi,
I'm completely new to Drupal, and I'm going to be using it as a basis for building a fairly unique site. After some research it seems to me that I'm going to need to write a custom module, and I'm about ready to dive in, but before I do there a few things about the way Drupal content works on which I'd really appreciate some clarification :
I've built up a fairly complicated entity relationship model and want to implement this in my site. From what I've read it looks to me like I have three options :
Read more »I want to redirect users based on whether they are using the iPhone. How do i do that using drupal? But the tricky thing is, I only want to redirect the front page ... and no other pages.
Read more »I have installed WYSIWYG, IMCE and the API bridge, however when editing an article or page I add the image via the upload button and the image then shows up on the editing page. When I then go to the actual site the image is not shown only the image text is shown (img etc). Please help this is driving me mad!
Thanks
Danny
I enabled the core Poll module and after creating a Poll I noticed that the submit and validate functions are not firing. I even put exit(); in them just to make sure if they actually are activated or not. Can anybody tell me the possible reason for this cause.
If it is important the website was ported from Drupal 6 to Drupal 7
Read more »Hi, We are three members working on a project at different locations. How can we track the database changes that are done individually and upload them into a centralized database for our project development from our local databases individually.Is there any way or a module that tracks the changes in the tables from each database from our local server.Can any one guide us in making this done.
Thanks in Advance...:)
Read more »Hi,
I have a custom module which implements hook_boot() to do mobile detection and redirection.
Sometimes, for unexplained reasons, desktop users get sent to the mobile site.
I setup logging to show which user strings were being redirected and found that no non mobile strings were being explicitly redirected by the module.
My setup works with varnish and cookies but both have been configured to work with the module.
Is there some other cache layer i need to be aware of? I can't understand why this would work only 95% of the time.
Thanks,
Read more »Which one is more performant:
- Using an external database with lots of data next to the Drupal database and calling that data in Drupal when needed, or
- Importing all the data into the Drupal database and continue with one database?
Can someone advice me on that?
Thanks!
Read more »Hi all,
I would like to know how I can pass multiple values from client side to server and read them using php. I know the approach is AJAX but I don't have any clear idea how to the above task correctly
Hello,
I have a php web site, and i don't want to expose it directly due to security issues.
Is it possible to make drupal as proxy? to manage the authentication... as if my website is drupal module.
Thank you!
Hello,
I am currently working on a project to connect ADempiere ERP with Drupal: I would like to display products from ADempiere database, process customer orders within ADempiere...
So far, i have thought of differents possibles ways of realising this:
Read more »I m new to drupal....i have created quiz using quiz module but now i need sub sections in that quiz............
eg .....supose i have quiz on 1 particular subject say Maths and i need to have quiz on different concepts of maths like integretion etc............
is thr any way to do such thing................
plz help
Read more »hello,
I'm trying to alter the way my comments show up.
each comment has 3 fields (fivestar fields) for rating.
now I want to wrap this 3 fields with something like fieldset to hide and show the rating fields as a jQuery accordion (just like fieldset do).
Read more »I haven't used node table to store my content (because I was using forms api to store the content in a database table designed to handle specific data). However, now I am stuck because search by keywords block module in drupal core wont be able to search my custom content. Is there some custom code which I need to write so that my data is also searchable? If yes, which file(s) should I modify? If that doesn't work, is there any way to link my content to the node table so that keyword search works for my custom tables?
Read more »Hi,
I have the following content types - Efforts, Objectives, Groups and the user.
Efforts and Objectives can be shared by both users and groups. A user/group can have multiple objectives and efforts and can also share the same objective/effort.
Is it possible by using node references ? or Is there any other way where I can implement this functionality in drupal ?
Thanks
Read more »I am trying to create a better looking Project Page and would like to add some screen shots to show the interface. I see the add image button but how do I upload a file to this site so I can use it? I searched for my answer but couldnt find any clear documentation on how to do this, thx for your time and information.
Read more »I created a content type news,added a field max_mum_number.
now in my custom module i want to select All news where max_mum_number is 50.
I am not good with Sql and how drupal does this,just to mention am new to drupal development.
Can someone please explain to me,how i can achieve this with JOINS statement.
I am using Drupal 7.
I have created a webform with 2 form components, name and email, I wish to pass the values to the redirect URL (e.g /mysite?name=webform_name_value&email=...), I wonder how to go about it. Below is one of the sample code I tried but didn't work. Please help me to figure out. Thanks
function myhook_form_alter(&$form, &$form_state, $form_id) {
switch($form_id){
case 'my_webform_id':
$name = $form['submitted']['name']['#value'];
$form['#action'] = t('/specificpage?name='.$name);
break;
}
Read more »Hi,
i have a custom table where i store all my content instead of storing it in nodes table. now the key word search block module in drupal core doesnt work for this content as it is designed to work on node table. So how do i make it work for my custom table ? what code tweaking do i need to do and in which file to achieve this search functionality ?
also any other alternative to have keyword search for custom tables ?
How can I check where in a menu tree a node is, and in particular how can I determine what it's ultimate parent is? And how can I display a portion of a menu tree? Here's an example menu tree to illustrate:
If I were on the pages linked to from items 1-4, I'd want to find out that the ultimate parent of these items is m1, and then display only the portion of the menu below m1, ie:
Read more »I add a new view by adminpnel in drupal 7.
Create in the Path: / node /%/ feed
this mean for each url like
will be displayed this view.
Next create a criteria Content: Nid. But here I have a problem, what value put to criteria?
how paste node id from the Path to criteria?
I'm rather new to Drupal, and got lost in documentation,
so I turn to the forums to ask if anyone is willing to show me some of the basics.
I have a simple test site with a basic page called "about", dislpayed on the content area.
---
What I want to do:
create a button inside the "about" page.
when user clicks the button, it should print "hello world!" in the content area.
---
What I have tried:
first I enabled all the needed php options,
and put this in the page:
Hi,
I am working on a functionality which requires a JS file defined in '/sites/all/libraries/SOMEFILE.js' to be included on all pages of the site. Now this JS is not part of any module or even theme. So what should be the best way to include this file?
I know that we can add this in hook_theme() but I don't want to make this part of theme as in future there may be 10-15 more JS files like this and adding all those from hook_theme() will not be a good practice.
Also it is not recommended to include such files from hook_init().
Thanks,
Vikesh M
Good morning,
after trying everything to make Facebook Connect module work, without any success, i've decided to integrate facebook API on my own.
I managed to write the code for facebook related login/logout but i don't know how to implement it with drupal authentication.
Is there a function or something to call during facebook login to automatically log into drupal site too? or is there a way to put my facebook login code into drupal one?
the code (after calling facebook class):
Read more »1. Have the following code in mymodule.module file.
The mymodule.views.inc file is in the module directory. And it contains the following code:
}
}
But neither the echo nor dpm is giving any output.
Read more »