Recordad que para pedir soporte alguno, debéis facilitar los datos de soporte oportunos por favor, mirad aquí y leer las Normas generales del foro, esto nos servirá de ayuda para dar el mejor soporte..

Gracias.

La Administración de phpBB España.

Ayuda con el mod post_img_1.1.1b

Aquí­ podrás dejar tus dudas sobre MODs o MODificaciones de tu phpBB2
  Reglas del Foro
Antes de participar en los foros, leer esto por favor.
Normas generales de phpBB-Es y las de Soporte
Cerrado

0
No hay votos
 
Votos totales: 0

LVenon
Observador/a
Mensajes: 29
Registrado: 01 Oct 2005, 17:48

Ayuda con el mod post_img_1.1.1b

#1

Mensaje por LVenon »

He intalado el mod post_img_1.1.1b en mi pagina con la version phpBB 2.0.17 y no ase nada. :?

Segun lo que entiendo es que si en algun tema se pone una imagen mayor a la establecida por el administrador esta se reduce, pero no lo hacer poner la imagen con el tamaí?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?±o normal?

Esta mal el codigo?

Este es el codigo:

Código: Seleccionar todo

############################################################## 
## MOD Title: Post Image Size
## MOD Author: Swizec  (N/A) http://www.randy-comic.com
## MOD Description: Admin can set the maximum size of images displayed in posts. Images bigger than that are shrunk and turned into a link to the normal sized version.
## MOD Version: 1.1.1
## 
## Installation Level: Easy
## Installation Time: ~3 Minutes 
## Files To Edit: 
##		  includes/bbcode.php
##		  admin/admin_board.php
##		  templates/subSilver/bbcode.tpl
##		  templates/subSilver/admin/board_config_body.tpl
##		  language/lang_english/lang_main.php
##		  language/lang_english/lang_admin.php
## Included Files: N/A
##
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ 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/ 
############################################################## 
## Author Notes: 
##
## demo board: http://www.swizec.com/forum
## 
############################################################## 
## MOD History: 
## 
## 2005-04-17 - Version 1.0.0
##    - working mod
##
## 2005-04-17 - Version 1.0.1
##    - oops, small bug in the .mod file
##
## 2005-04-17 - Version 1.0.2
##    - omg I'm so fucken hasty
##
## 2005-05-01 - Version 1.0.3
##    - fixed a bug
##
## 2005-05-01 - Version 1.0.4
##    - some slashes got left behind
##
## 2005-05-02 - Version 1.0.5
##    - added "this is thumbnail" notice wished by MaddoxX
##
## 2005-05-24 - Version 1.0.6
##	- use of bbcode.tpl added
##
## 2005-05-31 - Version 1.0.7
##	- getting closer :)
##
## 2005-05-31 - Version 1.1.0
##	-fixed a bug
##	-implemented image aligning by pichirichi
##
## 2005-06-23 - Version 1.1.1
##	- fixed XHTML compliancy
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ SQL ]------------------------------------------ 
# 

INSERT INTO phpbb_config( config_name, config_value ) VALUES ( 'postimg_width', '800' );
INSERT INTO phpbb_config( config_name, config_value ) VALUES ( 'postimg_height', '600' );

# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/bbcode.php

# 
#-----[ FIND ]------------------------------------------ 
# 

