newbie to drupal

Hi,
i am new to using drupal. for to learn drupal aren't there any ways i will to learn it first by practicing it locally before going for more complex things like hosting etc. locally i am running wamp server. but don't know how to use it with drupal. some one please guide me. thank you in advance

multisite multi domain question

Dear friends,

I have built site.com.

Now i need to have various versions of this site eg - a.site.com, b.site.com, c.site.com.

checkbox to SHOW block to authenticated while HIDING from higher role

Hi!

I add a block for certain content types that are only available to authenticated and anonymous user, but NOT any other roles which are my premium roles.

1. PHP in blocks

<?php
  global $user;
  return ((count($user->roles) == 1) && ($user->roles[1] == 'anonymous user' || $user->roles[2] == 'authenticated user'));
?>

Basically I want to show a message if user does not permission 'you need to be a premium member'.

2. Add code to template.php

Need help with php code with token

Noob in PHP needs help:

include DRUPAL_ROOT ."/Translit.class.php";
$translit = new Translit();
echo $translit->Transliterate('tako'); 

This code converts the text "tako" to cyrillic "тако". That works.
Now I want to replace this text dynamic with the text of a node-field, let's say the token's name of the field is [node:field_example]

I tried different codes, but the letters where completely disarranged/wrong.. Please help!

Changing #options for 'select' element with ajax

I have an 'address' form element. It has a process function that inserts form elements in it, like name, surname, street and so on. I also have two select elements for state and country. The country select has ajax attached to it and all it does is that it will replace the whole address in the form. During this the state select will get it's options in process function . The issue I'm having is that I'm getting form error due to the fact that the old value of state select is not present in the new options fo it after it is rebuild by ajax. I've tried to get around this with value callback for the whole address element, and with element_validate for state select element and tried to set it to NULL with form_set_value if the value wasn't present in the new options, but still no success. I know why is this happening but I ran out of ideas how to get this done.

Here is my address process function:

function address_process_element_address($element, &$form_state, $form) {
if ($element['#show_name']) {
$element['name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#maxlength' => 64,
'#required' => $element['#require_name'],
'#default_value' => isset($value['name']) ? $value['name'] : NULL,
'#weight' => -10,
'#attributes' => array(
'class' => array('name')
)
);

Dynamic View for Car Website

I make a view contains only of car manufacturer logos what I want is when click on a logo take me to a page that will display cars for this manufacturer in a view depending on a link or something. how to make this or to assign some arguments and where? please help, I have searched the net but no good result.

In this case we have two different view the fist one will contain manufacturer logos the second one will be on another page contains all cars from that manufacturer or brand.

please advice
best

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x