Mostrar IP no perfil e nas mensagens

3 participantes

Ver o tópico anterior Ver o tópico seguinte Ir para baixo

Tópico resolvido Mostrar IP no perfil e nas mensagens

Mensagem por Vinicius-RP 12.07.18 16:50

Detalhes da questão


Endereço do fórum: http://cnrpg.forumeiros.com
Versão do fórum: ModernBB

Descrição


Eu estava dando uma olhada em alguns tutoriais no fórum e achei este tópico, porém não ha ensinando como instalar. Eu fiz a parte do JavaScript, mas somente ela não funcionou. Creio que tenha mais alguns passos, alguém pode me ajudar?

https://ajuda.forumeiros.com/t99656-ip-mostrar-no-perfil-e-nas-postagens?nid=20#794505
Vinicius-RP

Vinicius-RP
*

Membro desde : 15/06/2018
Mensagens : 31
Pontos : 47

http://congressohablet.forumeiros.com/forum

Ir para o topo Ir para baixo

Admineiro

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por tikky 12.07.18 18:23

Olá @Vinicius-RP,
(Painel de controle > Usuários & Grupos > Usuários > Perfis)
Primeiramente crie um campo personalizado no perfil, com os seguintes detalhes:

  • Tipo: Campo de texto
  • Obrigatório o Preenchimento? Não
  • Quem pode modificar o valor do seu conteúdo ? O Próprio usuário
  • Exibir este campo para os visitantes tendo ao menos o status Administrador


Cordialmente,
pedxz
tikky

tikky
Admineiro
Admineiro

Membro desde : 13/01/2017
Mensagens : 7806
Pontos : 9049

Ir para o topo Ir para baixo

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por Vinicius-RP 12.07.18 20:06

Pedxz escreveu:Olá @"Vinicius-RP",
(Painel de controle > Usuários & Grupos > Usuários > Perfis)
Primeiramente crie um campo personalizado no perfil, com os seguintes detalhes:

  • Tipo: Campo de texto
  • Obrigatório o Preenchimento? Não
  • Quem pode modificar o valor do seu conteúdo ? O Próprio usuário
  • Exibir este campo para os visitantes tendo ao menos o status Administrador


Cordialmente,
pedxz


Então, continua não aparecendo. A Opção até aparece no perfil, porém o IP não
Vinicius-RP

Vinicius-RP
*

Membro desde : 15/06/2018
Mensagens : 31
Pontos : 47

http://congressohablet.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por Vinicius-RP 12.07.18 20:09

Irei criar uma nova conta para testar se ela ta pegando o IP no cadastro
Vinicius-RP

Vinicius-RP
*

Membro desde : 15/06/2018
Mensagens : 31
Pontos : 47

http://congressohablet.forumeiros.com/forum

Ir para o topo Ir para baixo

Admineiro

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por tikky 12.07.18 20:10

Agora modificar a opção de visualização do perfil para convidados, e mude também a opção de cima Exibir este campo para os visitantes tendo ao menos o status , só para ver uma pequena coisa, para que o JS comece a dar!
tikky

tikky
Admineiro
Admineiro

Membro desde : 13/01/2017
Mensagens : 7806
Pontos : 9049

Ir para o topo Ir para baixo

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por Vinicius-RP 12.07.18 20:22

Pedxz escreveu:Agora modificar a opção de visualização do perfil para convidados, e mude também a opção de cima Exibir este campo para os visitantes tendo ao menos o status , só para ver uma pequena coisa, para que o JS comece a dar!

Modificado
Vinicius-RP

Vinicius-RP
*

Membro desde : 15/06/2018
Mensagens : 31
Pontos : 47

http://congressohablet.forumeiros.com/forum

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por RafaelS. 12.07.18 20:25

Título alterado de ‘Como fazer funcionar esse código.’ para ‘Mostrar IP no perfil e nas mensagens’.


Última edição por RafaelS. em 12.07.18 20:27, editado 2 vez(es)
RafaelS.

RafaelS.
Membro Entusiasta
Membro Entusiasta

Membro desde : 26/04/2014
Mensagens : 5746
Pontos : 7156

http://techmais.forumeiros.com/

Ir para o topo Ir para baixo

Admineiro

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por tikky 12.07.18 20:26

Altere também o campo para os convidados veres, para poder ver o id do campo Muito feliz
tikky

