Changeset 931
- Timestamp:
- 06/05/10 20:05:38 (20 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
classes/actions/ActionSettings.class.php (modified) (1 diff)
-
classes/modules/blog/Blog.class.php (modified) (2 diffs)
-
classes/modules/user/User.class.php (modified) (2 diffs)
-
config/config.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/classes/actions/ActionSettings.class.php
r756 r931 277 277 $aUserAvatars = array(); 278 278 if($sPathOld) { 279 foreach (array (100,64,48,24,0) as $iSize) {279 foreach (array_merge(Config::Get('module.user.avatar_size'),array(100)) as $iSize) { 280 280 $aUserAvatars[$iSize] = $this->oUserCurrent->getProfileAvatarPath($iSize); 281 281 } -
trunk/classes/modules/blog/Blog.class.php
r929 r931 797 797 798 798 if ($oImage && $sFileAvatar=$this->Image_Resize($sFileTmp,$sPath,"avatar_blog_{$oBlog->getUrl()}_48x48",Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),48,48,false,$aParams,$oImage)) { 799 $this->Image_Resize($sFileTmp,$sPath,"avatar_blog_{$oBlog->getUrl()}_24x24",Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),24,24,false,$aParams,$oImage); 800 $this->Image_Resize($sFileTmp,$sPath,"avatar_blog_{$oBlog->getUrl()}",Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),null,null,false,$aParams,$oImage); 799 $aSize=Config::Get('module.blog.avatar_size'); 800 foreach ($aSize as $iSize) { 801 if ($iSize==0) { 802 $this->Image_Resize($sFileTmp,$sPath,"avatar_blog_{$oBlog->getUrl()}",Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),null,null,false,$aParams,$oImage); 803 } else { 804 $this->Image_Resize($sFileTmp,$sPath,"avatar_blog_{$oBlog->getUrl()}_{$iSize}x{$iSize}",Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),$iSize,$iSize,false,$aParams,$oImage); 805 } 806 } 801 807 @unlink($sFileTmp); 802 808 /** … … 821 827 */ 822 828 if($oBlog->getAvatar()) { 823 @unlink($this->Image_GetServerPath($oBlog->getAvatarPath(48))); 824 @unlink($this->Image_GetServerPath($oBlog->getAvatarPath(24))); 825 @unlink($this->Image_GetServerPath($oBlog->getAvatarPath(0))); 829 $aSize=array_merge(Config::Get('module.blog.avatar_size'),array(48)); 830 foreach ($aSize as $iSize) { 831 @unlink($this->Image_GetServerPath($oBlog->getAvatarPath($iSize))); 832 } 826 833 } 827 834 } -
trunk/classes/modules/user/User.class.php
r929 r931 1091 1091 $oImage->output(null,$sFileTmp); 1092 1092 1093 if ($sFileAvatar=$this->Image_Resize($sFileTmp,$sPath,'avatar_100x100',Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),100,100,false,$aParams)) { 1094 $this->Image_Resize($sFileTmp,$sPath,'avatar_64x64',Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),64,64,false,$aParams); 1095 $this->Image_Resize($sFileTmp,$sPath,'avatar_48x48',Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),48,48,false,$aParams); 1096 $this->Image_Resize($sFileTmp,$sPath,'avatar_24x24',Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),24,24,false,$aParams); 1097 $this->Image_Resize($sFileTmp,$sPath,'avatar',Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),null,null,false,$aParams); 1093 if ($sFileAvatar=$this->Image_Resize($sFileTmp,$sPath,'avatar_100x100',Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),100,100,false,$aParams)) { 1094 $aSize=Config::Get('module.user.avatar_size'); 1095 foreach ($aSize as $iSize) { 1096 if ($iSize==0) { 1097 $this->Image_Resize($sFileTmp,$sPath,'avatar',Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),null,null,false,$aParams); 1098 } else { 1099 $this->Image_Resize($sFileTmp,$sPath,"avatar_{$iSize}x{$iSize}",Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),$iSize,$iSize,false,$aParams); 1100 } 1101 } 1098 1102 @unlink($sFileTmp); 1099 1103 /** … … 1118 1122 */ 1119 1123 if($oUser->getProfileAvatar()) { 1120 @unlink($this->Image_GetServerPath($oUser->getProfileAvatarPath(100))); 1121 @unlink($this->Image_GetServerPath($oUser->getProfileAvatarPath(64))); 1122 @unlink($this->Image_GetServerPath($oUser->getProfileAvatarPath(48))); 1123 @unlink($this->Image_GetServerPath($oUser->getProfileAvatarPath(24))); 1124 @unlink($this->Image_GetServerPath($oUser->getProfileAvatarPath(0))); 1124 $aSize=array_merge(Config::Get('module.user.avatar_size'),array(100)); 1125 foreach ($aSize as $iSize) { 1126 @unlink($this->Image_GetServerPath($oUser->getProfileAvatarPath($iSize))); 1127 } 1125 1128 } 1126 1129 } -
trunk/config/config.php
r909 r931 153 153 $config['module']['blog']['index_good'] = 8; // Рейтинг топика выше которого(включительно) он попадает на главную 154 154 $config['module']['blog']['encrypt'] = 'livestreet'; // Ключ XXTEA шифрования идентификаторов в ссылках приглашения в блоги 155 $config['module']['blog']['avatar_size'] = array(24,0); // Список размеров аватаров у блога. 0 - исходный размер 155 156 // Модуль Topic 156 157 $config['module']['topic']['new_time'] = 60*60*24*1; // Время в секундах в течении которого топик считается новым … … 162 163 $config['module']['user']['friend_notice']['accept'] = false; // Отправить talk-сообщение в случае одобрения заявки на добавление в друзья 163 164 $config['module']['user']['friend_notice']['reject'] = false; // Отправить talk-сообщение в случае отклонения заявки на добавление в друзья 165 $config['module']['user']['avatar_size'] = array(64,48,24,0); // Список размеров аватаров у пользователя. 0 - исходный размер 164 166 // Модуль Comment 165 167 $config['module']['comment']['per_page'] = 20; // Число комментариев на одну страницу(это касается только полного списка комментариев прямого эфира)
