Seleccionar idioma:
Realizar Donación - Mods Premium - Portfolio



Este sitio utiliza cookies propias y de terceros. Si continúa navegando consideramos que acepta el uso de cookies. OK Más Información.
* Ayuda a modificar DispleyTemplate para Mod Thank-o-Matic 2.0
  Leído 1175 veces
* Viendo el foro
 0 Usuarios y 1 Visitante están viendo este foro.


*
Ago 10 2018


Mi tema: http://custom.simplemachines.org/themes/index.php?lemma=2806
Mod: http://www.smfpersonal.net/downloads.html;sa=view;down=322
Mi foro: http://www.gsmarena.com.mx/index.php
User demo: demo Pass: User1234

La cuestión es que los botones de gracias no aparecen en mi tema, pueden ayudarme por favor??

Estoy dispuesto a tener paciencia para lograr el objetivo...

1.- Modificacion:

encontrar:

Código: [Seleccionar]
echo '
<form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;" onsubmit="return oQuickModify.bInEditMode ? oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\') : false">';

Reemplazar por:
Código: [Seleccionar]
// AJAX Style Thank You Post
if (!empty($modSettings['thankYouPostAJAX']))
{
echo '
<script language="JavaScript" type="text/javascript">
var thank_you_ajax_url = smf_scripturl + \'?action=thankyouajax;topic=' . $context['current_topic'] . '\';

function thankyou(msg_id) {
// Follow the link if no ajax support...
if (!window.XMLHttpRequest)
return true;

// Standard Variables
var elementName = "ThankOMaticID" + msg_id;
var elementButton = "buttonThxID" + msg_id;
var elementLockButton = "thank_lock_button_" + msg_id;
var elementDeleteButton = "thank_delete_button_" + msg_id;

// Tell him that something loading :)
ajax_indicator(true);

// Remove the Thank You Button :)
document.getElementById(elementButton).style.display = "none";
document.getElementById(elementLockButton).style.display = "none";
document.getElementById(elementDeleteButton).style.display = "none";

var thank_you_ajax_thx = thank_you_ajax_url + ";sa=thx;msg=" + msg_id;
var data = ThankYouLoadTextData(thank_you_ajax_thx, elementName, elementButton, elementDeleteButton, elementLockButton);

return !data;
}

function ThankYouLoadTextData(url, elementName, elementButton, elementDeleteButton, elementLockButton) {
if (!window.XMLHttpRequest)
return false;

request = new XMLHttpRequest();
request.onreadystatechange = function() {
if (request.readyState != 4)
return;
if (request.responseText != null && request.status == 200) {
if (request.responseText.substr(0, 7) == "#ERROR#") {
setInnerHTML(document.getElementById("Error" + elementName), request.responseText.substr(7));
document.getElementById(elementName).style.display = "block";
document.getElementById(elementButton).style.display = "inline";
document.getElementById(elementLockButton).style.display = "none";
document.getElementById(elementDeleteButton).style.display = "none";
ajax_indicator(false);
}
else {
document.getElementById(elementName).style.display = "block";
setInnerHTML(document.getElementById(elementName), request.responseText);
document.getElementById(elementButton).style.display = "none";
document.getElementById(elementLockButton).style.display = "inline";
document.getElementById(elementDeleteButton).style.display = "inline";
ajax_indicator(false);
}
return false;
}
else {
return true;
}
}
// Load the Request!
request.open("GET", url, true);
request.send(null);
return request;
}
</script>';
}

echo '
<form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;" onsubmit="return oQuickModify.bInEditMode ? oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\') : false">';

2.- Modificacion:

encontrar:
Código: [Seleccionar]
// Show avatars, images, etc.?
Reemplazar:
Código: [Seleccionar]
// Show some Thank-O-Matic Stats ;D
if (!empty($modSettings['thankYouPostDisplayPage']) && (empty($modSettings['thankYouPostDisplayDisableBecame']) || empty($modSettings['thankYouPostDisplayDisableMade'])))
{
echo '
<li>', $txt['thank_you_post_thx_display'], '</li>';
// Disabled?
if(empty($modSettings['thankYouPostDisplayDisableMade']))
echo '
<li>-', $txt['thank_you_post_made_display'], ': ', $message['member']['thank_you_post']['made'], '</li>';

// Disabled?
if(empty($modSettings['thankYouPostDisplayDisableBecame']))
echo '
<li>-', $txt['thank_you_post_became_display'], ': ', $message['member']['thank_you_post']['became'], '</li>';
}

