PHP最大上传文件大小限制修改

PHP默认的上传文件大小限制为2M,可以修改php.ini文件来增大上传大小。
改成50M需修改如下:
upload_max_filesize = 50M
post_max_size = 100M
memory_limit = 150M

需要保持memory_limit (如果有設定的話) > post_max_size > upload_max_filesize

max_execution_time = 150 脚本执行时间(秒)
max_input_time = 300 脚本解析时间(秒)

执行时间适当改大,保证php脚本的执行不会在上传过程中超时


bcn导航条

方法一:

TS配置

temp.mypath=HMENU
temp.mypath.special=rootline
temp.mypath.includeNotInMenu = 1
#temp.mypath.special.range= 1 | -1
temp.mypath.wrap = <ul>|</ul>
temp.mypath.1=TMENU
temp.mypath.1{
#NO.allWrap= <li>|&raquo;</li>|*|<li>|&raquo;</li>|*|<li  class=”current”>|</li>
NO.allWrap= <li>|&gt;</li>|*|<li>|&gt;</li>|*|<li  class=”current”>|</li>
NO.doNotLinkIt=|*| |*| 1   #No Link in the last node

}
ts_navpath = COA
ts_navpath.10 < temp.mypath

 

方法二:

插件名:julle_navpath

主要代码:

function main($content,$conf)    {
$rL = $GLOBALS[“TSFE”]->tmpl->rootLine;

// Prepare vars:
$linkArr = Array();

// Traverse menuitems:
$length = sizeof($rL);
$start = 0;
$end = $length;
for($i = $start;$i< $end;$i++) {
$pages_row = $rL[$i];
$linkArr[] = ‘<li>’.$this->pi_linkToPage(
$pages_row[“nav_title”]?$pages_row[“nav_title”]:$pages_row[“title”],
$pages_row[“uid”],
$pages_row[“target”]).'</lid>’;

}
//return ‘<ul ‘.$this->pi_classParam(“menu”).’ >’.implode(” > “,$linkArr).'</ul>’;

 

#ts_navpath = USER
#ts_navpath.userFunc = tx_jullenavpath_pi1->main
return ‘<ul>’.implode(” > “,$linkArr).'</ul>’;
}

################################

$rL = $GLOBALS[“TSFE”]->tmpl->rootLine;
// Prepare vars:
$linkArr = Array();
// Traverse menuitems:
for($i = 0;$i< count($rL);$i++) {
$linkArr[] = $rL[$i][“nav_title”]?$rL[$i][“nav_title”]:$rL[$i][“title”];

}
return “/”.implode(“/”,$linkArr);


csv-plugin

wil_importcsv
http://typo3.org/extensions/repository/view/wil_importcsv/current/

cen_csvexport
http://typo3.org/extensions/repository/view/cen_csvexport/current/


TCA配置

$TCA array reference


typo3页面路径

$GLOBALS["TSFE"]->tmpl->rootLine;


flexform用RTE

            <description>
                <TCEforms type="array">
                    <config type="array">
                    <type>text</type>
                    <cols>40</cols>
                    <rows>5</rows>
                    </config>
                    <label>Text</label>
                    <defaultExtras>richtext[*]:rte_transform[mode=ts_css]</defaultExtras>
                </TCEforms>
            </description>


TS连接字符串

  1=TMENU
  1{
    noBlur = 1
    #expAll = 0   #sub menu all show
    wrap = <ul>|</ul>
    NO.stdWrap.htmlSpecialChars = 1
    NO.allWrap.dataWrap= <li>|
    NO.wrapItemAndSub = |</li>
    NO.ATagParams.dataWrap =  title="{field:title}" 
   
    ACT < .NO
    ACT = 1
    #ACT.linkWrap = <li class="current" onmouseover="show(this)" onmouseout="hide(this)">|</li>
    #ACT.ATagParams = class="current" 
    ACT.ATagParams.dataWrap := appendString(‘ class="current"’)
   
  }


TS |*|与|| 用法

当我们在网站上面经常会出现:  TYPO3中文TYPO3教程  |  TYPO3技术   这样的效果,就是只需要中间有竖线分割符,那么用TYPO3 TS怎么呢?
请看下面介绍:
linkWrap = |&nbsp;&nbsp;&#124;&nbsp;&nbsp; |*| |&nbsp;&nbsp;&#124;&nbsp;&nbsp; |*| |

|*|可以把一个值分成三部分(first,middle,last),然后||可以把分出来的值再细分成几段。
比如:TS:backColor = red || yellow |*||*| blue || olive
这里面的
First:red||yellow
middle:为空
last:blue||olive
根据:If the middle-value is empty, the last part of the first-value is repeated
如果middle为空,那么要放middle的值的地方就用first值中的最后一个取代。
也就是说,在n个菜单列表中,n>4,
第1个为 red
第2个为 yellow
倒数第2个为 blue
倒数第1个为olive,
中间一律为yellow也就是first中的最后一个
就这个例子如果n=4,那么他们分别是 red,yellow,blue,olive
如果n=3,则是red,blue,olive(因为last的优先级最高)
如果n=2则是blue,olive(同上)
n=1则为blue

 

转载:

TYPO3中文网

本文地址:

http://www.51typo3.cn/typoscript/70.html


GIF 剪切空白边问题

ImageMagick  最新版本中

t3lib\class.t3lib_stdgraphic.php
line 2322行, t3lib\class.t3lib_stdgraphic.php
$params .= ‘ -crop ‘.$data[‘origW’].’x’.$data[‘origH’].’+’.$offsetX.’+’.$offsetY.’ ‘;
改成
$params .= ‘ -crop ‘.$data[‘origW’].’x’.$data[‘origH’].’+’.$offsetX.’+’.$offsetY.’! ‘;
 


TCA-select

[‘columns’][fieldname][‘config’] / TYPE: “select”

http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/2/#id4425347

fieldname

Selectors boxes are very common elements in forms. By the “select” type you can create selector boxes. In the most simple form this is a list of values among which you can chose only one. In that way it is similar to the “radio” type above. (continue reading…)


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