Magento: Search by Category

<?php
$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/catalogsearch/form.mini.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

<?php
$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/catalogsearch/catalogsearch.xml.diff";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

<?php
$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/catalogsearch/Query.php.diff";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

Links:
http://stackoverflow.com/questions/4273898/how-to-sort-a-category-list-array-alphabetically-in-magento

Magento: GoogleAnalytics fix

<?php
$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/GoogleAnalytics/Ga.php.diff";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

wget http://www.panticz.de/sites/default/files/magento/GoogleAnalytics/Ga.php.diff -O /tmp/Ga.php.diff
patch -p2 ./app/code/core/Mage/GoogleAnalytics/Block/Ga.php < /tmp/Ga.php.diff

#
# TEST
#
# get source code
cd /tmp/
svn checkout http://svn.magentocommerce.com/source/branches/1.4-trunk

# trunk
cd /tmp/1.4-trunk/

# pack
tar cjf GoogleAnalytics.tar.bz2 app/code/core/Mage/GoogleAnalytics/ app/design/frontend/base/default/layout/googleanalytics.xml app/locale/en_US/Mage_GoogleAnalytics.csv --exclude=.svn

# transfer archive to your magento machine
scp /tmp/1.4-trunk/GoogleAnalytics.tar.bz2 root@YOUR_MAGENTO_IP:/tmp

# extract
diff app/code/core/Mage/GoogleAnalytics/ /var/www/app/code/core/Mage/GoogleAnalytics/ -r

# Links
http://www.magentocommerce.com/boards/viewthread/23325/P45/
http://www.magentocommerce.com/boards/viewthread/77774/#t215469

Install myTinyTodo under Ubuntu

# install webserver
http://www.panticz.de/install_webserver

# download and extract mytinytodo
wget http://www.mytinytodo.net/latest.php -O /tmp/mytinytodo.zip
unzip /tmp/mytinytodo.zip -d /var/www

# OPTIONAL: download and extract german translation
wget http://www.mytinytodo.net/lang/zip/de.zip -O /tmp/de.zip
unzip /tmp/de.zip -d /var/www/mytinytodo/lang/

# rename directory to "todo"
mv /var/www/mytinytodo/ /var/www/todo/

# create db
echo "CREATE DATABASE todo; GRANT all ON todo.* TO 'todo'@'localhost' IDENTIFIED BY 'pass';" | mysql -u root -p

# set file permissions
chow

Magento disable main category mouse over navigation

# view mouse over only for first sub-category
cp ./app/code/core/Mage/Catalog/Block/Navigation.php ./app/code/local/Mage/Catalog/Block/Navigation.php
wget -nv http://www.panticz.de/sites/default/files/magento/nav-container-mouse-over/Navigation.php.diff -O /tmp/Navigation.php.htmlChildren.diff
patch -p2 ./app/code/local/Mage/Catalog/Block/Navigation.php < /tmp/Navigation.php.htmlChildren.diff

# to complete disable mouse over change
if ($hasChildren && $level == 0){
to
if ($hasChildren && $level == -1){
in
./app/code/local/Mage/Catalog/Block/Navigation.php in line 223

Magento customized "Shop by" Navigation

<?php
$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/local.xml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/layer_view.css";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/my.view.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/filter.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/filter.select.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/state.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/state.select.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

OPTIONAL: state.phtml with filter
ToDo: HowTo get avaiable options in a category for a filter?
<?php
$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/state.phtml.with.filter.dev";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

other files
./app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php
./app/design/frontend/default/default/layout/catalogsearch.xml

Links
http://classyllama.com/development/magento-development/the-better-way-to-modify-magento-layout/
http://docs.magentocommerce.com/Mage_Catalog/Mage_Catalog_Block_Layer_Filter_Attribute.html
http://www.mageintern.de/magento-shop-design/magento-navigation/filternavigation-layered-nav-mit-drop-down-auswahl.html
http://www.magentocommerce.com/boards/viewthread/28220/

IPMI

ipmitool
www.panticz.de/ipmitool

apt-add-repository universe
ipmi-sensors

# dep: supermicro tool
ipmicfg -dhcp off
ipmicfg -dhcp on
ipmicfg -m

UID identificator
BMC_IP=10.0.1.123
BMC_USER=ADMIN
BMC_PASS=ADMIN

Posts
22 (TCP) SMASH
80 (TCP) HTTP (unsecure Webinterface)
443 (TCP) HTTPS (secure Webinterface)
623 (UDP) IPMI
2937 (TCP) KVM console
5900 (TCP) remote console (KVM over IP, on webinterface)
5901 (TCP) Video (remote console)
5120 (TCP) CD (remote console)
5123 (TCP) Floppy (remote console)

Compile XBMC

sudo apt-get install subversion
cd $HOME
svn checkout http://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk xbmc

sudo apt-get install autopoint

sudo add-apt-repository ppa:team-xbmc-svn
sudo apt-get update

apt-get build-dep -y xbmc

# GLES only
apt-get install libegl1-mesa-dev libgles2-mesa-dev

cd xbmc

./bootstrap

# default config
./configure

# minimal GLES config
./configure --enable-gles --enable-openmax --disable-pulse --disable-optimizations --disable-ccache \
--disable-xrandr --disable-vdpau --disable-webserver --disable-dvdcss --disable-hal --disable-avahi \
-

Logitech QuckCam Webcam on OpenWrt

install
opkg install kmod-usb-core kmod-usb2 kmod-video-core kmod-video-gspca-core kmod-video-gspca-zc3xx motion

configure
sed -i 's|output_normal on|output_normal off|g' /etc/motion.conf
sed -i 's|webcam_localhost on|webcam_localhost off|g' /etc/motion.conf

start
motion

view
http://YOUR_OPENWRT_IP:8081

OPTINAL: anable acces from outside
iptables -A input_wan -p tcp --dport 8081 -j ACCEPT

links
http://eko.one.pl/index.php?p=openwrt-webcam

OpenWrt configure Time Server (ntpclient)

# navie
# rdate
# hotplug.d/iface/40-rdate

# v1
#opkg install ntpdate
#ntpdate ntp1.fau.de

# v2
opkg install ntpclient

# configure timezonte for berlin
sed -i 's|UTC|CET-1CEST,M3.5.0,M10.5.0/3|g' /etc/config/system

# create cronjob
# /etc/crontabs/root
#*/10 * * * * /etc/init.d/S55ntpclient

# test
#hwclock -w

# LINKS
http://www.hendlsofen.de/WRT54GL/deu/WRT54GL_NTPclient.html

PS3 Media Server on Synology DiskStation DS411+

# login as root to your DS411
ssh root@

# download lastest java
wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=42723 -O /tmp/java.bin

# extract
cd /tmp
sh /tmp/java.bin

# move to right place
mv /tmp/jre1.6.0_*/ /usr/java

# get PMS
wget http://ps3mediaserver.googlecode.com/files/pms-generic-linux-unix-1.20.412.tgz -P /tmp

# extract
tar xzf /tmp/pms-generic-linux-unix-1.*.tgz

# move
mv /tmp/pms-linux-1.*/ /usr/pms

# set port to 5002
cat < /usr/pms/PMS.conf
port=5002
folders=/volume1/video
EOF

# create start script
cat < /