Archive for 九月, 2010

RTE图片绝对路径

t3lib/class.t3lib_parsehtml_proc.php line533 块注释

                    // Convert abs to rel url
                 if ($imgSplit[$k])    {
                    $attribArray=$this->get_tag_attributes_classic($imgSplit[$k],1);
                    $absRef = trim($attribArray['src']);
                    if (t3lib_div::isFirstPartOfStr($absRef,$siteUrl))    {
                        $attribArray['src'] = $this->relBackPath.substr($absRef,strlen($siteUrl));
                        if (!isset($attribArray['alt']))    $attribArray['alt']='';        // Must have alt-attribute for XHTML compliance.
                        $imgSplit[$k]='';
                    }
                } 
1 Comment more...

ecshop函数列表大全

所有函数功能说明:

lib_time.php
gmtime()
P: 获得当前格林威治时间的时间戳 /$0
server_timezone()
P: 获得服务器的时区 /$0 (continue reading…)


smarty实例教程

smarty实例教程

整个教程分四大部分:
一、模板设计部分
二、程序设计部分
三、实例篇(使用PHP内置MySQL函数)
四、实例篇(使用phplib的DB类)
(continue reading…)

1 Comment more...

Font Files

Identifying Font Files

Differences between Mac and PC files
The PC and Mac differ in the way they store files. On a Mac each file can have two parts called forks. The data fork holds data (text, images, etc.). The resource fork holds resources (icons, fonts, menus, sounds, etc.). There are actually two files linked to one name in the file system. PCs only have one file linked to each name. Macs also have two four character fields stored with the name for each file. They are called the type and creator. The type field tells the Mac software what type of file it is. The creator is a unique signature identifying a program on the Mac. This field tells the Mac OS what program to launch if the files icon is clicked. PCs identify files with a file name extension. This is the characters after a period at the end of the file name. It used to be limited to three characters from the DOS days, but it can now be larger on current Windows versions. This tells Windows both what type of file it is and what program to launch if the icon is clicked. Unlike the Mac, you have to tell Windows what program goes with what extension (this can also be done automatically by a setup program). OS X seems to be moving away from using resource forks as heavily as OS Classic. It also can use file name extensions like Windows and Linux in addition to a file type and creator. This makes files more portable and easier to transmit over networks.

(continue reading…)


RTE文件相对路径转绝对路径

Attached patch adds a setting RTE.default.proc.preserveExternalURLs, which if set to 1 fixes this issue. If someone needs the URLs to be relative, it can be set to 0. (continue reading…)


ImageMagick在图片中写中文的问题及解决

ImageMagick做个水印效果,先做一个简单版本,往图片里添加文字注释
安装ImageMagick和ghostscript(不装会报错:sh:gs:command not found)
如果是linux — CentOS的系统,只需要yum install ghostscript,yum install imagemagick即可 (continue reading…)


typo3 – lockssl 出错

对于虚拟主机lockssl模式2会出现无限reload问题,原因在于https 应该是允许虚拟主机的,只是不允许 NameVirtualHost,需要用 IP Based 虚拟主机,每个虚拟主机占用一个 IP。 (continue reading…)


TYPO3 RTE Tip: Putting code tags inside ul, li, or ol tags

Sometimes I write tutorials about computer stuff. And sometimes I write lists in those tutorials.

The problem I was having with TYPO3 when doing this was that whenever I put a <code> tag inside of an ordered or unordered list, the <code> tag wasn’t properly translated on the frontend of the web site. The < and > brackets around the ‘code’ tag were run through htmlspecialcharacters and were showing up on the front end. (continue reading…)

1 Comment more...

Typoscript: wrap only if content is not empty

Often i run into this problem in TYPO3 : i have to wrap a content element with Typoscript but ONLY if there is content. This has an easy solution but all too often i forget it and have to search it up again. So this time i post it here and maybe it helps others too. (continue reading…)


How to allow embedding of Flash (YouTube videos for example) in the TYPO3 RTE

How to allow embedding of Flash (YouTube videos for example) in the TYPO3 RTE

1 RTE.default.proc {
2 allowTags := addToList(object,param,embed)
3 allowTagsOutside := addToList(object,embed)
4 entryHTMLparser_db.allowTags < RTE.default.proc.allowTags
5 }

How to get rid of those annoying images inserted before links (continue reading…)


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