tikky
Admineiro
Admineiro

Membro desde : 13/01/2017
Mensagens : 7806
Pontos : 9049

Ir para o topo Ir para baixo

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por Vinicius-RP 12.07.18 20:32

Pedxz escreveu:Altere também o campo para os convidados veres, para poder ver o id do campo Muito feliz

Já alterei, porém acho que o cód do JS deve bloquear para convidados/membros não verem

http://prntscr.com/k5rgwo
Vinicius-RP

Vinicius-RP
*

Membro desde : 15/06/2018
Mensagens : 31
Pontos : 47

http://congressohablet.forumeiros.com/forum

Ir para o topo Ir para baixo

Admineiro

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por tikky 12.07.18 20:39

Vinicius-RP escreveu:
Pedxz escreveu:Altere também o campo para os convidados veres, para poder ver o id do campo Muito feliz

Já alterei, porém acho que o cód do JS deve bloquear para convidados/membros não verem

http://prntscr.com/k5rgwo

Percebi, então pode tirar um printscreen na página principal dos campos, para ver onde o campo do IP está, posição!
tikky

tikky
Admineiro
Admineiro

Membro desde : 13/01/2017
Mensagens : 7806
Pontos : 9049

Ir para o topo Ir para baixo

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por Vinicius-RP 12.07.18 20:48

Pedxz escreveu:
Vinicius-RP escreveu:
Pedxz escreveu:Altere também o campo para os convidados veres, para poder ver o id do campo Muito feliz

Já alterei, porém acho que o cód do JS deve bloquear para convidados/membros não verem

http://prntscr.com/k5rgwo

Percebi, então pode tirar um printscreen na página principal dos campos, para ver onde o campo do IP está, posição!

http://prntscr.com/k5rnd1
Vinicius-RP

Vinicius-RP
*

Membro desde : 15/06/2018
Mensagens : 31
Pontos : 47

http://congressohablet.forumeiros.com/forum

Ir para o topo Ir para baixo

Admineiro

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por tikky 12.07.18 21:04

Mude o seu JS para:
Código:
/*******************************************************************************************************
 * Application: Location IP.
 * Description: Shows the user's IP in the profile.
 * Version: RC2 - Beta tester only!
 * Made and Optimizations by JScript - 2014/12/10, 11, 13
 * Copyright (c) 2014 JScript <jscriptbrasil at live dot com>
 * This work is free. You can redistribute it and/or modify it
 * under the terms of the WTFPL, Version 2
********************************************************************************************************
-
Variables that can be changed by the user:
1- profile_field (change the value profile_field_XX_XX by your profile field!)
2- error_msg
3- tTimeOut
4- checkTime
Note: For those variables "tTimeout" and "checkTime" ->
 - to avoid the "Request Limit" the lowest value should be 5 seconds and 10 seconds respectively!
*/
var IPLocation = {
 profile_field: 'profile_field_13_1',
 error_msg: "Warning!\n\nAn error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!",
 setLoop: 0,
 lInterval: 10,
 tTimeOut: 10000, // Min is 10 seconds to start check.
 checkTime: 300000, // Min is 5 minutes of interval to check a new IP.
 TID: 0
};
 
/**
 * jQuery.ajaxCORS - Cross Domain Ajax - Version: RC1
 * Using: query.yahooapis.com, based on James Padolsey
 * Made and Optimizations by JScript - 2014/12/13
 **/
jQuery.ajaxCORS = (function(_cors) {
 var protocol = location.protocol,
 hostname = location.hostname,
 patt = RegExp(protocol + '//' + hostname),
 YQL = 'http' + (/^https/.test(protocol) ? 's' : '') + '://query.yahooapis.com/v1/public/yql?callback=?',
 query = 'select * from html where url="{URL}" and xpath="*"';
 
 function isExternal(url) {
 return !patt.test(url) && /:\/\//.test(url);
 }
 return function(Obj) {
 var url = Obj.url;
 
 if (/get/i.test(Obj.type) && !/json/i.test(Obj.dataType) && isExternal(url)) {
 // Manipulate options so that JSONP-x request is made to YQL
 Obj.url = YQL;
 Obj.dataType = 'json';
 Obj.data = {
 q: query.replace(
 '{URL}',
 url + (Obj.data ?
 (/\?/.test(url) ? '&' : '?') + jQuery.param(Obj.data) : '')
 ),
 format: 'xml'
 };
 // Since it's a JSONP request, then complete === success
 if (!Obj.success && Obj.complete) {
 Obj.success = Obj.complete;
 delete Obj.complete;
 }
 Obj.success = (function(_success) {
 return function(data) {
 if (_success) {
 // Fake XHR callback.
 _success.call(this, {
 responseText: (data.results[0] || '')
 // YQL screws with tag <script>, then get rid of them...
 .replace(/<script[^>]+?\/>|<script(.|\s)*?\/script>/gi, '')
 }, 'success');
 }
 };
 })(Obj.success);
 }
 return _cors.apply(this, arguments);
 };
})(jQuery.ajax);
 
