Archive for 六月, 2010

preg_replace

preg_replace(“/<hr.*?>/”,”###SEPARATE###”,$this->pi_getFFvalue($this->cObj->data[‘pi_flexform’], ‘description’ , ‘text’));

加?号替换所有,不加?只替换第一个。


linux mv

linux当前文件内容移动到上一层:

mv * ../


Linux下mysql备份 恢复

比如我们要备份mysql中已经存在的名为linux的数据库,要用到命令mysqldump
命令格式如下:
[root@linuxsir01 root]# mysqldump -u root -p linux > /root/linux.sql
Enter password:在这里输入数据库的密码
(continue reading…)


select code

function selectCode(a)
{
	// Get ID of code block
	var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];

	// Not IE
	if (window.getSelection)
	{
		var s = window.getSelection();
		// Safari
		if (s.setBaseAndExtent)
		{
			s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
		}
		// Firefox and Opera
		else
		{
			var r = document.createRange();
			r.selectNodeContents(e);
			s.removeAllRanges();
			s.addRange(r);
		}
	}
	// Some older browsers
	else if (document.getSelection)
	{
		var s = document.getSelection();
		var r = document.createRange();
		r.selectNodeContents(e);
		s.removeAllRanges();
		s.addRange(r);
	}
	// IE
	else if (document.selection)
	{
		var r = document.body.createTextRange();
		r.moveToElementText(e);
		r.select();
	}
}

后台插件添加Link

$tempurlsel = ‘<a href=”#” onclick=”openLinkBrowser();return false;”>’.
‘<img’.t3lib_iconWorks::skinImg($this->doc->backPath,’gfx/link_popup.gif’,”).’ title=”” alt=”” />’.
‘</a>’;

function openLinkBrowser()    {    //
var url = “‘.$this->doc->backPath.’browse_links.php?act=page&mode=wizard&P[itemName]=urltoolurl&P[formName]=editform”;
browserWin = window.open(url,”aeurltoolTypo3WinBrowser”,”height=350,width=600,status=0,menubar=0,resizable=1,scrollbars=1″);
browserWin.focus();
}

ps: itemName是input的name, formname是form表单的name


HTTP HEADER

含义
1 网址协议不支持的协议
2 检测器内部错误
3 网址格式不正确 (continue reading…)

delete button missing

在根page的option下设置TS:

mod.web_txtemplavoilaM1.enableDeleteIconForLocalElements = 1


.htaccess配置php.ini

php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value allow_call_time_pass_reference On


jQuery plugin: Autocomplete

download:http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

demo: http://jquery.bassistance.de/autocomplete/demo/ (continue reading…)


tt_news常用TS配置

tt_news常用TS配置:
(continue reading…)


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