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.

Consulta subir imágenes a Postimage.org

Foros de soporte phpBB 3.1.x
Avatar de Usuario
Coyote64
Asiduo/a
Mensajes: 132
Registrado: 12 Ago 2014, 14:38
Género:

Re: Consulta subir imágenes a Postimage.org

#16

Mensaje por Coyote64 »

micontre escribió:puedes probar con la extencion TinyPic que que si añade solamente el bbcode "img" https://www.phpbb.com/community/viewtop ... &t=2297946

Le tengo micontre. Lo tengo como alternativa, lo único es que con esa extensión no permite subir desde una URL (al menos que yo sepa) y con postimage si y va genial.

El problema no es otro que ese rediccionamiento te anula el efecto lightbox y si pinchas sobre la imagen te lleva a la página de psotimage.

Muchas gracias
SPOILER_SHOW
URL: http://www.la-guarida.com
Versión phpBB: phpBB3 (3.1.4)
Extensiones o MODs Instalados: Activity Stats
Advanced BBCode Box
phpbb3 Seo Sitemap
Board Announcements
Board Rules
First post on every page
Google Analytics
Lightbox
Pages
phpBB Display Age Users
QuickReply
Welcome on Index
Scroll To Top
Quicklogin
Quickreply
Adduser
Banlist
Board3portal


Estilo(s) usado(s): platinum
Servidor: Hostsuar
Actualización desde otra versión: No
Conversión desde otro sistema de foros: No

antispam2022
Invitado

Re: Consulta subir imágenes a Postimage.org

#17

Mensaje por antispam2022 »

andares escribió: Viendo el javascript que proporcionan los de "postimage.org" para acceder a su servicio mediante una ventana emergente, creo que no es posible eliminar ese direccionamento...

A ver si algun experto en javascript opina lo contrario...

Acceso al javascript:
http://mod.postimage.org/phpbb3-spanish-hotlink.js

Lo he intentado y no hay manera, y eso que el codigo no es nada extenso y consta solo de unas pocas estructuras de control if... else y par de bucles for.

Tengo que volver a intentarlo en otro momento más calmado y refrescado.

La clave está en los valores que va tomando la variable postimage_area
que luego son escritos en el area de texto textarea:

Código: Seleccionar todo

var postimage_area=opener.document.getElementsByTagName('textarea');
Por otra parte ya he encontrado dos extensiones no oficiales que ponen el enlace • Add image to post
sin necesidad de usar la extensión "Custom Code", (a la que se le puede sacar muchisimo partido).

Esta extension para poner el enlace de postimage me ha gustado especialmente, no interfiere en la extension cBB chat, porque solo llama al jquery de postimage.org en las plantillas del editor y en respuesta rapida:
postimg-hifikabin.zip
(17.78 KiB) Descargado 122 veces

Avatar de Usuario
andares
Moderador
Mensajes: 1548
Registrado: 18 Nov 2008, 03:32
Género:

Re: Consulta subir imágenes a Postimage.org

#18

Mensaje por andares »

@antispam2022:

Para solicitar soporte es necesario segun las Normas proporcionar tus datos: http://www.phpbb-es.com/foro/viewtopic.php?f=4&t=10547


antispam2022
Invitado

Re: Consulta subir imágenes a Postimage.org

#19

Mensaje por antispam2022 »

Ya lo se, andares, pongo entonces ya los datos de mi foro provisional hasta que se hayan propagado las DNS del dominio que voy a usar.

Gracias y disculpas.

POSDATA: El anteponer el signo de @ a mi Nick, ¿se supone que me haria llegar una notificacion? porque no me estan funcionando bien las notificaciones de algunos temas a los que estoy subscrito.
Última edición por antispam2022 el 21 Abr 2015, 04:06, editado 1 vez en total.

antispam2022
Invitado

Re: Consulta subir imágenes a Postimage.org

#20

Mensaje por antispam2022 »

Di con la solución, el archivo .js no tiene saltos de lína, así que lo primero que hice fué separar las lineas para que se entienda mejor (no me di cuenta que @andares ya lo tenía descomprimido), este sería el achivo final modificado:
Spoiler

Código: Seleccionar todo

// MOD Title: Simple Image Upload
// MOD Author: Sium < admin@postimage.org > (N/A) http://postimage.org/
// MOD Version: 1.5.0