// Show avatars, images, etc.?

3.- Modificacion:

encontrar:
Código: [Seleccionar]
// Maybe we can approve it, maybe we should?
reemplazar:
Código: [Seleccionar]
elseif (($message['thank_you_post']['post'] && !$message['thank_you_post']['locked']) || (($message['thank_you_post']['lock'] || $message['thank_you_post']['delete']) && $message['thank_you_post']['isThankYouPost']))
echo '
<ul class="reset smalltext quickbuttons">';

// Maybe we can approve it, maybe we should?

4.- Modificacion:

encontrar:
Código: [Seleccionar]
// Can we restore topics?
remmplazar:
Código: [Seleccionar]
// Can do some Thank You Post things :)
if ($message['thank_you_post']['post'] && !$message['thank_you_post']['locked'])
{
echo '
<li class="thank_you_button"><span id="buttonThxID' . $message['id'] . '" style="display: inline;"><a id="buttonThxHrefID' . $message['id'] . '" href="', $scripturl, '?action=thankyou;topic=', $context['current_topic'], '.0;msg=', $message['id'], '"'.(!empty($modSettings['thankYouPostAJAX']) ? ' onclick="return thankyou(' . $message['id'] . ');"' : '').'>', $txt['thank_you_post_post_b'], '</a></span></li>';

if(!empty($modSettings['thankYouPostAJAX']) && $context['browser']['is_ie']) {
// I HATE INTERNET EXPLORER!!!!!!!!!!!!!!!!!!!!!!!
echo '
<script language="JavaScript" type="text/javascript">
// Rewrite the url :x so that internet explorer can not follow it
document.getElementById("buttonThxHrefID' . $message['id'] . '").href = "#msg=' . $message['id'] . '";
</script>';
}
}

// This is the Thank-O-Matic Lock Button with Ajax special Addon :D
if ($message['thank_you_post']['lock'] && $message['thank_you_post']['isThankYouPost'])
echo '
<li class="', $message['thank_you_post']['locked'] ? 'thank_you_open_button' : 'thank_you_lock_button', '"><a href="', $scripturl, '?action=thankyoupostlock;topic=', $context['current_topic'], '.0;msg=', $message['id'], '">', $message['thank_you_post']['locked'] ? $txt['thank_you_post_open_b'] : $txt['thank_you_post_lock_b'], '</a></li>';
elseif ($message['thank_you_post']['lock'] && !$message['thank_you_post']['isThankYouPost'] && !empty($modSettings['thankYouPostAJAX']) && empty($modSettings['thankYouPostAJAXModButtonsDisable']))
echo '
<li class="', $message['thank_you_post']['locked'] ? 'thank_you_open_button' : 'thank_you_lock_button', '" id="thank_lock_button_' . $message['id'] . '" style="display: none;"><a href="', $scripturl, '?action=thankyoupostlock;topic=', $context['current_topic'], '.0;msg=', $message['id'], '">', $message['thank_you_post']['locked'] ? $txt['thank_you_post_open_b'] : $txt['thank_you_post_lock_b'], '</a></li>';
// This will prevent Java Script errors on most browser...
elseif (!empty($modSettings['thankYouPostAJAX']) || !empty($modSettings['thankYouPostAJAXModButtonsDisable']))
echo '
<span id="thank_lock_button_' . $message['id'] . '" style="display: none;"></span>';

