Sheppard

Fix for taxonomy_node_get_terms_by_vocabulary ain't workin dammit

  1. function company_tracker_sector_activity_view($nid) {
  2.   $output = '';
  3.     $sector_vocab = 2;
  4.   $result = db_query("SELECT node.nid AS nid,
  5.    node.vid AS vid,
  6.    node_revisions.teaser AS node_r

taxonomy_node_get_terms_by_vocabulary ain't workin dammit

  1. function company_tracker_sector_activity_view($nid) {
  2.   $output = '';
  3.     $sector_vocab = 2;
  4.   $result = db_query("SELECT node.nid AS nid,
  5.    node.vid AS vid,
  6.    node_revisions.teaser AS node_r

Aegir installation debug output on Arch linux

  1. [aegir@tonga ~]$ drush hostmaster-install --web_group=http --debug
  2. Bootstrap to phase 0.

Fix for Same field names in query need aliasing to differentiate :-)

  1. /**
  2.  * Because the field names are both called 'name', this is why the results are borked.
  3.  * By aliasing the fieldnames, the problem is circumvented:
  4.  * e.g.

Same field names in query need aliasing to differentiate :-)

  1. function qube_companies_per_role($roles = ''){
  2.   $result = db_query("SELECT r.name, d.name
  3.    FROM {role} r, {term_data} d, {term_access} a
  4.    WHERE d.vid = 1
  5.    AND a.rid = r.rid
  6.    AND a.ti

sql to update created and changed dates

  1. UPDATE node
  2. SET node.created = 1317390787 , node.changed = 1317390787
  3. WHERE node.type = "market_report_item"
  4. AND node.nid IN (SELECT nid FROM term_node WHERE tid = 332)

aegir upgrade transcript (alpha8 to rc1)

  1. aegir@tonga-deploy:~$ sh upgrade.sh.txt
  2. ==> Aegir 0.4-rc1 automated upgrade script
  3. ==> This script makes the following assumptions:
  4.  * you have read UPGRADE.txt and prepared the server accordingl

This works for me

  1. <?php
  2. if (arg(0) != "blog" && arg(1)) {
  3.   print '<a href="/blog" class="active">&lt;-- Back to blog front page</a>';
  4. }
  5. ?>

Fix for Fix for Fix for Fix for blogsanity conditional code

  1. <?php
  2. if (arg(0) != "blog" && arg(1)) {
  3.   print '<a href="/blogsanity" class="active">&lt;-- Back to blogSanity</a>';
  4. }
  5. ?>

Fix for Fix for Fix for blogsanity conditional code

  1. <?php
  2. if (arg(0) != "blog" && arg(1)) {
  3.   // print '<a href="/blogsanity" class="active">&lt;-- Back to blogSanity</a>';
  4.   print '<a href="/blogsanity" class="active">&lt;-- Back to blogSanity</a>

Fix for Fix for blogsanity conditional code

  1. <?php
  2. if (arg(0) != "blogsanity") { // my mistake, shouldn't have used square brackets
  3.   // print '<a href="/blogsanity" class="active">&lt;-- Back to blogSanity</a>';
  4.   print '<a href="/blogsanity

Fix for blogsanity conditional code

  1. <?php
  2. if (arg(0) != "blogsanity") { // my mistake, shouldn't have used square brackets
  3.   print '<a href="/blogsanity" class="active">&lt;-- Back to blogSanity</a>';
  4. }
  5. ?>

blogsanity conditional code

  1. <?php
  2. if (arg[0] != "blogsanity") {
  3.   print '<a href="/blogsanity" class="active">&lt;-- Back to blogSanity</a>';
  4. }
  5. ?>

updated terminal output from drush/aegir hosting-cron

  1. aegir@aonix:~/hostmaster-0.4-alpha8/profiles/hostmaster/modules/hosting/cron$ /usr/bin/php /var/aegir/drush/drush.php hosting-cron --root='/var/aegir/hostmaster-0.4-alpha8' --uri='sandbox.aroq.com' --

terminal output from drush/aegir hosting-cron

  1. aegir@aonix:~/hostmaster-0.4-alpha8/profiles/hostmaster/modules/hosting/cron$ /usr/bin/php /var/aegir/drush/drush.php hosting-cron --root='/var/aegir/hostmaster-0.4-alpha8' uri='sandbox.aroq.com' --de

webform additional processing

  1. <?php
  2. $node->webform['confirmation'] = 'http://' . $_SERVER['HTTP_HOST'] . base_path() . 'node/' . $form_values['submitted_tree']['brochure_requested'];
  3. ?>

older version of aegir crontab

  1. SHELL=/bin/bash
  2. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  3. */1 * * * * /usr/bin/php /var/aegir/drush/drush.php --php=/usr/bin/php hosting-dispatch --root='/var/aegi

aegir crontab

  1. SHELL=/bin/bash
  2. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  3. */1 * * * * /usr/bin/php /var/aegir/drush/drush.php hosting-dispatch --root='/var/aegir/hostmaster-0.4-al

Fix for views exposed filter mods

  1. <?php
  2. // $Id$
  3. /**
  4.  * @file
  5.  * A module to redo the form action with hook_form_alter for what's new views.
  6.  */
  7.  
  8. /**
  9.  * Implementation of hook_form_alter()
  10.  */
  11. function exposed_filter_mods_for

form alter for web form - to get the date order right - not sure why it's not working right in the first place

  1. <?php
  2.   /**
  3.    * Theme override for node/24 webform.
  4.    *
  5.    * The function is named themename_formid.
  6.    */
  7.   function themename_webform_client_form_24($form) {
Syndicate content