Archive for 六月, 2010

typo3切图

固定宽高图片缩放,最好先等比压缩,再切割,否则先切的话如果图片大小有几M效率非常低,甚至卡死。以下是一个方法。 (continue reading…)


php切图

<?php
header(‘Content-type: image/jpg’);
$filename=”test.jpg”;   //要切割的大图 (continue reading…)


修改插件XML语言

# Example for overriding values from locallang.php with other values
_LOCAL_LANG.de {
# more = [weiterlesen…]
}


How to removed the “csc-default” wrap from my TYPO3 content elements

I’ve been working on a complex CSS design with a lot of floats for a TYPO3 implementation. It’s been frustrating for me because the layout works fine when hand coded as HTML. But when I use this layout with TYPO3, the layout doesn’t work. (continue reading…)


Typo3后台多语言的面板选择项设置

本文教大家给后台page的内容,加上多语言的Tag,在此之前,我们先来看看现在page内容页面是怎么样的。首先是顶部只有两个Tag,内容部 分 (continue reading…)


JavaScript验证表单函数大全

JavaScript验证表单函数大全

<script>

/*
用途:校验ip地址的格式
输入:strIP:ip地址
返回:如果通过验证返回true,否则返回false;
(continue reading…)


PHP的ASCII码转换类

/**
    *  ascii encode
	*/
	function asciiencode($c){
		$len = strlen($c);
		$a = 0;
		while ($a < $len)
		{
			$ud = 0;
			if (ord($c{$a}) >=0 && ord($c{$a})<=127)
			{
				$ud = ord($c{$a});
				$a += 1;
			}
			elseif (ord($c{$a}) >=192 && ord($c{$a})<=223)
			{
				$ud = (ord($c{$a})-192)*64 + (ord($c{$a+1})-128);
				$a += 2;
			}
			else if (ord($c{$a}) >=224 && ord($c{$a})<=239)
			{
				$ud = (ord($c{$a})-224)*4096 + (ord($c{$a+1})-128)*64 + (ord($c{$a+2})-128);
				$a += 3;
			}
			else if (ord($c{$a}) >=240 && ord($c{$a})<=247)
			{
				$ud = (ord($c{$a})-240)*262144 + (ord($c{$a+1})-128)*4096 + (ord($c{$a+2})-128)*64 + (ord($c{$a+3})-128);
				$a += 4;
			}
			else if (ord($c{$a}) >=248 && ord($c{$a})<=251)
			{
				$ud = (ord($c{$a})-248)*16777216 + (ord($c{$a+1})-128)*262144 + (ord($c{$a+2})-128)*4096 + (ord($c{$a+3})-128)*64 + (ord($c{$a+4})-128);
				$a += 5;
			}
			else if (ord($c{$a}) >=252 && ord($c{$a})<=253)
			{
				$ud = (ord($c{$a})-252)*1073741824 + (ord($c{$a+1})-128)*16777216 + (ord($c{$a+2})-128)*262144 + (ord($c{$a+3})-128)*4096 + (ord($c{$a+4})-128)*64 + (ord($c{$a+5})-128);
				$a += 6;
			}
			else if (ord($c{$a}) >=254 && ord($c{$a})<=255)
			{ //error
				$ud = false;
			}
			$scill .= "&#$ud;";
		}
		return $scill;
	}
$content = html_entity_decode(asciiencode($row['subcontent']));
< ?php
class ascii
{

function decode($str)
{
preg_match_all( “/(d{2,5})/”, $str,$a);
$a = $a[0];
foreach ($a as $dec)
{
if ($dec < 128)
{
$utf .= chr($dec);
}
else if ($dec < 2048)
{
$utf .= chr(192 + (($dec – ($dec % 64)) / 64));
$utf .= chr(128 + ($dec % 64));
}
else
{
$utf .= chr(224 + (($dec – ($dec % 4096)) / 4096));
$utf .= chr(128 + ((($dec % 4096) – ($dec % 64)) / 64));
$utf .= chr(128 + ($dec % 64));
}
}
return $utf;
}

TS-MENU配置(最新版)

######### Main Menu #########################
#includeLibs.gtmenu_class = fileadmin/gtmenu.txt
lib.Menu = HMENU
lib.Menu{
entryLevel = 0
1=TMENU (continue reading…)


TYPO3多语言配置

####### Multiple Languages ####
config.linkVars = L
config.sys_language_uid = 0
config.sys_language_overlay = 1 (continue reading…)


读取任意TCA配置

t3lib_div::loadTCA($tableName);
$GLOBALS['TCA'][$tableName]['columns']...

Copyright © 1996-2010 Add Lives. All rights reserved.
iDream theme by Templates Next | Powered by WordPress