$bbcode_tpl = null;

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// mod img size add
function makeimgsize ( $width, $height ) {
	
	global $board_config;
	
	$size = '';
	
	if ( $width > $height ) {
		if ( $board_config['postimg_width']  $img ) { 
		if ( !$size = @getimagesize( $img ) ) break; 
		$width = $size[0]; $height = $size[1]; 
		$size = makeimgsize ( $size[0], $size[1] ); 
		$img_align = strtok( $matches[1][$k], ":" ); 
		switch($img_align) 
		{
			case "img=right": 
				$align = $lang['RIGHT']; 
				break;
			case "img=left": 
			case "img":
        		default: 
				$align = $lang['LEFT']; 
			break; 
		}		
		$first = $matches[1][$k]; 
		$secnd = $matches[3][$k];
		$find = '[' . $first . ']' . str_replace( '', '/', $img ) . '[/' . $secnd . ']'; 
		if ( !empty( $size ) )
		{
			$replace = $bbcode_tpl['thmbimg'];
			$seek = array( '{IMAGE}', '{WIDTH}', '{HEIGHT}', '{SIZE}', '{NOTICE}', '{ALIGN}' );
			$with = array( $img, $width, $height, $size, $lang['postimg_clickme'], $align );
			$replace = str_replace( $seek, $with, $replace );
			$post = str_replace( $find, $replace, $post );
		}
	}
		
	return $post;
}
// mod img size end

# 
#-----[ FIND ]------------------------------------------ 
# 

$patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i";

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

// mod img size replace with call to image parsing function
$text = image_parse ( $text, $uid );

# 
#-----[ OPEN ]------------------------------------------ 
# 

admin/admin_board.php

# 
#-----[ FIND ]------------------------------------------ 
# 

$namechange_no = ( !$new['allow_namechange'] ) ? "checked=\"checked\"" : "";

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// mod img size add
$postimg_width = $new['postimg_width'];
$postimg_height = $new['postimg_height'];
// mod img size end

# 
#-----[ FIND ]------------------------------------------ 
# 

"L_RESET" => $lang['Reset'], 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// mod img size add
"L_POSTIMG_SIZE" => $lang['postimg_size'],
"POSTIMG_WIDTH" => $postimg_width,
"POSTIMG_HEIGHT" => $postimg_height,
// mod img size end

# 
#-----[ OPEN ]------------------------------------------ 
# 

templates/subSilver/bbcode.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 

{EMAIL}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 


{NOTICE}

# 
#-----[ OPEN ]------------------------------------------ 
# 

templates/subSilver/admin/board_config_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 

	
		{L_ENABLE_PRUNE}
		 {L_YES}   {L_NO}
	
	
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	
		{L_POSTIMG_SIZE}
		 X 
	

# 
#-----[ OPEN ]------------------------------------------ 
# 

language/lang_english/lang_main.php

# 
#-----[ FIND ]------------------------------------------ 
# 

?>

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

// mod img size add
$lang['postimg_clickme'] = 'Thumbnail, click to enlarge.';
	
# 
#-----[ OPEN ]------------------------------------------ 
# 

language/lang_english/lang_admin.php

# 
#-----[ FIND ]------------------------------------------ 
# 

?>

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

// mod img size add
$lang['postimg_size'] = 'Maximum size of images in posts';

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
LVenon (c) 2005 - phpBB 2.0.17 - 18 Mod's
Mod's Instalados
- CashMod v2.2.2 - Shop Mod v2.6.0 - Latest Topic on Index v1.1.2
- Color Groups v1.2.0 - Favorites v1.0.4 - Split Topic Type v2.0.1 - AvatarOnIndex v1.2.1
- IP_Tracking v1.0.5 - Last Post Index v1.4.0 - Mod-Ranks v1.0.4 - Refresh Index.php v1.1.1
- Admin UserList v1.6.1 - Registration Stopper v1.0.0 - Default Avatar Mod v1.0.1
- Global Announcement v1.2.8em - Post Img v1.1.1b - Colorize Forum Title v1.0.0
- Simply Merge Threads v1.0.1

Avatar de Usuario
tole
Ex Staff
Mensajes: 714
Registrado: 06 Ene 2004, 01:12
Género:
Edad: 55

#2

Mensaje por tole »

Por lo que dice el mod, el administrador es el que configura los parí?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?¡metros desde el [acronym="Panel de control del Administrador"]ACP[/acronym], has hechado un vistazo alli?.

Salu2.
Tole

LVenon
Observador/a
Mensajes: 29
Registrado: 01 Oct 2005, 17:48

#3

Mensaje por LVenon »

Si lo he puesto a 400x400 y he probado con una imagen de 564x784 y no le hace nada la muestra tal cual
LVenon (c) 2005 - phpBB 2.0.17 - 18 Mod's
Mod's Instalados
- CashMod v2.2.2 - Shop Mod v2.6.0 - Latest Topic on Index v1.1.2
- Color Groups v1.2.0 - Favorites v1.0.4 - Split Topic Type v2.0.1 - AvatarOnIndex v1.2.1
- IP_Tracking v1.0.5 - Last Post Index v1.4.0 - Mod-Ranks v1.0.4 - Refresh Index.php v1.1.1
- Admin UserList v1.6.1 - Registration Stopper v1.0.0 - Default Avatar Mod v1.0.1
- Global Announcement v1.2.8em - Post Img v1.1.1b - Colorize Forum Title v1.0.0
- Simply Merge Threads v1.0.1

Avatar de Usuario
ThE KuKa
Administrador
Mensajes: 10432
Registrado: 04 Ene 2004, 19:27
Género:
Edad: 50

#4

Mensaje por ThE KuKa »

Revisa el [acronym="Un aí?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?±adido para una mejora en el foro"]MOD[/acronym] completo, en especial esta parte:

Código: Seleccionar todo

# 
#-----[ FIND ]------------------------------------------ 
# 

$patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i"; 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

// mod img size replace with call to image parsing function 
$text = image_parse ( $text, $uid );
S@lu2

📌 Raul [ThE KuKa] en phpBB 📌
✅ Jr. Extension Validator - Jr. Styles Validator - Style Customisations - Translator - International Support Team
✅

Si te gustan mis estilos, traducciones, etc. y quieres mostrar algo de aprecio, no dudes en hacer una donación Imagen
:flag_es: phpBB España - En línea desde 2003 :heart:



LVenon
Observador/a
Mensajes: 29
Registrado: 01 Oct 2005, 17:48

#5

Mensaje por LVenon »

Si esta bien colocado en el archivo de bbcode.php, si le di como tres repasadas a todos los archivos incluso borraba los del hosting y los volvia a poner pero, nada no hace absolutamentenada todo sigue igual que antes las imagenes las muestra del tamano normal.

Por eso mi duda de que si este mod ya estaba probado por alguien o si tenia alguna correcccií?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?³n.
LVenon (c) 2005 - phpBB 2.0.17 - 18 Mod's
Mod's Instalados
- CashMod v2.2.2 - Shop Mod v2.6.0 - Latest Topic on Index v1.1.2
- Color Groups v1.2.0 - Favorites v1.0.4 - Split Topic Type v2.0.1 - AvatarOnIndex v1.2.1
- IP_Tracking v1.0.5 - Last Post Index v1.4.0 - Mod-Ranks v1.0.4 - Refresh Index.php v1.1.1
- Admin UserList v1.6.1 - Registration Stopper v1.0.0 - Default Avatar Mod v1.0.1
- Global Announcement v1.2.8em - Post Img v1.1.1b - Colorize Forum Title v1.0.0
- Simply Merge Threads v1.0.1

Cerrado

Volver a “Soporte, preguntas sobre MODs de phpBB 2”