Уважаемые пользователи!
C 7 ноября 2020 года phpBB Group прекратила выпуск обновлений и завершила дальнейшее развитие phpBB версии 3.2.
С 1 августа 2024 года phpBB Group прекращает поддержку phpBB 3.2 на официальном сайте.
Сайт официальной русской поддержки phpBB Guru продолжит поддержку phpBB 3.2 до 31 декабря 2024 года.
С учетом этого, настоятельно рекомендуется обновить конференции до версии 3.3.

Profile Photo Mod в ADCP редактирования нет?

Ответы на вопросы, связанные с модами для phpBB 2.0.x, кроме относящихся к форуму Для авторов (phpBB 2.0.x).
Iftin
phpBB 2.0.7
Сообщения: 573
Стаж: 19 лет
Откуда: Moscow

Profile Photo Mod в ADCP редактирования нет?

Сообщение Iftin »

Поставил данный мод, работает и фото прикрепляет пользователям. Захожу в админскую, -> управления пользователями -> выбираю пользователя для редактирования. Смотрю и вижу, что нет редактирвоания фото добавленное пользователем! Вдруг он там порнуху добавит, а как мне удалить фотку... это вопрос!

Подскажите, где в этом документе строчки отвечающие за контроль над фоткой добавленной пользователем, чтобя я мог её редактирвоать в админ. контроль панели?

оригинальный установочный файл.

Код: Выделить всё

#############################################################################
## Mod Title:   Profile Photo Mod 
## Mod Version: 2.0.2
## Author:      Acyd Burn < acyd.burn@gmx.de > - Meik Sievertsen - http://www.opentools.de/
##
## Description: 
##		This Mod adds the ability to let your users attach photos to their profile.
##
## Revision History:
##
##		2002-06-02 - Version 2.0.2
##			- made phpBB 2.0.x compatible
##
##		2002-03-21 - Version 2.0.1
##			- complete rewrite of this mod for rc-4. :)
##			- bugfixes
##
##		2002-03-07 - initial version 2.0.0
##
## Installation Level:  intermediate
## Installation Time:   5-10 Minutes
## Files To Edit:       profile.php, admin/admin_board.php, includes/usercp_register.php, 
##			templates/subSilver/profile_add_body.tpl, templates/subSilver/profile_view_body.tpl,
##			templates/subSilver/admin/board_config_body.tpl
## Included Files:      3 (+1 temporary file for installation)
## 
#############################################################################
## This MOD is released under the GPL License. 
## Intellectual Property is retained by the MOD Author(s) listed above 
#############################################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/ 
#############################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
#############################################################################
## 
## Author Note: 
## 
## This Mod adds some rows to the users table and to the config table
##
## At the moment, english, german and french are supported. If the Mod can not
## find the appropiate language file, english is used by default.
##
##
#############################################################################

#
# First of all, copy all files to their respective location
#

# These are: 
#	/profilephoto_mod.php
#	/mod_table_inst.php	(you can delete it after installation)
#
#	/templates/subSilver/profile_photo_box.tpl
#
#	/language/lang_XX/lang_profilephoto.php
#

