If I want to use global $user in a php file outside the drupal system, how far into the boostrap using drupal_boostrap() must I go. I don't want to use DRUPAL_BOOTSTRAP_FULL since it sets the HTTP header.
...
Drupal 6, Redirect automatically when selecting deepest item from a hierarchycal tree, like:
Tree Parent
.|Child 1
....|_Child 1.1
.|_Child 2
Redirect action must occour only on the last items: Child 1.1 and Child 2
Destination of creat different content types, will be defined in js array.
But how to send hierarchical selec...
In a drupal block, you can access the node variables by using node_load(arg(1)). But how do you get the comment variables in a block?
...
hi,
1) can I disable links of parents items in Drupal menus ? (In particular if I'm using the Nice Menu module ? I don't have any page to link to the parent items.
2) can I disable the links on the breadcrumbs ? I guess I have to change the php code for that.
thanks
...
I am developing a custom theme for our Drupal based website, and I needed to log out to check on the look of the site for an anonymous user.
Once I logged out, I could not log back in. I tried several admin accounts, on several computers, and none of them worked.
Thankfully, my laptop loads the website logged in as admin. From there, I...
I would like to retrieve a cck field "field_info" in my form alter to insert into another table when user is submitting. This doesn't seem to work.
//mymodule_form_alter() implemented
function mymodule_form_mysubmit{
$test = $form['field_info']['#value'];
//insert stuff code
}
Is there any mistake in th...
Hi All,
I am starting to create a site that uses Drupal. One of my requirements is that nobody will see any "real" content until they log in. The home page will basically be a static page with a logo, some basic "this is what the site does" copy, and then a login form. If you don't login, you can then only see some other static pages...
how can I know in Drupal if the role of the logged-in user ?
In the $user variable there is not role information.. I need to specify specific php code depending on the user role in my custom module.
N.B. In $user there is a field 'role' but it always contains "authenticated user". What I need to know is the specific role (I've created ...
I'm writing a custom module, and I would like to do some checks before the node is deleted. Is there a hook that gets trigerred before a node is deleted? And is there a way to somehow prevent the deletion? BTW, I'm using drupal6
...
hi,
I'm using the "User Points" module in Drupal to assign points to the users given the rating on some of their nodes.
I visited the menu: admin/user/userpoints from which I can see users scores.
However when I click on one of them, I get "Access Denied" (and I'm the admin id=1).
For example, this link is forbidden for me:
myuserpo...
hi,
I'm using "Users Points Voting API" module to combine "User Points" module and "Fivestar" module.
It works, but not as expected.
When an user rate a post, the author gains N points.
If an user removes its vote, the author loses the N points.
N is a fixed number (I set it in the settings). It is fixed, and not related to the number...
When you get a node, how do you load the previous version (revision)?
I know how loading a revision but not how getting the previous revision number ($node->vid is the current revision).
thanks
...
I am trying to add custom images into Drupal's calendar view by checking 'nid' of a node (or taxonomy term in future). I am writing this custom code in views-view-field--calendar--nid.tpl.
The problem is that, what ever is output by views-view-field--calendar--nid.tpl is also inserted into 'id' attribute of div tag. Please see the secon...
hi,
I'm using FiveStars module and I'm modifying the code. I need to get the last vote of a user for a specific node.
I'm sure that the module stores it, because it displays the stars the user previously selected, when he logs in and re-visits the node.
But I'm not able to find this in the code. (I only found the average vote for a no...
I trying to get the twitter_admin_form and twitter_user_settings form in a div.
/**
* Get twitter form for user
* @param $account
* @type user object
*/
function getTwitterForm($account){
//module_load_include('inc', 'twitter');
module_load_all();
$twitter_form = drupal_get_form('twitter_admin_form');...
Is there any way to place 2 views in a 2 columns page in Drupal without having to install the Panels module ?
N.B. The 2 columns layout should be used only for this page.
thanks
...
I want to use sitename.com/content-title for one possibly two content types.
I can’t seem to add the correct wild card/token the menu hook.
$items['%'] = array(
…
);
Is this possible?
...
I'm needing to set different 'create content' permissions for different user roles. This only appears to work when a particular role has not been given the "administer node" permission. However, without this permission the role does not have permission to control whether or not the node is published (which I require) or to view the conte...
I have a custom view that I set up in drupal. What I would like to do is make a function call of some kind, and then assign the results to a php variable. I would like the contents of the view (as opposed to the results of a view export) in this new variable. Is this feasible? If it is a function call, I would appreciate a small example ...
I'm trying to submit a form and use hook_form_submit.
The problem is the form is displayed via ajax and this results in hook_form_submit not being called.
$items['ajaxgetform/%'] = array(
'page callback' => 'ajaxgetform',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK
);
function ajaxgetform($f...