Static.class.php 3.28 KB
<?php
class Config_Static 
{
    /**
     * 默认头像定义 (男)
     */
    public static $headImgBoy = array(
        '0256x0256' => '/head/b256x256.gif',
        '0030x0030' => '/head/b30x30.gif',
        '0050x0050' => '/head/b50x50.gif',
        '0060x0060' => '/head/b60x60.gif',
        '0065x0065' => '/head/b65x65.gif',
        '0070x0070' => '/head/b70x70.gif',
        '0080x0080' => '/head/b80x80.gif',
        '0090x0090' => '/head/b90x90.gif',
        '0100x0100' => '/head/b100x100.gif',
        '0150x0150' => '/head/b150x150.gif',
        '0170x0170' => '/head/b170x170.gif',
    );
    
    /**
     * 默认头像定义 (女)
     */
    public static $headImgGirl = array(
        '0256x0256' => '/head/g256x256.gif',
        '0030x0030' => '/head/g30x30.gif',
        '0050x0050' => '/head/g50x50.gif',
        '0060x0060' => '/head/g60x60.gif',
        '0065x0065' => '/head/g65x65.gif',
        '0070x0070' => '/head/g70x70.gif',
        '0080x0080' => '/head/g80x80.gif',
        '0090x0090' => '/head/g90x90.gif',
        '0100x0100' => '/head/g100x100.gif',
        '0150x0150' => '/head/g150x150.gif',
        '0170x0170' => '/head/g170x170.gif',        
    );
    
    /**
     * 切图模式
     */
    public static $cropTypes = array(
        'thumbnail' => 1, // 缩略图方式
        'paste' => 2, // 贴图方式
        'crop' => 3, // 剪切方式
        'resize' => 4, // 大小缩放方式
        'autoCrop' => 5, // 缩略剪切方式
        'customCrop' => 'primary', // 内部自定义
    );
    
    /**
     * 切图模式
     */
    public static $qiniuCropTypes = array(
    		'thumbnail' => 1, // 缩略图方式
    		'paste' => 1, // 贴图方式
    		'crop' => 1, // 剪切方式
    		'resize' => 1, // 大小缩放方式
    		'autoCrop' => 1, // 缩略剪切方式
    		'waterfallCrop' => 1, // 自定义的, 活动瀑布流的图片切图方式
    		'customCrop' => 'primary', // 内部自定义
    );
    
    /**
     * 七牛切图规则模式
    */
    public static $qiniuCropRules = array(
    		'thumbnail' => '?imageMogr2/thumbnail/{size}/strip/quality/80', // 缩略图方式
    		'paste' => '?imageMogr2/thumbnail/!{size}r/crop/{size}/strip/quality/80', // 贴图方式
    		'crop' => '?imageMogr2/crop/{size}/strip/quality/80', // 剪切方式
    		'resize' => '?imageMogr2/thumbnail/{size}/strip/quality/80', // 大小缩放方式
    		'autoCrop' => '?imageMogr2/thumbnail/!{size}r/gravity/Center/crop/{size}/strip/quality/80', // 缩略剪切方式
    		'waterfallCrop' => '?imageMogr2/thumbnail/{size}/strip/quality/80', // 自定义的, 活动瀑布流的图片切图方式
    		'customCrop' => '?imageMogr2/thumbnail/!{size}r/crop/{size}/strip/quality/80', // 内部自定义
    );
    
    /**
     * 推荐的权重(比例)
     *
     * @var array
     */
    public static $recomWeights = array(
        // 特别推荐
		array(
			'attr' => 'recom_type', // 属性
			'value' => 1,           // 属性值
			'weight' => 0.2,        // 20%
		),
        // 编辑推荐
		array(
			'attr' => 'recom_type', // 属性
			'value' => 2,           // 属性值
			'weight' => 0.3,        // 30%
		),
        // 算法推荐
		array(
			'attr' => 'recom_type', // 属性
			'value' => 3,           // 属性值
			'weight' => 0.5,        // 50%
		),
    );
    
}