if(typeof postimage_lang==='undefined')
{
	var postimage_lang="spanish";
	var postimage_add_text="Insertar una imagen";

function postimage_query_string(postimage_search_name){
	if(window.location.hash){
		postimage_query=window.location.hash.substring(1).split("&");
		for(postimage_i=0;postimage_i<postimage_query.length;postimage_i++){
			postimage_string_data=postimage_query[postimage_i].split("=");
			if(postimage_string_data[0]==postimage_search_name){
				postimage_string_data.shift();
				return unescape(postimage_string_data.join("="));
			}
		}
	}
	return void(0);
}

if(opener){
	var postimage_text=postimage_query_string("postimage_text");
	if(postimage_text){
		var postimage_id=postimage_query_string("postimage_id");
		var postimage_area=opener.document.getElementsByTagName('textarea');
		for(var postimage_i=0;postimage_i<postimage_area.length;postimage_i++){
			if(postimage_i==postimage_id){
				break;
			}
		}
		if(opener.editorHandlemessage && opener.editorHandlemessage.bRichTextEnabled){
			opener.editorHandlemessage.insertText(postimage_text+"<br /><br />",false);
		}else{
			//Añadir estas líneas
			postimage_text=postimage_text.replace('[url=','');
			postimage_text=postimage_text.replace('[/url]','');
			postimage_text = postimage_text.substring(postimage_text.indexOf('['),postimage_text.length);			postimage_area[postimage_i].value=postimage_area[postimage_i].value+postimage_text;
		}
	opener.focus();
	window.close();
	}
}


function postimage_insert(){
	var postimage_area=document.getElementsByTagName('textarea');
	for(var postimage_i=0;postimage_i<postimage_area.length;postimage_i++){
		if(!postimage_area[postimage_i].name.match(/username_list|search|recipients|coppa_mail|board_email_sig/i)){
			postimage_div=document.createElement('div');
			postimage_open=document.createElement('a');
			postimage_open.innerHTML=postimage_add_text;
			postimage_open.href="javascript:postimage_upload("+postimage_i+");";
			postimage_span=document.createElement('span');
			postimage_span.innerHTML="&#160;&#8226;&#160;";
			postimage_div.appendChild(document.createElement('br'));
			postimage_div.appendChild(postimage_span);
			postimage_div.appendChild(postimage_open);
			postimage_div.appendChild(document.createElement('br'));
			postimage_div.appendChild(document.createElement('br'));
			if(postimage_area[postimage_i].nextSibling){
				postimage_area[postimage_i].parentNode.insertBefore(postimage_div,postimage_area[postimage_i].nextSibling);
			}else{
				postimage_area[postimage_i].parentNode.appendChild(postimage_div);
			}
		}
	}
}

function postimage_upload(areaid){
	window.open("http://postimage.org/index.php?mode=phpbb3&areaid="+areaid+"&hash=1&lang="+postimage_lang+"&code=&content=family&forumurl="+escape(document.location.href),"postimage","resizable=yes,width=500,height=400");
	return void(0);
	}
	if(typeof postimage_text==='undefined'){
		if(window.addEventListener){window.addEventListener('DOMContentLoaded',postimage_insert,false);
		}else if(window.attachEvent){
			window.attachEvent('onload',postimage_insert);
		}
	}
}
Justo delante de

Código: Seleccionar todo

postimage_area[postimage_i].value=postimage_area[postimage_i].value+postimage_text;
He añadido estas líneas:

Código: Seleccionar todo

	postimage_text=postimage_text.replace('[url=','');
	postimage_text=postimage_text.replace('[/url]','');
	postimage_text = postimage_text.substring(postimage_text.indexOf('['),postimage_text.length);

thomybra
Observador/a
Mensajes: 9
Registrado: 06 May 2015, 19:00

Re: Consulta subir imágenes a Postimage.org

#21

Mensaje por thomybra »

Borrado
Última edición por thomybra el 06 May 2015, 19:09, editado 1 vez en total.

thomybra
Observador/a
Mensajes: 9
Registrado: 06 May 2015, 19:00

Re: Consulta subir imágenes a Postimage.org

#22

Mensaje por thomybra »

antispam2022 escribió:Di con la solución, el archivo .js no tiene saltos de lína, así que lo primero que hice fué separar las lineas para que se entienda mejor (no me di cuenta que @andares ya lo tenía descomprimido), este sería el achivo final modificado:
Spoiler

Código: Seleccionar todo

// MOD Title: Simple Image Upload
// MOD Author: Sium < admin@postimage.org > (N/A) http://postimage.org/
// MOD Version: 1.5.0

