27/03/2012

Drupal7: tabledrag.js error

Drupal version:
D7X

--

Problem:
tabledrag.js not working in some shared hostings.

--

Workaround:
Go to /admin/config/development/performance
Check the Aggregate JavaScript files.

08/12/2011

Ubuntu 11.10: FTP, vsftpd & Virtual Akun

Instal vsftpd & libpam-pwdfile

Sunting /etc/vsftpd.conf

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
virtual_use_local_privs=YES
guest_enable=YES
user_sub_token=$USER
local_root=/var/www/situs/$USER
hide_ids=YES

Sunting /etc/pam.d/vsftpd

# Customized login using htpasswd file
auth required pam_pwdfile.so pwdfile /etc/vsftpd.passwd
account required pam_permit.so

Reka virtual akun

sudo htpasswd -cd /etc/vsftpd.passwd virtualAkun

Reka direktori baru

sudo mkdir /var/www/situs/virtualAkun

Sunting permisi/kepemilikan

sudo chown ftp:ftp /var/www/situs/virtualAkun
sudo chmod +w /var/www/situs/virtualAkun

Daur vsftpd

sudo service vsftpd restart

Coba~coba

is@oneiric:~$ ftp 127.0.0.1
Connected to 127.0.0.1.
220 (vsFTPd 2.3.2)
Name (127.0.0.1:is): webDevel
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

Catatan:
Backup, backup & backup!
Ubah "virtualAkun" sesuai selera

Sumber bacaan:
https://help.ubuntu.com/11.10/serverguide/C/ftp-server.html
http://howto.gumph.org/content/setup-virtual-users-and-directories-in-vsftpd

03/12/2011

Drupal 7: Print Block in tpl.php

<?php
  print views_embed_view($name = 'blockName', $display_id = 'blockId');
?>

or

<?php
  $block = module_invoke('blockType', 'block_view', 'blockId');
  print render($block); ?>
?>

or

<?php
  $block = block_load('block', id);
  $output = drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
  print render($output);
?>

15/11/2011

Ubuntu 11.10: Problem! I Solved

Ikon removeable media (USB flash, CD dll.) tak nongol di desktop.
run command

gsettings list-recursively | grep nautilus | less

if

org.gnome.nautilus.desktop volumes-visible false

run command

gsettings set org.gnome.nautilus.desktop volumes-visible true

endif