php

PHP

convert line break to html
echo nl2br($content)

Extend Magento Product Attribute Api

# OPTIONAL, install patch
apt-get install -y patch
 
# patch on command line
cd /var/www/
wget http://www.panticz.de/sites/default/files/api.xml_.diff -O /tmp/api.xml.diff
patch -p2 ./app/code/core/Mage/Catalog/etc/api.xml < /tmp/api.xml.diff
 
wget http://www.panticz.de/sites/default/files/Api.php_.diff -O /tmp/Api.php.diff
patch -p2 ./app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php < /tmp/Api.php.diff
 
 
1. go to magento installation folder, for example /var/www/magento
 
2.

convertToUtf.php

<?php
function convertToUtf($string) {
	$string = str_replace("ü", "ü", $string);
	$string = str_replace("Ü", "Ü", $string);
	$string = str_replace("ö", "ö", $string);
	$string = str_replace("Ö", "Ö", $string);
	$string = str_replace("ä", "ä", $string);
	$string = str_replace("Ä", "Ä", $string);
	$string = str_replace("ß", "ß", $string);
 
	return $string;
}
?>

Useful PHP configuration parameter (php.ini)

# create automaticly a session
session.auto_start = ON
 
# disable global variables
register_globals = OFF
 
# increase upload limit
upload_max_filesize = 50M

HTML / PHP / CMS

Links
http://popuri.us/ - PageRank / link popularity check
http://validator.w3.org/ - W3C Markup Validation Service
Bluefish - HTML / PHP editor for Linux, supports direct edit on FTP
http://ckeditor.com/demo - Online WYSIWYG Editor
SELFHTML - HTML / PHP reference
seitwert.de - shows Google PageRank and statistics for a URL
http://www.meb.uni-bonn.de/html_tutorial/zeichen.htm
http://www.archive.org/ - The Wayback Machine

Do you like this page? Then support it. Please click the AD below and visit the sponsor. Thank you!


Syndicate content