if(typeof postimage_lang==='undefined')
{
	var postimage_lang="spanish";
	var postimage_add_text="Insertar una imagen";

function postimage_query_string(postimage_search_name){
	if(window.location.hash){
		postimage_query=window.location.hash.substring(1).split("&");
		for(postimage_i=0;postimage_i<postimage_query.length;postimage_i++){
			postimage_string_data=postimage_query[postimage_i].split("=");
			if(postimage_string_data[0]==postimage_search_name){
				postimage_string_data.shift();
				return unescape(postimage_string_data.join("="));
			}
		}
	}
	return void(0);
}

if(opener){
	var postimage_text=postimage_query_string("postimage_text");
	if(postimage_text){
		var postimage_id=postimage_query_string("postimage_id");
		var postimage_area=opener.document.getElementsByTagName('textarea');
		for(var postimage_i=0;postimage_i<postimage_area.length;postimage_i++){
			if(postimage_i==postimage_id){
				break;
			}
		}
		if(opener.editorHandlemessage && opener.editorHandlemessage.bRichTextEnabled){
			opener.editorHandlemessage.insertText(postimage_text+"<br /><br />",false);
		}else{
			//Añadir estas líneas
			postimage_text=postimage_text.replace('[url=','');
			postimage_text=postimage_text.replace('[/url]','');
			postimage_text = postimage_text.substring(postimage_text.indexOf('['),postimage_text.length);			postimage_area[postimage_i].value=postimage_area[postimage_i].value+postimage_text;
		}
	opener.focus();
	window.close();
	}
}


function postimage_insert(){
	var postimage_area=document.getElementsByTagName('textarea');
	for(var postimage_i=0;postimage_i<postimage_area.length;postimage_i++){
		if(!postimage_area[postimage_i].name.match(/username_list|search|recipients|coppa_mail|board_email_sig/i)){
			postimage_div=document.createElement('div');
			postimage_open=document.createElement('a');
			postimage_open.innerHTML=postimage_add_text;
			postimage_open.href="javascript:postimage_upload("+postimage_i+");";
			postimage_span=document.createElement('span');
			postimage_span.innerHTML="&#160;&#8226;&#160;";
			postimage_div.appendChild(document.createElement('br'));
			postimage_div.appendChild(postimage_span);
			postimage_div.appendChild(postimage_open);
			postimage_div.appendChild(document.createElement('br'));
			postimage_div.appendChild(document.createElement('br'));
			if(postimage_area[postimage_i].nextSibling){
				postimage_area[postimage_i].parentNode.insertBefore(postimage_div,postimage_area[postimage_i].nextSibling);
			}else{
				postimage_area[postimage_i].parentNode.appendChild(postimage_div);
			}
		}
	}
}

function postimage_upload(areaid){
	window.open("http://postimage.org/index.php?mode=phpbb3&areaid="+areaid+"&hash=1&lang="+postimage_lang+"&code=&content=family&forumurl="+escape(document.location.href),"postimage","resizable=yes,width=500,height=400");
	return void(0);
	}
	if(typeof postimage_text==='undefined'){
		if(window.addEventListener){window.addEventListener('DOMContentLoaded',postimage_insert,false);
		}else if(window.attachEvent){
			window.attachEvent('onload',postimage_insert);
		}
	}
}
Justo delante de

Código: Seleccionar todo

postimage_area[postimage_i].value=postimage_area[postimage_i].value+postimage_text;
He añadido estas líneas:

Código: Seleccionar todo

	postimage_text=postimage_text.replace('[url=','');
	postimage_text=postimage_text.replace('[/url]','');
	postimage_text = postimage_text.substring(postimage_text.indexOf('['),postimage_text.length);
Hola antispam2022, tengo la misma duda que Coyote64 pero al insertar tu codigo modificado sigue exactamente igual

PD: lo guarde en mi servidor y edite los archivos para que busquen el javascript a esa direccion y tengo SMF pero creo que mas o menos lo mismo, saludos!

antispam2022
Invitado

Re: Consulta subir imágenes a Postimage.org

#23

Mensaje por antispam2022 »

Ademas de introducir la modificacion en el archivo .js hay que indicarle que lea ese archivo de forma local, pero este sitio es para soporte de los que tienen foro phpBB, nos van a llamar la atencion, abre un hilo en la zona de charla y lo hablamos, si te apetece.

Avatar de Usuario
andares
Moderador
Mensajes: 1548
Registrado: 18 Nov 2008, 03:32
Género:

Re: Consulta subir imágenes a Postimage.org

#24

Mensaje por andares »

@thomybra

Para solicitar soporte es necesario segun las Normas proporcionar tus datos: http://www.phpbb-es.com/foro/viewtopic.php?f=4&t=10547

El codigo de antispam2022 funciona perfecto, algo estas haciendo mal :?:

thomybra
Observador/a
Mensajes: 9
Registrado: 06 May 2015, 19:00

Re: Consulta subir imágenes a Postimage.org

#25

Mensaje por thomybra »

Mil perdon les dejo el link para que lo puedan seguir y poder continuar donde deberia haber hecho el post Saludos y disculpas

http://www.phpbb-es.com/foro/viewtopic.php?f=41&t=40624

Cerrado

Volver a “Foros de Soporte 3.1.x”