/**
 * Waits for a user registers to record the initial IP!
 **/
if (location.search == "?agreed=true\x26step=2") {
 IPLocation.setLoop = setInterval(function() {
 if (document.getElementById(IPLocation.profile_field) !== null) {
 jQuery("#" + IPLocation.profile_field).closest("dl").hide();
 clearInterval(IPLocation.setLoop);
 $.ajax({
 type: "GET",
 // url: 'http://www.whatsmyip.net/',
 url: 'http://wtfismyip.com/json',
 dataType: "json",
 success: function(data) {
 // var ip = jQuery(data.responseText).find('h1:first input').val(); // ->http://www.whatsmyip.net/
 var ip = data.YourFuckingIPAddress; // ->http://wtfismyip.com/
 jQuery("#" + IPLocation.profile_field).val(ip);
 },
 error: function(data) {
 // console.log(data);
 jQuery("#" + IPLocation.profile_field).val('127.0.0.0');
 alert("Warning!\n\nAn error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!");
 }
 });
 };
 }, IPLocation.lInterval);
} else {
 jQuery(function() {
 if (!_userdata.session_logged_in) {
 return false;
 }
 /**
 * If you are logged in, writes the current IP in the profile field...
 **/
 setTimeout(function() {
 _SaveIPInProfile();
 setInterval(function() {
 _SaveIPInProfile();
 }, IPLocation.checkTime);
 }, IPLocation.tTimeOut);
 
 function _SaveIPInProfile() {
 IPLocation.TID = jQuery('a[href*="tid="]').attr('href').split('tid=')[1].split('&')[0];
 $.ajax({
 type: "GET",
 // url: 'http://www.whatsmyip.net/',
 url: 'http://wtfismyip.com/json',
 dataType: "json",
 success: function(data) {
 // var ip = jQuery(data.responseText).find('h1:first input').val(); // ->http://www.whatsmyip.net/
 var ip = data.YourFuckingIPAddress; // ->http://wtfismyip.com/
 jQuery.post("/ajax_profile.forum?jsoncallback=?", {
 id: IPLocation.profile_field.substring(17, IPLocation.profile_field.length),
 user: _userdata.user_id,
 active: "1",
 content: '[["' + IPLocation.profile_field + '", "' + ip + '"]]',
 tid: IPLocation.TID
 }, function(data) {
 console.log("The IP was saved in profile!");
 }, "json").fail(function() {
 console.log("Error saving the IP to profile!");
 });
 },
 error: function(data) {
 console.log("Error getting public IP!");
 }
 });
 };
 });
}
 
/**
 * If the member go on editing your profile and it is not a staff member, the IP field is removed!
 **/
if (location.pathname.indexOf('/profile') == 0) {
 IPLocation.setLoop = setInterval(function() {
 if (document.getElementById(IPLocation.profile_field) !== null) {
 if (_userdata.user_level == 0) {
 jQuery("#" + IPLocation.profile_field).closest("dl").remove();
 }
 clearInterval(IPLocation.setLoop);
 };
 }, IPLocation.lInterval);
}
 
/**
 * If the member is viewing your profile and ->
 **/