Now we want to create the rows in the database, therefore we execute mod_table_inst.php (http://www.yoursite.com/phpBB2/mod_table_inst.php)
Contact me if you have questions about this.

Now you have to alter existing files, read the instructions carefully and make sure you find all lines.

#
# Changes to already existing files
#

# 
#-----[ OPEN ]--------------------------------------------- 
# 
./profile.php

# 
#-----[ FIND ]---------------------------------------------
# 
include($phpbb_root_path . 'common.'.$phpEx);

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
include($phpbb_root_path . 'profilephoto_mod.'.$phpEx);

# 
#-----[ FIND ]---------------------------------------------
# 
// End page specific functions
// ---------------------------

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
$profilephoto_mod->execute_mod();

# 
#-----[ OPEN ]--------------------------------------------- 
# 
./admin/admin_board.php

# 
#-----[ FIND ]---------------------------------------------
# 
$template->set_filenames(array(
	"body" => "admin/board_config_body.tpl")
);

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
//
// Profile Photo Mod
//
if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_profilephoto.'.$phpEx) )
{
	include($phpbb_root_path . 'language/lang_english/lang_profilephoto.'.$phpEx);
}
else
{
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_profilephoto.' . $phpEx);
}

$photo_remote_yes = ( $new['allow_photo_remote'] ) ? 'checked="checked"' : '';
$photo_remote_no = ( !$new['allow_photo_remote'] ) ? 'checked="checked"' : '';
$photo_upload_yes = ( $new['allow_photo_upload'] ) ? 'checked="checked"' : '';
$photo_upload_no = ( !$new['allow_photo_upload'] ) ? 'checked="checked"' : '';

$template->assign_vars(array(
	'L_PROFLE_PHOTO_SETTINGS' => $lang['Profile_photo_settings'],
	'L_ALLOW_PHOTO_REMOTE' => $lang['Allow_photo_remote'],
	'L_ALLOW_PHOTO_REMOTE_EXPLAIN' => $lang['Allow_photo_remote_explain'],
	'L_ALLOW_PHOTO_UPLOAD' => $lang['Allow_photo_upload'],
	'L_PHOTO_MAX_FILESIZE' => $lang['Photo_max_filesize'],
	'L_PHOTO_MAX_FILESIZE_EXPLAIN' => $lang['Photo_max_filesize_explain'],
	'L_MAX_PHOTO_SIZE' => $lang['Max_photo_size'],
	'L_PHOTO_STORAGE_PATH' => $lang['Photo_storage_path'],
	'L_PHOTO_STORAGE_PATH_EXPLAIN' => $lang['Photo_storage_path_explain'],

	'PHOTO_REMOTE_YES' => $photo_remote_yes,
	'PHOTO_REMOTE_NO' => $photo_remote_no,
	'PHOTO_UPLOAD_YES' => $photo_upload_yes,
	'PHOTO_UPLOAD_NO' => $photo_upload_no,
	'PHOTO_FILESIZE' => $new['photo_filesize'],
	'PHOTO_MAX_HEIGHT' => $new['photo_max_height'],
	'PHOTO_MAX_WIDTH' => $new['photo_max_width'],
	'PHOTO_PATH' => $new['photo_path'])
);

# 
#-----[ OPEN ]--------------------------------------------- 
# 
./includes/usercp_register.php

# 
#-----[ FIND ]---------------------------------------------
# 
$error = FALSE;

# 
#-----[ REPLACE WITH ]-------------------------------------
# 
// $error = FALSE;

# 
#-----[ FIND ]---------------------------------------------
# 
				message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
			}

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
			$profilephoto_mod->photo_insert($mode);

# 
#-----[ OPEN ]--------------------------------------------- 
# 
./templates/subSilver/profile_add_body.tpl

# 
#-----[ FIND ]---------------------------------------------
# 
<input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" />

# 
#-----[ REPLACE WITH ]-------------------------------------
# 
<!--<input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" />-->

# 
#-----[ FIND ]---------------------------------------------
# 
	<!-- END switch_avatar_block -->

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
	{PHOTO_BOX}

# 
#-----[ OPEN ]--------------------------------------------- 
# 
./templates/subSilver/profile_view_body.tpl

# 
#-----[ FIND ]---------------------------------------------
# 
		  //--></script><noscript>{ICQ_IMG}</noscript></td>
		</tr>
	  </table>
	</td>
  </tr>

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
  <tr> 
	<td class="catLeft" align="center" width="40%" height="28" colspan="2"><b><span class="gen">{L_PHOTO}</span></b></td>
  <tr> 
	<td align="center" colspan="2" class="row1">{PHOTO_IMG}</td>
  </tr>

# 
#-----[ OPEN ]--------------------------------------------- 
# 
./templates/subSilver/admin/board_config_body.tpl

