Skip to content

Instantly share code, notes, and snippets.

View and1truong's full-sized avatar
🎯

Hong Truong and1truong

🎯
View GitHub Profile
<?php
// $Id$
/**
* @see Schema API documentation: http://api.drupal.org/api/group/schemaapi/6
* @see http://api.drupal.org/api/function/drupal_get_schema/6
* @see http://api.drupal.org/api/function/db_add_field/6
*/
/**
<?php
// $Id$
/**
* In drupal_error_handler, adding the following:
*/
if (strstr($entry, 'comment_nodeapi')) {
print ($entry);
xdebug_print_function_stack();
/**
* $Id$
*
* I did, indeed, have both of my equal-height columns set with the negative margin-bottom
* and positive padding-bottom (3000px, in my case) as well as making the enclosing div equal
* to a height of 100% (as well as both the HTML and BODY elements). The site worked fine under
* FireFox and IE6 (and less).
*/
.sidebar {
<?php
// $Id$
/**
* Implements hook_menu_alter().
*/
function w_menu_alter(&$items) {
foreach (node_get_types('types', NULL, TRUE) as $type) {
$type_url_str = str_replace('_', '-', $type->type);
$items['node/add/'. $type_url_str]['access callback'] = 'w_node_access';
@and1truong
and1truong / download-vietnamese-audio-bible.php
Created October 3, 2011 15:02
Download Vietnamese Audio Bible from VietChristian.com
<?php
/**
* PHP script to download Vietnamese audio Bible from VietChristian.com website.
*
* Make bible directory, change to that new one, save this script as download-vietnamese-audio-bible.php
* to that directory as
* Run the script:
* php ./download-vietnamese-audio-bible.php
*
* by Andy Truong at <xeko.vn>
@and1truong
and1truong / c2s-satellite.make
Created January 29, 2012 10:07
Drush make file for cloud://Shop satellite
; System Requirements ===
;
; Default Drupal requirements
;
; Requires nginx 1.0.11 (latest stable version)
; Reason: no reason to chose Apache httpd.
;
; Requires PHP >= 5.3
; Reason: redis_ssi, predis
@and1truong
and1truong / c2ss.remove-txts.patch
Created January 29, 2012 17:50
Remove Drupal 7 txt files
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
deleted file mode 100644
index d12ca6e..0000000
--- a/CHANGELOG.txt
+++ /dev/null
@@ -1,1425 +0,0 @@
-
-Drupal 7.11 xxxx-xx-xx (development version)
-----------------------
-
@and1truong
and1truong / drupalvietnam.txt
Created February 7, 2012 08:44
Drupal Vietnam
Drupal Vietnam:
- http://drupalvietnam.org/
- http://groups.drupal.org/vietnam
- https://www.facebook.com/pages/Drupal-Vietnam/130401056619
- http://linkhay.com/drupal
- http://drupal.org/profile/country/Viet%20Nam
@and1truong
and1truong / google-reader-subscriptions.xml
Created February 13, 2012 07:10
My Reader subscriptions
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Andy subscriptions in Google Reader</title>
</head>
<body>
<outline title="Drupal Specialists" text="Drupal Specialists">
<outline text="Angry Donuts" title="Angry Donuts" type="rss"
xmlUrl="http://www.angrydonuts.com/rss.xml" htmlUrl="http://www.angrydonuts.com"/>
<outline text="Bojhan Somers" title="Bojhan Somers"