function foo_form_alter(&$form, $form_state, $form_id) { if ($form['#id'] == 'node-form') { if (!empty($form['body_field'])) { $form['body_field']['teaser_js']['#type'] = 'hidden'; $form['body_field']['teaser_include']['#type'] = 'hidden'; } } }
Credit Snipplr.com
You first create some attributes for a product that have no options and are set as text field, then add to cart with their attribute IDs set.
<?php $form['Association_Name']['#title'] = $form['field_association_name']['#title']; $form['Association_Name']['#value'] = "<label><strong>Association Name:</strong></label><br />" . $form['field_association_name'][0]['#default_value']['value']; $form['Association_Name']['#weight'] = $form['field_association_name']['#weight']; $form['field_association_name']['#access'] = 0; ?>
$path = drupal_get_path_alias($_GET['q']);
$(function () { if ($.browser.msie) { $('input:radio').click(function () { this.blur(); this.focus(); }); } });
find ~/httpdocs -maxdepth 1 -name \*.php -exec perl -pi -w -e "s/\<\/body\>/\<\?php\ include_once\('includes\/footer_inc\.php'\);\ \?\>\<\/body\>/g" {} \;
THANK YOU KYRA!!!
$form['search_theme_form']['#attributes'] = array('onfocus' => "if (this.value == 'Search My Site') {this.value = '';}" );
This example makes an admin comment
uc_order_comment_save($order->order_id, 0, $str, 'admin');
Hourly cron job:
crontab -e * 1 * * * /usr/bin/wget -O - -q -t 1 http://www.domain.com/cron.php
RewriteEngine on # If your site can be accessed both with and without the 'www.' prefix, you # can use one of the following settings to redirect users to your preferred # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: # # To redirect all users to access the site WITH the 'www.' prefix, # (<a href="http://example.com/" title="http://example.com/">http://example.com/</a>... will be redirected to <a href="http://www.example.com/" title="http://www.example.com/">http://www.example.com/</a>...) # adapt and uncomment the following: # RewriteCond %{HTTP_HOST} ^example\.com$ [NC] # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] #