DrupalBin
Submit Code
About
Recent Posts
Code
Fix for Fix for Code
Fix for Code
Code
Node type whitelist
an axe coach accessories
coach purses married
Fix for de las ghd alturas
de las ghd alturas
Code
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
›
custom long poll service
Fix for custom long poll service
View
Fix
Fixes are not saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Show summary in full view
$counter = 0; global $user; while(!$response) { $query = db_query("SELECT node.nid AS nid, users.name AS users_name, users.uid AS users_uid, node.title AS node_title, node_revisions.body AS node_revisions_body, node_revisions.format AS node_revisions_format, node.created AS node_created FROM node node LEFT JOIN history history_user ON node.nid = history_user.nid AND history_user.uid = %d LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid INNER JOIN users users ON node.uid = users.uid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid WHERE (node.type in ('chat')) AND ((history_user.timestamp IS NULL AND (node.changed > (%d - 2592001) OR node_comment_statistics.last_comment_timestamp > (%d - 2592001))) OR history_user.timestamp < node.changed OR history_user.timestamp < node_comment_statistics.last_comment_timestamp) AND (og_ancestry.group_nid = %d) ORDER BY node_created DESC", $user->uid, time(), time(), $args[0]); $resultcounter = 0; while ($result = db_fetch_object($query)) { $response->chat[] = $result; node_tag_new($result->nid); $resultcounter++; } $query = db_query("SELECT node.nid AS nid, users.name AS users_name, node.title AS node_title, node_revisions.body AS node_revisions_body, node_revisions.format AS node_revisions_format, node.created AS node_created FROM node node LEFT JOIN history history_user ON node.nid = history_user.nid AND history_user.uid = %d LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid INNER JOIN users users ON node.uid = users.uid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid WHERE (node.type in ('command')) AND ((history_user.timestamp IS NULL AND (node.changed > (%d - 2592001) OR node_comment_statistics.last_comment_timestamp > (%d - 2592001))) OR history_user.timestamp < node.changed OR history_user.timestamp < node_comment_statistics.last_comment_timestamp) AND (og_ancestry.group_nid = %d) ORDER BY node_created DESC", $user->uid, time(), time(), $args[0]); $resultcounter = 0; while ($result = db_fetch_object($query)) { $response->command[] = $result; node_tag_new($result->nid); $resultcounter++; } $query = db_query("SELECT node.nid AS nid, users.name AS users_name, node.title AS node_title, node_revisions.body AS node_revisions_body, node_revisions.format AS node_revisions_format, node_data_field_author.field_author_value AS node_data_field_author_field_author_value, node_data_field_author.nid AS node_data_field_author_nid, node.type AS node_type, node_data_field_author.field_dots_value AS node_data_field_author_field_dots_value, node_data_field_author.field_type_value AS node_data_field_author_field_type_value, node_data_field_author.field_xpos_value AS node_data_field_author_field_xpos_value, node_data_field_author.field_ypos_value AS node_data_field_author_field_ypos_value, node_data_field_author.field_deleted_value AS node_data_field_author_field_deleted_value, node_data_field_author.field_cluster_value AS node_data_field_author_field_cluster_value, node.created AS node_created FROM node node LEFT JOIN history history_user ON node.nid = history_user.nid AND history_user.uid = %d LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid INNER JOIN users users ON node.uid = users.uid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN content_type_memo node_data_field_author ON node.vid = node_data_field_author.vid WHERE (node.type in ('memo')) AND ((history_user.timestamp IS NULL AND (node.changed > (%d - 2592001) OR node_comment_statistics.last_comment_timestamp > (%d - 2592001))) OR history_user.timestamp < node.changed OR history_user.timestamp < node_comment_statistics.last_comment_timestamp) AND (og_ancestry.group_nid = %d) ORDER BY node_created DESC", $user->uid, time(), time(), $args[0]); $resultcounter = 0; while ($result = db_fetch_object($query)) { $response->memo[] = $result; node_tag_new($result->nid); $resultcounter++; } $counter++; if ($counter > 20) { return array(); } sleep(1); } if ($response) { return $response; }
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal 5
Drupal 6
HTML
INI
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.
See Also:
Order
Title:
URL:
-1
0
1
Title:
URL:
-1
0
1
Any links you'd like to have associated with the post (Drupal.org issue, Wikipedia article, etc).
File attachments
Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.
Attach new file:
The maximum upload size is
1 MB
. Only files with the following extensions may be uploaded:
jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp phps
.