Skip to content

Instantly share code, notes, and snippets.

View pvmchau's full-sized avatar

Chau Viet Minh Pham pvmchau

View GitHub Profile
name = Langgo Migrate Main
version = 7.x-1.0-alpha1
description = Module to migrate langgo Drupal 6 to LanggoMainApp.
core = 7.x
package = "Viet Coop"
files[] = migrate.inc
$titles = array(
0 => "Église St-Clare",
1 => "Centre communautaire Maison Le Réveil",
);
foreach ($titles as $title){
// Encode node title for save to db
$title = mime_header_encode($title);
$newnode = new stdClass;
$newnode->title = $title;
@pvmchau
pvmchau / alter_db.php
Created October 4, 2012 15:06
Update database and all table character and collate utf-8
<?php
$result = db_query('SHOW tables')->fetchAll();
dsm($result);
foreach ($result as $table) {
//var_dump($table);die;
$alter_string = "ALTER TABLE $table->Tables_in_drupal7_dev CHARACTER SET utf8 COLLATE utf8_general_ci";
db_query($alter_string);
//db_query('ALTER TABLE \':tablename\' CHARACTER SET utf8 COLLATE utf8_general_ci', array( ':tablename' => $table->Tables_in_drupal7_dev));
}
db_query('ALTER TABLE node MODIFY title VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci');
@pvmchau
pvmchau / Genowell Admin document
Created October 30, 2012 13:44
Customize homepage image and text, customize content header block and right content block imgage
## Genowell Admin Document
- Change homepage image
1. Add a new node to 'Layout image' content type.
1. Add 4 images, you want to display to homepage, to this new node.
1. Check to 'Is current homepage' checkbox.
1. The last updated node and checked in 'Is current homepage' checkbox will be displaying at homepage.
1. Re-update any node if you want to reuse old homepage image of this node.
- Change homepage text
1. Login as administrator account.
1.could not access PID file for nginx ... failed!
$ sudo fuser -k 80/tcp ; sudo /etc/init.d/nginx restart
drush scr
http://ac.buzzwoo.de/
2.resulotion
cvt 1280 1024
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
@pvmchau
pvmchau / fpp_export.sql
Created November 14, 2012 13:07
Sql export query of Fieldable panel panes module
DROP TABLE IF EXISTS `fieldable_panels_panes`;
CREATE TABLE `fieldable_panels_panes` (
`fpid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The primary identifier for the entity.',
`vid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The current version in use for this entity.',
`bundle` varchar(255) DEFAULT NULL COMMENT 'The bundle of the entity.',
`title` varchar(255) DEFAULT NULL COMMENT 'The title of the entity.',
`link` tinyint(4) DEFAULT NULL COMMENT 'Whether or not this entity title will link to another page.',
`path` varchar(255) DEFAULT NULL COMMENT 'The path the title should link to.',
`reusable` tinyint(4) DEFAULT NULL COMMENT 'Whether or not this entity will appear in the Add Content dialog.',
`admin_title` varchar(255) DEFAULT NULL COMMENT 'The title it will appear in the Add Content dialog as.',
@pvmchau
pvmchau / README.md
Created November 28, 2012 08:43
Vietcoop Dashboard Install and Config Document

Vietcoop Dashboard module Document

Requirement

  1. Google analytics module.
  2. Google analytics reports module.
  3. Fieldable panels panes module (optional).
  4. Themekey module.
  5. Oauth module.
  6. Features module.
  7. Views, Views bulk operations module
@pvmchau
pvmchau / influ.make
Last active October 13, 2015 17:39
Make file for Influ campus site
; This file was auto-generated by drush make
core = 7.21
api = 2
projects[drupal][version] = "7.21"
; Modules
projects[admin_menu][version] = "3.0-rc4"
projects[block_class][version] = "1.2"
$view = new view;
$view->name = 'member_blogger';
$view->description = 'Display member for blog page';
$view->tag = '';
$view->base_table = 'users';
$view->core = 6;
$view->api_version = '2';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
@pvmchau
pvmchau / amr_update.php
Last active December 10, 2015 02:38
Deloy blog dashboard, blogger blocks and Newsfeed page.
<?php
$root = '/home/andytruong/live';
$tmp = '/home/andytruong/tmp';
$drush = '/home/andytruong/drush/drush';
function run($cmds = array()) {
if (is_string($cmds)) return run(array($cmds));
foreach ($cmds as $cmd) {
print_r($cmd . "\n");