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.
* Adk Rules Posts Mod or Bug?
  Leído 1374 veces
* Viendo el foro
 0 Usuarios y 1 Visitante están viendo este foro.


Tema Solucionado
*
Jul 17 2012


Hi, I just installed Adk Rules Post to my forum yesterday and found some problems trying to work correctly with it.

First of all, the css file didn't get loaded correctly. I was able to fix that by modifying index.template.php from:
Código: [Seleccionar]
if ((!empty($modSettings['ADKrp_Act'])) && (($context['current_action'] == 'post') || ($context['current_action'] == 'post2')))
echo'
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ADKrp.css" />';

// Here comes the JavaScript bits!

to:

Código: [Seleccionar]
if (!empty($modSettings['ADKrp_Act']) && (($_GET['action'] == 'post') || ($_GET['action'] == 'post2'))) echo'
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ADKrp.css" />';

// Here comes the JavaScript bits!

Then I noticed that the rule only appears when creating a new topic, not replying to an existing topic. As I tried to get it to appear when replying, I got stuck at these lines of code:

Código: [Seleccionar]
if ((!empty($modSettings['ADKrp_Act'])) && (!allowedTo('ADKrp_permissions'))) {
echo '
<dl id="post_Adkrp">
<dt>&nbsp;</dt>
<dd>&nbsp;</dd>
</dl>';
ADKrp();
// The post header... important stuff
echo '
<dl id="post_header">';
}
else {
// The post header... important stuff
echo '
<dl id="post_header">';
}

Not really clear on how to modify this line:
Código: [Seleccionar]
if ((!empty($modSettings['ADKrp_Act'])) && (!allowedTo('ADKrp_permissions')))I am now here asking for some guidance on this area.

PortaMx 1.45
SMF 2.0.2
http://ethera.servehttp.com/

Mensajes: 4

Ver Perfil 

En línea

*
Jul 17 2012


The mod is designed to work by creating themes, not to reply.
The modification would have to be in the file "Post.php"




The other is not a bug, if it were a bug would not work at any site.

*¤×•·:.·.:·•×¤* ^HeRaCLeS^ *¤×•·:.·.:·•×¤*
*¤×• Todos los Mp seran ignorados | Solo seran considerados los Mp Solicitados por mi •×¤*
*¤×• All Mp will be ignored | Only considers the Mp requested per my •×¤*

SMFPersonal

Adk Portal 3.0.2
2.0.14
www.smfpersonal.net
#1

Mensajes: 13978

Ver Perfil  SMFPersonal 

En línea

*
Jul 17 2012


I see...probably because I am using a portal; thus, it might cause the first problem to occur.

So the mod is designed to work for new topic and not for reply. Nonetheless, I would like to change it to work for replies as well...how should I change it?

Why should the modification be in file "Post.php"? The mod didn't made any modification to that file. Shouldn't I be modifying "Post.template.php" which is where I am stuck at?

PortaMx 1.45
SMF 2.0.2
http://ethera.servehttp.com/
#2

Mensajes: 4

Ver Perfil 

En línea

*
Jul 18 2012


Test...

In file AdkRulesPosts.php
Search:
Código: [Seleccionar]
if ((empty($array)) || (in_array($board,$array))) {
if ($context['page_title'] == $txt['start_new_topic']) {

Replace with:
Código: [Seleccionar]
if ((empty($array)) || (in_array($board,$array))) {
if (($context['page_title'] == $txt['start_new_topic']) || ($context['page_title'] == $txt['post_reply'])) {


*¤×•·:.·.:·•×¤* ^HeRaCLeS^ *¤×•·:.·.:·•×¤*
*¤×• Todos los Mp seran ignorados | Solo seran considerados los Mp Solicitados por mi •×¤*
*¤×• All Mp will be ignored | Only considers the Mp requested per my •×¤*

SMFPersonal

Adk Portal 3.0.2
2.0.14
www.smfpersonal.net
#3

Mensajes: 13978

Ver Perfil  SMFPersonal 

En línea

*
Jul 18 2012


Oh, wow...I thought that this IF will fail for replies.

Código: [Seleccionar]
if ((!empty($modSettings['ADKrp_Act'])) && (!allowedTo('ADKrp_permissions')))

I never would have thought that it actually passes through the IF statement and it fails inside ADKrp(). Nonetheless, I tested your codes and it seems to work fine. :)

Thank you very much...save me a lot of frustration especially when I was looking in the wrong place.

PortaMx 1.45
SMF 2.0.2
http://ethera.servehttp.com/
#4

Mensajes: 4

Ver Perfil 

« Última Modificación: Julio 18, 2012, 06:34:49 am por Ice_Drake1 »
En línea

*
Jul 18 2012


you're welcome ;)

*¤×•·:.·.:·•×¤* ^HeRaCLeS^ *¤×•·:.·.:·•×¤*
*¤×• Todos los Mp seran ignorados | Solo seran considerados los Mp Solicitados por mi •×¤*
*¤×• All Mp will be ignored | Only considers the Mp requested per my •×¤*

SMFPersonal

Adk Portal 3.0.2
2.0.14
www.smfpersonal.net
#5

Mensajes: 13978

Ver Perfil  SMFPersonal 

En línea




Otros temas de su interes




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,