What does tableselect form_state look like?

In Drupal 7, what does the $form_state returned by a form of type tableselect look like?

All I have been able to get out of it is what rows were checked. I need to get what was in those rows.

Here is the code I use to generate my form:

/**
* Get an array of all the terms.
*/
function markit_get_array_terms()
{
$entries = markit_get_markterms();
$termNames = array();
foreach($entries as $row)
{
//drupal_set_message($row['term_name'].$row['term_id'].$row['set_id']);
$termNames[] = array(
//here is where it creates the undefined offset error.
//It doesn't if you make the first comment the actual code on each line
'termName' => t($row['term_name']),//t($row['term_name']),//'termName' => t($row['term_name']),
'termId' => t($row['term_id']),//t($row['term_id']),//'termId' => t($row['term_id']),
'setId' => t($row['set_id']),//t($row['set_id']),//'setId' => t($row['set_id']),
);
}
return $termNames;
}
/**
* Generate form for listing terms
*/
function markit_form_terms_list()
{

$form = array();
$form['terms'] = array(
'#type' => 'fieldset',
'#title' => t('List of Terms'),
);
$header = array(t('Name'), t('ID'), t('SetID'));
$form['terms']['items'] = array(
'#type' => 'tableselect',

How to reset admin password with D7?

I can't log into my D7 site. Problem is, it doesn't seem like D7 uses md5, so I can't manually reset the password.
I tried looking at the user module, but between the drupal_hmac and drupal_hash function I don't know how to reset it.

I _think_ D7 uses sha512 instead of md5, but mysql doesn't have sha512(), and just sha() doesn't work.

CSS Background padding problem

Hi to all, i have an issue with CSS background problem padding different on every assigned pseudo class for examp

.menu-path-front {height:60px; width:61px; color:#ef9d00; padding-top:15px; padding-left:15px; padding-right:15px; }
.menu-path-front:hover, .menu-path-front a.active {  background-image:url(../images/menu-596.png); background-repeat:no-repeat; background-position: 0 0; height:60px; width:61px; color:#FFF; }

so when it hover background image is OK but when link is active then it goes padding once more.

Omit duplicate db table for D7 multisite-multiface on single DB?

I deploy 3 sites, 1 main and 2 subs. Each site, I have a prefix like "main_", "sub1_". Wow, i got more than 120 tables in my database. My question is which tables (two sub sites) I should declare prefix "main_" to? (3 sites have same users, but different content and interface)
Thanks in advance.

Different background image for certain pages

Hey all

I am having a few issues to get this part of my current website functional.

The idea was to have a generic background image for most of the site, but then for certain pages (for each 'trip' that this company provides) the background image needs to change to show something relating to that 'trip'.

Currently I have it working as below:

<div id="bg-image">
      <div>
        <table cellspacing="0" cellpadding="0">
          <tr>
            <td>
              <?php if($is_front): ?>
                <img id="main-image" src="<?php print $base_path . $directory; ?>/images/main-bg.jpg" alt="<?php print $site_name; ?>" />
              <?php else: ?>
                <img id="content-image" src="<?php print $base_path . $directory; ?>/images/content-bg.jpg" alt="<?php print $site_name; ?>" />
              <?php endif; ?>
            </td>
          </tr>
        </table>
      </div>
    </div>

However this only gives me a different background for the front page and nothing else. From my (limited) understanding, I can change each of the pages to a different content type and use the same code - but I am uncertain if I can put as many if>else statements inside each other as I need. There will be 5 trips all together.

Also - this solution is not very elegant...

page.tpl.php per role

Failed to find it anywhere in docs. How it can be done in D7? (without contrib modules)
Thanks.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x