if (location.pathname.indexOf('/u') == 0) {
 IPLocation.setLoop = setInterval(function() {
 if (document.getElementById('profile-advanced-right') !== null) {
 if (!_userdata.session_logged_in) {
 return false;
 }
 var forbid = jQuery('#field_id' + IPLocation.profile_field.substring(17, IPLocation.profile_field.length));
 if (forbid.length) {
 forbid.attr('id', 'forbid');
 /**
 * <- it is not a staff member, the IP field will be removed!
 **/
 if (_userdata.user_level == 0) {
 forbid.remove();
 }
 }
 /**
 * Since we do not have access to the template of the advanced profile,
 * then we have to modify the identifiers so we can intercept them in order
 * to avoid that members can modify the IP field!
 **/
 var oTarget = jQuery('[id^=field_id]'),
 iLen = oTarget.length,
 index = 0;
 for (; index < iLen; index++) {
 var oThis = jQuery(oTarget[index]);
 oThis.attr('id', 'JS_' + oThis.attr('id'));
 };
 clearInterval(IPLocation.setLoop);
 $('[id^=JS_field_id]').each(function() {
 if ($(this).find('.field_editable').is('span, div')) {
 $(this).hover(function() {
 if ($(this).find('.field_editable.invisible').is('span, div')) {
 $(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="http://2img.net/i/fa/invision/../edit.png" /></div>');
 $(this).find('.ajax-profil_edit').attr({
 alt: "{L_FIELD_EDIT_VALUE}",
 title: "{L_FIELD_EDIT_VALUE}"
 }).click(function() {
 $(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="http://2img.net/i/fa/invision/../valid.png" class="ajax-profil_valid" />').find('input,select');
 $(this).prev().find('.ajax-profil_valid').attr({
 alt: "{L_VALIDATE}",
 title: "{L_VALIDATE}"
 }).click(function() {
 var content = new Array();
 $(this).parent().find('[name]').each(function() {
 var type_special = $(this).is('input[type=radio],input[type=checkbox]');
 if ((type_special && $(this).is(':checked')) || !type_special) {
 content.push(new Array($(this).attr('name'), $(this).attr('value')));
 }
 });
 var id_name = $(this).parents('[id^=JS_field_id]').attr('id');
 var id = id_name.substring(11, id_name.length);
 // console.log('id_name: ' + id_name + '\n' + 'id: ' + id);
 $.post(
 "/ajax_profile.forum?jsoncallback=?", {
 id: id,
 user: location.pathname.substr(2),
 active: "1",
 content: $.toJSON(content),
 tid: jQuery('a[href*="tid="]').attr('href').split('tid=')[1].split('&')[0];
 },
 function(data) {
 $.each(data, function(i, item) {
 $('[id=JS_field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
 });
 },
 "json"
 );
 });
 $(this).remove();
 });
 }
 }, function() {
 if ($(this).find('.field_editable.invisible').is('span, div')) {
 $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
 $(this).find('.ajax-profil_edit').remove();
 }
 });
 }
 });
 
 };
 }, 50);
}
tikky

tikky
Admineiro
Admineiro

Membro desde : 13/01/2017
Mensagens : 7806
Pontos : 9049

Ir para o topo Ir para baixo

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por Vinicius-RP 12.07.18 21:57

Pedxz escreveu:Mude o seu JS para:
Código:
/*******************************************************************************************************
 * Application: Location IP.
 * Description: Shows the user's IP in the profile.
 * Version: RC2 - Beta tester only!
 * Made and Optimizations by JScript - 2014/12/10, 11, 13
 * Copyright (c) 2014 JScript <jscriptbrasil at live dot com>
 * This work is free. You can redistribute it and/or modify it
 * under the terms of the WTFPL, Version 2
********************************************************************************************************
-
Variables that can be changed by the user:
1- profile_field (change the value profile_field_XX_XX by your profile field!)
2- error_msg
3- tTimeOut
4- checkTime
Note: For those variables "tTimeout" and "checkTime" ->
 - to avoid the "Request Limit" the lowest value should be 5 seconds and 10 seconds respectively!
*/
var IPLocation = {
 profile_field: 'profile_field_13_1',
 error_msg: "Warning!\n\nAn error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!",
 setLoop: 0,
 lInterval: 10,
 tTimeOut: 10000, // Min is 10 seconds to start check.
 checkTime: 300000, // Min is 5 minutes of interval to check a new IP.
 TID: 0
};
 
/**
 * jQuery.ajaxCORS - Cross Domain Ajax - Version: RC1
 * Using: query.yahooapis.com, based on James Padolsey
 * Made and Optimizations by JScript - 2014/12/13
 **/
jQuery.ajaxCORS = (function(_cors) {
 var protocol = location.protocol,
 hostname = location.hostname,
 patt = RegExp(protocol + '//' + hostname),
 YQL = 'http' + (/^https/.test(protocol) ? 's' : '') + '://query.yahooapis.com/v1/public/yql?callback=?',
 query = 'select * from html where url="{URL}" and xpath="*"';
 
 function isExternal(url) {
 return !patt.test(url) && /:\/\//.test(url);
 }
 return function(Obj) {
 var url = Obj.url;
 
 if (/get/i.test(Obj.type) && !/json/i.test(Obj.dataType) && isExternal(url)) {
 // Manipulate options so that JSONP-x request is made to YQL
 Obj.url = YQL;
 Obj.dataType = 'json';
 Obj.data = {
 q: query.replace(
 '{URL}',
 url + (Obj.data ?
 (/\?/.test(url) ? '&' : '?') + jQuery.param(Obj.data) : '')
 ),
 format: 'xml'
 };
 // Since it's a JSONP request, then complete === success
 if (!Obj.success && Obj.complete) {
 Obj.success = Obj.complete;
 delete Obj.complete;
 }
 Obj.success = (function(_success) {
 return function(data) {
 if (_success) {
 // Fake XHR callback.
 _success.call(this, {
 responseText: (data.results[0] || '')
 // YQL screws with tag <script>, then get rid of them...
 .replace(/<script[^>]+?\/>|<script(.|\s)*?\/script>/gi, '')
 }, 'success');
 }
 };
 })(Obj.success);
 }
 return _cors.apply(this, arguments);
 };
})(jQuery.ajax);
 
/**
 * Waits for a user registers to record the initial IP!
 **/
if (location.search == "?agreed=true\x26step=2") {
 IPLocation.setLoop = setInterval(function() {
 if (document.getElementById(IPLocation.profile_field) !== null) {
 jQuery("#" + IPLocation.profile_field).closest("dl").hide();
 clearInterval(IPLocation.setLoop);
 $.ajax({
 type: "GET",
 // url: 'http://www.whatsmyip.net/',
 url: 'http://wtfismyip.com/json',
 dataType: "json",
 success: function(data) {
 // var ip = jQuery(data.responseText).find('h1:first input').val(); // ->http://www.whatsmyip.net/
 var ip = data.YourFuckingIPAddress; // ->http://wtfismyip.com/
 jQuery("#" + IPLocation.profile_field).val(ip);
 },
 error: function(data) {
 // console.log(data);
 jQuery("#" + IPLocation.profile_field).val('127.0.0.0');
 alert("Warning!\n\nAn error occurred while requesting registration, wait 10 seconds and refresh the page to re-register!");
 }
 });
 };
 }, IPLocation.lInterval);
} else {
 jQuery(function() {
 if (!_userdata.session_logged_in) {
 return false;
 }
 /**
 * If you are logged in, writes the current IP in the profile field...
 **/
 setTimeout(function() {
 _SaveIPInProfile();
 setInterval(function() {
 _SaveIPInProfile();
 }, IPLocation.checkTime);
 }, IPLocation.tTimeOut);
 
 function _SaveIPInProfile() {
 IPLocation.TID = jQuery('a[href*="tid="]').attr('href').split('tid=')[1].split('&')[0];
 $.ajax({
 type: "GET",
 // url: 'http://www.whatsmyip.net/',
 url: 'http://wtfismyip.com/json',
 dataType: "json",
 success: function(data) {
 // var ip = jQuery(data.responseText).find('h1:first input').val(); // ->http://www.whatsmyip.net/
 var ip = data.YourFuckingIPAddress; // ->http://wtfismyip.com/
 jQuery.post("/ajax_profile.forum?jsoncallback=?", {
 id: IPLocation.profile_field.substring(17, IPLocation.profile_field.length),
 user: _userdata.user_id,
 active: "1",
 content: '[["' + IPLocation.profile_field + '", "' + ip + '"]]',
 tid: IPLocation.TID
 }, function(data) {
 console.log("The IP was saved in profile!");
 }, "json").fail(function() {
 console.log("Error saving the IP to profile!");
 });
 },
 error: function(data) {
 console.log("Error getting public IP!");
 }
 });
 };
 });
}
 
/**
 * If the member go on editing your profile and it is not a staff member, the IP field is removed!
 **/
if (location.pathname.indexOf('/profile') == 0) {
 IPLocation.setLoop = setInterval(function() {
 if (document.getElementById(IPLocation.profile_field) !== null) {
 if (_userdata.user_level == 0) {
 jQuery("#" + IPLocation.profile_field).closest("dl").remove();
 }
 clearInterval(IPLocation.setLoop);
 };
 }, IPLocation.lInterval);
}
 
/**
 * If the member is viewing your profile and ->
 **/
if (location.pathname.indexOf('/u') == 0) {
 IPLocation.setLoop = setInterval(function() {
 if (document.getElementById('profile-advanced-right') !== null) {
 if (!_userdata.session_logged_in) {
 return false;
 }
 var forbid = jQuery('#field_id' + IPLocation.profile_field.substring(17, IPLocation.profile_field.length));
 if (forbid.length) {
 forbid.attr('id', 'forbid');
 /**
 * <- it is not a staff member, the IP field will be removed!
 **/
 if (_userdata.user_level == 0) {
 forbid.remove();
 }
 }
 /**
 * Since we do not have access to the template of the advanced profile,
 * then we have to modify the identifiers so we can intercept them in order
 * to avoid that members can modify the IP field!
 **/
 var oTarget = jQuery('[id^=field_id]'),
 iLen = oTarget.length,
 index = 0;
 for (; index < iLen; index++) {
 var oThis = jQuery(oTarget[index]);
 oThis.attr('id', 'JS_' + oThis.attr('id'));
 };
 clearInterval(IPLocation.setLoop);
 $('[id^=JS_field_id]').each(function() {
 if ($(this).find('.field_editable').is('span, div')) {
 $(this).hover(function() {
 if ($(this).find('.field_editable.invisible').is('span, div')) {
 $(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="http://2img.net/i/fa/invision/../edit.png" /></div>');
 $(this).find('.ajax-profil_edit').attr({
 alt: "{L_FIELD_EDIT_VALUE}",
 title: "{L_FIELD_EDIT_VALUE}"
 }).click(function() {
 $(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="http://2img.net/i/fa/invision/../valid.png" class="ajax-profil_valid" />').find('input,select');
 $(this).prev().find('.ajax-profil_valid').attr({
 alt: "{L_VALIDATE}",
 title: "{L_VALIDATE}"
 }).click(function() {
 var content = new Array();
 $(this).parent().find('[name]').each(function() {
 var type_special = $(this).is('input[type=radio],input[type=checkbox]');
 if ((type_special && $(this).is(':checked')) || !type_special) {
 content.push(new Array($(this).attr('name'), $(this).attr('value')));
 }
 });
 var id_name = $(this).parents('[id^=JS_field_id]').attr('id');
 var id = id_name.substring(11, id_name.length);
 // console.log('id_name: ' + id_name + '\n' + 'id: ' + id);
 $.post(
 "/ajax_profile.forum?jsoncallback=?", {
 id: id,
 user: location.pathname.substr(2),
 active: "1",
 content: $.toJSON(content),
 tid: jQuery('a[href*="tid="]').attr('href').split('tid=')[1].split('&')[0];
 },
 function(data) {
 $.each(data, function(i, item) {
 $('[id=JS_field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
 });
 },
 "json"
 );
 });
 $(this).remove();
 });
 }
 }, function() {
 if ($(this).find('.field_editable.invisible').is('span, div')) {
 $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
 $(this).find('.ajax-profil_edit').remove();
 }
 });
 }
 });
 
 };
 }, 50);
}

Funcionou, vlw
Vinicius-RP

Vinicius-RP
*

Membro desde : 15/06/2018
Mensagens : 31
Pontos : 47

http://congressohablet.forumeiros.com/forum

Ir para o topo Ir para baixo

Admineiro

Tópico resolvido Re: Mostrar IP no perfil e nas mensagens

Mensagem por tikky 12.07.18 21:59

Tópico resolvido



Movido para "Questões resolvidas".
tikky

tikky
Admineiro
Admineiro

Membro desde : 13/01/2017
Mensagens : 7806
Pontos : 9049

Ir para o topo Ir para baixo

Ver o tópico anterior Ver o tópico seguinte Ir para o topo

- Tópicos semelhantes

Permissões neste sub-fórum
Não podes responder a tópicos