How can a servlet verify if a user is logged in to drupal?

Hello,

I'm working on an ajax (GWT) application that will be embedded into a drupal 7 site.
The app communicates with a servlet. Now the servlet needs to verify if the request is allowed - i.e if the user who caused the request is still logged in to drupal.
How would you implement this?

Right now i'm thinking about implementing it like this:

Change view mode based on field value?

Before on this specific question, the basic problem:

I want to allow a user to choose between image presets/styles for an image in an image field at the top of a node.

Image field only allows coars settings here for all image fields and not on a per entity basis. I have 3 possible workaround I can think of:

1. Have multiple image fields and depending on the size, the person has to choose the right one. This seems hacky for the user.

programmically create a field in a vocabulary

I am making a module.
In the install-file I am creating a vocabulary:

function createVocabularies() {
// create vocabulary mother_tongue
$vocabulary = (object) array(
'name' => 'mother_tongue',
'machine_name' => 'mother_tongue',
'description' => ' taxonomy mother_tongue .',
'hierarchy' => 1,
'module' => 'transto',
'weight' => 1,
);
taxonomy_vocabulary_save($vocabulary);

Secure Pages Error

i downloaded the secure pages module and set to configure it. I think i have configured the base URL wrong because i get the 404 error whatever page i go on, and i can't go back and rectify what i have done.
Does anyone know if there is a file i can access in my file manager or something to rectify. It's really important thanks

views exposed filter select list users with specific role

Hi, to all.

  • I created a content type "coty1".
  • I have 2 user roles that can create that content type. role1, role2.
  1. How can I create view that one of the filter field is expose that I can choose just users that have role1 or role2 (not all the users of the site).
  2. How can I create view that one of the filter field is expose that I can choose just users that realy created one or more from coty1 content type?
  3. How can I create that field in select list ( not autocomplete field )?.

Thanks a lot.

How to convert the Title field on Image type to multi-line text box

So I have a Basic Page content type with a Gallery field that lets the user upload images to that page, when I active the Title field for the user to input a title, it shows as a single text box, but is there a way to convert this to a multi-line text box? I found a thread but it refers to D6 so just wondering if this is possible in D7?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x