// This is the Thank-O-Matic Delete Button with Ajax special Addon ;P
if ($message['thank_you_post']['delete'] && $message['thank_you_post']['isThankYouPost'])
echo '
<li class="thank_you_delete_button"><a href="', $scripturl, '?action=thankyoupostdelete;topic=', $context['current_topic'], '.0;msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_thank_you_post'], '?\');">', $txt['thank_you_post_delete_b'], '</a></li>';
elseif ($message['thank_you_post']['delete'] && !$message['thank_you_post']['isThankYouPost'] && !empty($modSettings['thankYouPostAJAX']) && empty($modSettings['thankYouPostAJAXModButtonsDisable']))
echo '
<li class="thank_you_delete_button" id="thank_delete_button_' . $message['id'] . '" style="display: none;"><a href="', $scripturl, '?action=thankyoupostdelete;topic=', $context['current_topic'], '.0;msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_thank_you_post'], '?\');">', $txt['thank_you_post_delete_b'], '</a></li>';
// This will prevent Java Script errors on most browser...
elseif (!empty($modSettings['thankYouPostAJAX']) || !empty($modSettings['thankYouPostAJAXModButtonsDisable']))
echo '
<span id="thank_delete_button_' . $message['id'] . '" style="display: none;"></span>';

// Can we restore topics?

5.- Modificacion:

encontrar:

Código: [Seleccionar]
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
</ul>';

Reemplazar:
Código: [Seleccionar]
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
</ul>';

// Thank-O-Matic okay close the ul on sometimes :D
elseif (($message['thank_you_post']['post'] && !$message['thank_you_post']['locked']) || (($message['thank_you_post']['lock'] || $message['thank_you_post']['delete']) && $message['thank_you_post']['isThankYouPost']))
echo '
</ul>';

6.- Modificacion

encontrar:
Código: [Seleccionar]
<hr class="post_separator" />';
agregar antes:
Código: [Seleccionar]
';

// Show the Thank You list or the link or.... nothing? XD
echo '
<div class="ThankOMatic ', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', '" style="display: '.($message['thank_you_post']['isThankYouPost'] ? 'block' : 'none').';" id="ThankOMaticID' . $message['id'] . '">
<span class="error" id="ErrorThankOMaticID' . $message['id'] . '"></span>';
// Output the Template for Thank-O-Matic (Normal found in the index.template.php)
// It will fall back into a standard function, if this template_thank_you_post doesn't exists!
if ($message['thank_you_post']['isThankYouPost'])
{
// Mistake? Function not loaded oO.
if (empty($context['call_thank_you_post_func']))
loadThankYouTemplateFunctions();

// Call the correct function =D
$context['call_thank_you_post_func']($message['thank_you_post'], $message['id']);
}
echo '
</div>

7.- Modificacion:

encontrar:
Código: [Seleccionar]
// Restore topic. eh?  No monkey business.
reemplazar:
Código: [Seleccionar]
if($context['thank_you_post_unlock_all'])
$mod_buttons[] = array('text' => 'thank_you_post_unlock_all', 'image' => 'thankyoulock2.png', 'lang' => true, 'url' => $scripturl . '?action=thankyoupostunlockall;topic='  . $context['current_topic'] . '.0');

// Restore topic. eh?  No monkey business.

pd. La cuestion es que el boton de gracias deseo que este afuera del menu de acciones a mano izquierda...

2.0.13

Mensajes: 283

Ver Perfil  Login GSM - Venta de Certificados Samsung - Buy Cert File Repair 

« Última Modificación: Agosto 10, 2018, 03:25:23 pm por Erick cuenca »
En línea




Otros temas de su interes

Autor de MOD para SMF *MIA* qué pasa? se puede rescatar, regenerar, algo? luuuciano Mayo 01, 2014, 05:08:59 pm
Pedido MD. logaed Enero 20, 2011, 02:43:22 pm
mod "foto del día/semana/mes/año"? luuuciano Diciembre 09, 2011, 12:20:19 pm
Cantidad de Gracias en un tema. nodensdorian Enero 18, 2012, 05:25:33 pm
Duda sobre System Post Comment Li_Shaoran Abril 23, 2011, 08:53:43 am
Problemas con Thank-O-Matic 2.0 Ryuzaki Marzo 28, 2014, 01:56:44 pm



Usuario:
Contraseña:
Sesión:
hermes bracelet replica, christian louboutin replica, van cleef and arpels replica, red bottoms replica, cartier love bracelet replica christian louboutin replica, christian louboutin replica, hermes bracelet replica,