nid); $variables['scripts'] = drupal_get_js(); } } /** * When a user places a bid, we tell live_update about our new content **/ /** * Implementation of hook_bid_alter(). * * This hook is called after a user bid has been validated and is about ready * to be saved to the system. You can use this hook to alter details about the * bid before it is saved, or even stop it from being saved at all. This hook * should *not* be used to validate bids; use hook_form_alter() to add your own * validation function to the "bid_table_form" form instead. If any * implementation of hook_bid_alter() returns FALSE, kool_auction will not save * the bid details to the database as it normally does, nor will it send an * outbid notification to the previous bidder if so configured. You can take * advantage of this if you're saving stuff to the database your own special * way, but please try to avoid doing it this way if you can. * * @param &$node * The node object up for auction. Note that $node->sell_price contains the * previous bid value at this point, *not* the new high bid which is just now * being accepted. For that value, check (or set) $bid_record['amount']. * @param &$bid_record //ignore for now * An array of values about to be inserted into {kool_auction_bids}. The keys * are 'nid', 'uid', 'time', and 'amount', all of which should be self- * explanatory. * @param &$auc_record //ignore for now * An array of values which this node's record in {kool_auction} will be updated * with. The keys are 'nid', 'high_bidder', and 'bid_count'. 'high_bidder' is * the uid of the user. * @return * FALSE if kool_auction should not save the bid data and send a notification as * normal. All other return values are ignored. */ function live_update_kool_auction_bid_alter(&$node, &$bid_record) { $settings = array( 'target' => '#node-'. $node->nid, 'method' => 'replaceWith', 'effect' => 'fade', ); // update content only for the specific node that is bid upon $html = 'xyz...';//node_view(node_load(array('nid' => $node->nid))); live_update_update_content('node/'.$node->nid, $html, $settings); return; }