Tips and Tricks
A Visual Installation Guide on Sneak Preview SAP NetWeaver 04 SP15 Java Edition
Umair Salam wrote Installing and configuring the preview edition of EP on SDN. The weblog describes step by step from download to start server properly. I will give a brief visual guide based on that article. First of all, you should know what you are doing. You are going to install Sneak Preview SAP NetWeaver 04 SP15 Java Edition. If you want to try SP11, read the guide for SP11 instead. By the way, both version is just 90-day evaluation software for trial, not production run.
- sugree's blog
- Add new comment
- Read more
- 3631 reads
How to Boost AdSense Revenue on Drupal Sites
is a context-sensitive advertising network. There are 2 kinds of ads: pay-per-view and pay-per-click. Usually, your site will show pay-per-click ads which give more revenues. However, on most drupal sites, you will see ads related to which does not actually relate to your content. This problem often occurs on index page and its sub-pages. What are the problems?
- sugree's blog
- Add new comment
- Read more
- 1219 reads
Watching replay video is one of my favorite TV program. I don"t mean I didn"t like to watch TV. Anyway, in this busy world, I don"t have opportunity to sit back and watch all TV programs at the broadcast time. So, I like to watch the TV programs via video on-demand services. is one of that services. If you were on a plane during NBA match on last Sunday, . Read more at .
- sugree's blog
- Add new comment
- 1057 reads
Patch for profile.module in Drupal 4.7.0 beta 4
Ah. There is another annoying bug in profile.module which gives wrong data in /profile. Data in fields was not cleared so the data will show in next record if fields in the next record are empty. Below is the patch for this problem.
--- profile.module.orig 2006-01-26 20:43:04.000000000 +0700
+++ profile.module 2006-01-27 20:34:54.000000000 +0700
@@ -393,6 +393,8 @@
foreach ($fields as $key => $field) {
if ($value = profile_view_field($account, $field)) {
$fields[$key]->value = $value;
+ } else {
+ $fields[$key]->value = $value;
}
}
return $fields;
- sugree's blog
- Add new comment
- Read more
- 832 reads
ping.module with extendedPing for Drupal
In recent post, I made a patch for configurable ping.module. Anyway, some ping servers don"t accept simple ping, instead they preferred extendedPing. For example, blo.gs.
diff -u ping.module ping.module
--- ping.module.orig 2005-12-31 21:18:22.000000000 +0700
+++ ping.module 2006-01-27 15:00:35.000000000 +0700
@@ -44,6 +44,32 @@
}
/**
+ * Implemetaion of hook_settings
+ */
+function ping_settings() {
+ $form["ping"] = array(
+ "#type" => "fieldset",
+ "#title" => t("Ping settings"),
+ "#collapsible" => TRUE,
+ );
+ $form["ping"]["ping_pinger_list"] = array(
+ "#type" => "textarea",
+ "#title" => t("URLs to ping"),
+ "#default_value" => variable_get("ping_pinger_list", "http://rpc.pingomatic.com"),
+ "#width" => 40,
+ "#height" => 10,
+ );
+ $form["ping"]["ping_extended_pinger_list"] = array(
+ "#type" => "textarea",
+ "#title" => t("URLs to extended ping"),
+ "#default_value" => variable_get("ping_extended_pinger_list", ""),
+ "#width" => 40,
+ "#height" => 10,
+ );
+ return $form;
+}
+
+/**
* Call hook_ping() in all modules to notify remote sites that there is
* new content at this one.
*/
@@ -58,11 +84,32 @@
*/
function ping_ping($name = "", $url = "") {
- $result = xmlrpc("http://rpc.pingomatic.com", "weblogUpdates.ping", $name, $url);
+ $pingers = explode("\n", variable_get("ping_pinger_list", "http://rpc.pingomatic.com"));
+ foreach ($pingers as $pinger) {
+ $pinger = trim($pinger);
+ if (empty($pinger)) {
+ continue;
+ }
+ $result = xmlrpc($pinger, "weblogUpdates.ping", $name, $url);
+
+ if ($result === FALSE) {
+ watchdog("directory ping", t("Failed to notify %pinger (site). %message", array("%pinger" => $pinger, "%message" => xmlrpc_error_msg())), WATCHDOG_WARNING);
+ }
+ }
- if ($result === FALSE) {
- watchdog("directory ping", t("Failed to notify pingomatic.com (site)."), WATCHDOG_WARNING);
+ $pingers = explode("\n", variable_get("ping_extended_pinger_list", ""));
+ foreach ($pingers as $pinger) {
+ $pinger = trim($pinger);
+ if (empty($pinger)) {
+ continue;
+ }
+ $result = xmlrpc($pinger, "weblogUpdates.extendedPing", $name, $url, "", "$url/rss.xml");
+
+ if ($result === FALSE) {
+ watchdog("directory ping", t("Failed to notify %pinger (site). %message", array("%pinger" => $pinger, "%message" => xmlrpc_error_msg())), WATCHDOG_WARNING);
+ }
}
}
+?>
- sugree's blog
- Add new comment
- Read more
- 1799 reads
Patch for taxonomy.module in Drupal 4.7.0 beta 4
According to patch of blogapi.module, the second problem is to save category properly. Since the taxonomy.module now support load operation in nodeapi hook, $node->taxonomy is not just a plain array of string anymore. Instead it is a standard class so taxonomy.module must handle the object correct.
--- taxonomy.module.orig 2006-01-26 15:33:20.000000000 +0700
+++ taxonomy.module 2006-01-27 20:55:11.000000000 +0700
@@ -644,6 +644,9 @@
}
}
}
+ else if (is_object($term)) {
+ db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term->tid);
+ }
else if ($term) {
db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term);
}
- sugree's blog
- Add new comment
- Read more
- 931 reads
Recent comments
3 years 4 weeks ago
3 years 9 weeks ago
3 years 9 weeks ago
3 years 10 weeks ago
3 years 10 weeks ago
3 years 12 weeks ago
3 years 12 weeks ago
3 years 12 weeks ago
3 years 12 weeks ago
3 years 13 weeks ago