'ReIMG Image Resizer' Versión 1.0.2
Publicado: 17 Oct 2010, 20:27
Alguien conoce este mod, como puedo poner el tamaño que salgan en miniatura, porque ahora me descuadra el portal porque la foto es muy grande
phpBB España Oficial, Soporte Internacional Oficial del sistema de foros phpBB en Español, extensiones, estilos, traducciones, guías, tutoriales, videos, redes sociales, webmaster.
https://www.phpbb-es.com/foro/
Aquí esta, es un ejemplo: http://www.tengoku-gamer.com/foros/view ... ?f=5&t=151leviatan21 escribió:También coloca un enlace a ese mensaje con una imagen grande ( con el foro habilitado )
Entiendo, a ver con esto me hago mucho lío. Ahora mismo tengo abierto el subsilver2.xml, pero no se que modificar o por donde empezar, en esto soy muy novato y me cuesta muchísimo, podrías por favor ayudarme? te lo agradeceria.leviatan21 escribió:No tienes los cambios aplicados a las plantillas para el estilo avalon, debes seguir las indicaciones para el estilo basado en subsilver2 : reimg_image_resizer/subsilver2.xml
Las instrucciones en el subsilver2.xml funcionan de la misma manera que las instrucciones que seguiste anteriormente, con la diferencia que si te pide abrir una plantilla en subsilver2 tu lo haces para avalonCloud_Japan escribió:Entiendo, a ver con esto me hago mucho lío. Ahora mismo tengo abierto el subsilver2.xml, pero no se que modificar o por donde empezar, en esto soy muy novato y me cuesta muchísimo, podrías por favor ayudarme? te lo agradeceria.
Un saludo.
Vale, voy a empezar de nuevo. Te digo los pasos que he realizado:leviatan21 escribió:Las instrucciones en el subsilver2.xml funcionan de la misma manera que las instrucciones que seguiste anteriormente, con la diferencia que si te pide abrir una plantilla en subsilver2 tu lo haces para avalonCloud_Japan escribió:Entiendo, a ver con esto me hago mucho lío. Ahora mismo tengo abierto el subsilver2.xml, pero no se que modificar o por donde empezar, en esto soy muy novato y me cuesta muchísimo, podrías por favor ayudarme? te lo agradeceria.
Un saludo.
Por ejemplo :
Pide : Open: styles/subsilver2/imageset/imageset.cfg
tu abres : styles/avalon/imageset/imageset.cfg
Y aplicas los cambios que solicita, así con todos los archivos.
Lo mismo cuando solicita copiar, en lugar de copiar a la carpeta subsilver2 tu lo copias a la carpeta avalon
Por ejemplo :
Pide : Copy: root/styles/subsilver2/template/reimg_content.html To: styles/subsilver2/template/reimg_content.html
Tu copias Copy: root/styles/subsilver2/template/reimg_content.html a la carpeta : styles/avalon/template/reimg_content.html
Código: Seleccionar todo
Archivo editado
memberlist.php
Encontrar
'SIGNATURE' => $member['user_sig'],
Reemplazar por
'SIGNATURE' => ($config['reimg_ignore_sig_img']) ? str_replace(reimg_properties(), '', $member['user_sig']) : $member['user_sig'],
Suceso
posting.php
Encontrar
'PREVIEW_SIGNATURE' => $preview_signature,
Reemplazar por
'PREVIEW_SIGNATURE' => ($config['reimg_ignore_sig_img']) ? str_replace(reimg_properties(), '', $preview_signature) : $preview_signature,
Suceso
viewtopic.php
Encontrar
'SIGNATURE' => ($row['enable_sig']) ? $user_cache[$poster_id]['sig'] : '',
Reemplazar por
'SIGNATURE' => ($row['enable_sig']) ? ($config['reimg_ignore_sig_img'] ? str_replace(reimg_properties(), '', $user_cache[$poster_id]['sig']) : $user_cache[$poster_id]['sig']) : '',
Suceso
includes/bbcode.php
Encontrar
'#\[img:$uid\](.*?)\[/img:$uid\]#s' => $this->bbcode_tpl('img', $bbcode_id),
Reemplazar por
'#\[img:$uid\](.*?)\[/img:$uid\]#s' => str_replace('$2', reimg_properties(), $this->bbcode_tpl('img', $bbcode_id)),
Suceso
Encontrar
'img' => '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
En la línea encontrar
/>
En la linea, antes añadir
' . reimg_properties() . '
Suceso
Encontrar
'img' => array('{URL}' => '$1'),
Reemplazar por
'img' => array('{URL}' => '$1', '{REIMG_PROPERTIES}' => '$2'),
Suceso
includes/functions.php
Encontrar
'T_THEME_PATH' =>
Antes añadir
'S_REIMG' => ($config['reimg_max_width'] || $config['reimg_max_height'] || $config['reimg_rel_width']) ? 1 : 0,
'REIMG_MAX_WIDTH' => $config['reimg_max_width'],
'REIMG_MAX_HEIGHT' => $config['reimg_max_height'],
'REIMG_REL_WIDTH' => $config['reimg_rel_width'],
'S_REIMG_SWAP_PORTRAIT' => ($config['reimg_swap_portrait']) ? 1 : 0,
'REIMG_LOADING_IMG_SRC' => $user->img('icon_reimg_loading', '', false, '', 'src'),
'REIMG_LOADING_IMG_WIDTH' => $user->img('icon_reimg_loading', '', false, '', 'width'),
'REIMG_LOADING_IMG_HEIGHT' => $user->img('icon_reimg_loading', '', false, '', 'height'),
'S_REIMG_BUTTON' => (substr($config['reimg_link'], 0, 6) == 'button') ? 1 : 0,
'S_REIMG_LINK' => (substr($config['reimg_link'], -4) == 'link') ? 1 : 0,
'S_REIMG_ZOOM' => (substr($config['reimg_zoom'], 0, 8) == '_litebox') ? '_litebox' : $config['reimg_zoom'],
'REIMG_ZOOM_IN_IMG_SRC' => $user->img('icon_reimg_zoom_in', '', false, '', 'src'),
'REIMG_ZOOM_IN_IMG_WIDTH' => $user->img('icon_reimg_zoom_in', '', false, '', 'width'),
'REIMG_ZOOM_IN_IMG_HEIGHT' => $user->img('icon_reimg_zoom_in', '', false, '', 'height'),
'S_REIMG_LITEBOX' => ((substr($config['reimg_zoom'], 0, 8) == '_litebox' || $config['reimg_zoom'] == '_highslide') && ($config['reimg_max_width'] || $config['reimg_max_height'] || $config['reimg_rel_width'])) ? $config['reimg_zoom'] : '',
'REIMG_ZOOM_OUT_IMG_SRC' => $user->img('icon_reimg_zoom_out', '', false, '', 'src'),
'REIMG_ZOOM_OUT_IMG_WIDTH' => $user->img('icon_reimg_zoom_out', '', false, '', 'width'),
'REIMG_ZOOM_OUT_IMG_HEIGHT' => $user->img('icon_reimg_zoom_out', '', false, '', 'height'),
'REIMG_PROPERTIES' => reimg_properties(),
Suceso
Encontrar
// application/xhtml+xml not used because of IE
header('Content-type: text/html; charset=UTF-8');
Antes añadir
$user->add_lang('mods/reimg');
Suceso
Encontrar
Comentario: If you need to stay 100% XHTML 1.0 compliant, then leave out the onload and onerror attributes.
?>
Antes añadir
/**
* Get the applicable image properties
*/
function reimg_properties()
{
return 'class="reimg" onload="reimg(this);" onerror="reimg(this);" ';
}
Suceso
includes/functions_content.php
Encontrar
'attachment_tpl' => 'attachment.html')
);
}
Después añadir
$template->assign_vars(array(
'S_REIMG' => ($config['reimg_max_width'] || $config['reimg_max_height'] || $config['reimg_rel_width']) ? 1 : 0,
'REIMG_PROPERTIES' => reimg_properties(),
));
Suceso
includes/acp/acp_board.php
Encontrar
$user->add_lang('acp/board');
Después añadir
$user->add_lang('mods/reimg');
Suceso
Encontrar
'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
Después añadir
'legend_reimg' => 'REIMG_SETTINGS',
'reimg_max_width' => array('lang' => 'REIMG_MAX_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
'reimg_max_height' => array('lang' => 'REIMG_MAX_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
'reimg_max' => array('lang' => 'REIMG_MAX_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'reimg_rel_width' => array('lang' => 'REIMG_REL_WIDTH', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true, 'append' => ' %'),
'reimg_swap_portrait' => array('lang' => 'REIMG_SWAP_PORTRAIT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'reimg_ignore_sig_img' => array('lang' => 'REIMG_IGNORE_SIG_IMG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'reimg_link' => array('lang' => 'REIMG_LINK_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_reimg_link_method', 'explain' => true),
'reimg_zoom' => array('lang' => 'REIMG_ZOOM_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_reimg_zoom_method', 'explain' => true),
Suceso
Encontrar
/**
* Select bump interval
*/
Antes añadir
/**
* Select resized image link method
*/
function select_reimg_link_method($selected_value, $key)
{
global $user;
$link_method_ary = array('button' => 'REIMG_LINK_BUTTON', 'link' => 'REIMG_LINK_IMAGE', 'button_link' => 'REIMG_LINK_BOTH');
$link_options = '';
foreach ($link_method_ary as $link_mehod => $lang)
{
$selected = ($selected_value == $link_mehod) ? ' selected="selected"' : '';
$link_options .= '<option value="' . $link_mehod . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
}
return $link_options;
}
/**
* Select resized image zoom method
*/
function select_reimg_zoom_method($selected_value, $key)
{
global $user, $phpbb_root_path;
$zoom_method_ary = array('' => 'DISABLED', '_default' => 'REIMG_ZOOM_DEFAULT', '_exturl' => 'REIMG_ZOOM_EXTURL', '_blank' => 'REIMG_ZOOM_BLANK', '_litebox' => 'REIMG_ZOOM_LITEBOX', '_litebox1' => 'REIMG_ZOOM_LITEBOX_1_1', '_litebox0' => 'REIMG_ZOOM_LITEBOX_RESIZED', '_highslide' => 'REIMG_ZOOM_HIGHSLIDE');
$zoom_options = '';
foreach ($zoom_method_ary as $zoom_method => $lang)
{
$disabled = '';
//We need to check and see if the Highslide library actually exists before allowing the option to be selectable
if ($zoom_method == '_highslide')
{
//We need one of the highslide js libraries
if (!file_exists($phpbb_root_path . 'reimg/highslide/highslide-full.packed.js'))
{
$disabled = ' disabled';
}
}
$selected = ($selected_value == $zoom_method) ? ' selected="selected"' : '';
$zoom_options .= '<option value="' . $zoom_method . '"' . $selected . $disabled . '>' . $user->lang[$lang] . '</option>';
}
return $zoom_options;
}
Suceso
includes/acp/acp_styles.php
Encontrar
$user->add_lang('acp/styles');
Después añadir
$user->add_lang('mods/reimg');
Suceso
Encontrar
'icon_back_top',
Después añadir
'icon_reimg_loading', 'icon_reimg_zoom_in', 'icon_reimg_zoom_out',
Suceso
includes/ucp/ucp_pm_viewmessage.php
Encontrar
'SIGNATURE' => ($message_row['enable_sig']) ? $signature : '',
Reemplazar por
'SIGNATURE' => ($message_row['enable_sig']) ? (($config['reimg_ignore_sig_img']) ? str_replace(reimg_properties(), '', $signature) : $signature) : '',
Suceso
includes/ucp/ucp_profile.php
Encontrar
'SIGNATURE_PREVIEW' => $signature_preview,
Reemplazar por
'SIGNATURE_PREVIEW' => ($config['reimg_ignore_sig_img']) ? str_replace(reimg_properties(), '', $signature_preview) : $signature_preview,
Suceso
styles/prosilver/imageset/imageset.cfg
Encontrar
img_icon_user_warn =
Después añadir
img_icon_reimg_loading = icon_reimg_loading.gif*16*16
img_icon_reimg_zoom_in = icon_reimg_zoom_in.gif*20*20
img_icon_reimg_zoom_out = icon_reimg_zoom_out.gif*20*20
Suceso
styles/prosilver/template/attachment.html
Encontrar
<dt class="attach-image"><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt>
En la línea encontrar
class="attach-image"
En la línea, después añadir
<!-- IF S_REIMG --> style="overflow: hidden; max-height: none;"<!-- ENDIF -->
Suceso
En la línea encontrar
onclick="viewableArea(this);"
En la línea reemplazar
<!-- IF S_REIMG -->style="border: none;" {REIMG_PROPERTIES}<!-- ELSE -->onclick="viewableArea(this);"<!-- ENDIF -->
Suceso
styles/prosilver/template/bbcode.html
Encontrar
<!-- BEGIN img --><img src="{URL}" alt="{L_IMAGE}" /><!-- END img -->
En la línea encontrar
/>
En la linea, antes añadir
{REIMG_PROPERTIES}
Suceso
styles/prosilver/template/overall_footer.html
Encontrar
</body>
Antes añadir
<!-- IF S_REIMG -->
<script type="text/javascript">
if (window.reimg_version)
{
reimg_loading("{REIMG_LOADING_IMG_SRC}");
}
</script>
<!-- ENDIF -->
Suceso
styles/prosilver/template/overall_header.html
Encontrar
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
Antes añadir
<!-- INCLUDE reimg_content.html -->
Suceso
styles/prosilver/template/ucp_pm_viewmessage.html
Encontrar
<dl class="attachbox">
En la línea encontrar
>
En la linea, antes añadir
style="width: 97%;"
Suceso
styles/prosilver/template/ucp_pm_viewmessage_print.html
Encontrar
<style type="text/css">
Antes añadir
<!-- INCLUDE reimg_content.html -->
Suceso
styles/prosilver/template/viewtopic_body.html
Encontrar
<dl class="attachbox">
En la línea encontrar
>
En la linea, antes añadir
style="width: 97%;"
Suceso
styles/prosilver/template/viewtopic_print.html
Encontrar
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" />
Antes añadir
<!-- INCLUDE reimg_content.html -->
Suceso
styles/subsilver2/imageset/imageset.cfg
Encontrar
img_icon_topic_unapproved =
Después añadir
img_icon_reimg_loading = icon_reimg_loading.gif*16*16
img_icon_reimg_zoom_in = icon_reimg_zoom_in.gif*15*18
img_icon_reimg_zoom_out = icon_reimg_zoom_out.gif*15*18
Suceso
styles/subsilver2/template/attachment.html
Encontrar
Comentario: If you need to stay 100% XHTML 1.0 compliant, then leave out the onload and onerror attributes.
<img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" /><br />
En la línea encontrar
alt="{_file.DOWNLOAD_NAME}"
En la línea, después añadir
{REIMG_PROPERTIES}
Suceso
styles/subsilver2/template/bbcode.html
Encontrar
Comentario: If you need to stay 100% XHTML 1.0 compliant, then leave out the onload and onerror attributes.
<!-- BEGIN img --><img src="{URL}" alt="{L_IMAGE}" /><!-- END img -->
En la línea encontrar
/>
En la linea, antes añadir
{REIMG_PROPERTIES}
Suceso
styles/subsilver2/template/overall_footer.html
Encontrar
</body>
Antes añadir
<!-- IF S_REIMG -->
<script type="text/javascript">
if (window.reimg_version)
{
reimg_loading("{REIMG_LOADING_IMG_SRC}");
}
</script>
<!-- ENDIF -->
Suceso
styles/subsilver2/template/overall_header.html
Encontrar
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
Antes añadir
<!-- INCLUDE reimg_content.html -->
Suceso
styles/subsilver2/template/ucp_pm_viewmessage_print.html
Encontrar
<style type="text/css">
Antes añadir
<!-- INCLUDE reimg_content.html -->
Suceso
styles/subsilver2/template/viewtopic_print.html
Encontrar
<style type="text/css">
Antes añadir
<!-- INCLUDE reimg_content.html -->
Suceso
Momento :Cloud_Japan escribió:Vale, voy a empezar de nuevo. Te digo los pasos que he realizado:
Primero de instalo el mod desde ACP>AutoMod, me descarga un zip con algunos archivos modificados y carpetas, las he sustituido y no se si estan bien estos pasos.
en el segundo selector eliges [ Avaon ] y pulsas el botón que está inmediatamente debajo, eso sería todo.Aplicar estos cambios [ Subsilver2 ] a esta plantilla [ Subsilver2 ]