# 
#-----[ FIND ]---------------------------------------------
# 
		<td class="row2"><input type="text" size="20" maxlength="255" name="avatar_gallery_path" value="{AVATAR_GALLERY_PATH}" /></td>
	</tr>

# 
#-----[ AFTER, ADD ]---------------------------------------
# 
	<tr>
	  <th class="thHead" colspan="2">{L_PROFLE_PHOTO_SETTINGS}</th>
	</tr>
	<tr>
		<td class="row1">{L_ALLOW_PHOTO_REMOTE} <br /><span class="gensmall">{L_ALLOW_PHOTO_REMOTE_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="allow_photo_remote" value="1" {PHOTO_REMOTE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_photo_remote" value="0" {PHOTO_REMOTE_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_ALLOW_PHOTO_UPLOAD}</td>
		<td class="row2"><input type="radio" name="allow_photo_upload" value="1" {PHOTO_UPLOAD_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_photo_upload" value="0" {PHOTO_UPLOAD_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_PHOTO_MAX_FILESIZE}<br /><span class="gensmall">{L_PHOTO_MAX_FILESIZE_EXPLAIN}</span></td>
		<td class="row2"><input type="text" size="4" maxlength="10" name="photo_filesize" value="{PHOTO_FILESIZE}" /> Bytes</td>
	</tr>
	<tr>
		<td class="row1">{L_MAX_PHOTO_SIZE} <br />
			<span class="gensmall">{L_MAX_AVATAR_SIZE_EXPLAIN}</span>
		</td>
		<td class="row2"><input type="text" size="3" maxlength="4" name="photo_max_height" value="{PHOTO_MAX_HEIGHT}" /> x <input type="text" size="3" maxlength="4" name="photo_max_width" value="{PHOTO_MAX_WIDTH}"></td>
	</tr>
	<tr>
		<td class="row1">{L_PHOTO_STORAGE_PATH} <br /><span class="gensmall">{L_PHOTO_STORAGE_PATH_EXPLAIN}</span></td>
		<td class="row2"><input type="text" size="20" maxlength="255" name="photo_path" value="{PHOTO_PATH}" /></td>
	</tr>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 

You'll have to create the directory for your photos (like the avatar directory) and chmod 
it to 777 (or change the owner to you httpd-servers owner) to upload photos.
if you have only plain ftp-access change the 'Attribute' of your photo-directory to rwxrwxrwx.
the default path is 'images/photos'.

# EoM
Добавлено спустя 11 минут 14 секунд:

я так понимаю, если неошибаюсь нужно в документ добавить какие-то строчки admin/admin_users.php ... я прав?

Добавлено спустя 25 минут 38 секунд:

я нашёл, что искал Это лежит здесь!
Спасибо Author: [R: R@m$e$ :U] хороший человек, уже сделал, что требуется. Респект!

http://www.phpbbguru.net/community/view ... +photo+mod
Аватара пользователя
Siava
Поддержка
Поддержка
Сообщения: 5284
Стаж: 19 лет 4 месяца
Откуда: Питер
Благодарил (а): 186 раз
Поблагодарили: 793 раза

Сообщение Siava »

Iftin
Посещайте ваш нелюбимый раздел "Беты", может толк будет или чего прибавится. Изображение :lol:

Добавлено спустя 50 секунд:

Ну вот.. сам нашёл.. :lol:
Еще одно нарушение правил и будете забанены. © Mr. Anderson
Ты очистил кеш? © Sheer
https://siava.ru (phpbb 2.0.x 3.5.x)
Iftin
phpBB 2.0.7
Сообщения: 573
Стаж: 19 лет
Откуда: Moscow

Сообщение Iftin »

ок, будем. я сейчас опубликовал ещёб в форуме на официале, чтоб все знали что русские тут рулят =)))
вот :arrow: :wink:
http://www.opentools.de/board/viewtopic ... 7531#17531

Вернуться в «Поддержка модов для phpBB 2.0.x»