Página 1 de 1

[Ayuda] |Mod| User Reputation Points

Publicado: 02 Mar 2010, 17:30
por AMS
Increíble, ya pase la parte de directorios a copiar todo iba bien hasta que me encuentro con la modificación de archivos Before|After.

Iba por:

Find
Tip: This may be a partial find and not the whole line.

CODE:
// Those are group-only attributes
$group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit', 'group_max_recipients', 'group_founder_manage');
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.

CODE:
// idiotnesia wuz here - user rep point
$attribute_ary['group_reputation_power'] = 'int';
$group_only_ary[] = 'group_reputation_power';
// end

Eso es en el archivo includes/functions_user.php según el INSTALL. ¿Pero Ideay? A la hora de buscar la línea // Those are group-only attributes NO SALE!!, ni con $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit', 'group_max_recipients', 'group_founder_manage');

Ahora tengo una pequeña duda, en la parte a editar ( y en el comienzo, que vergüenza ) en : memberlist.php

Dice así:

Find
Tip: This may be a partial find and not the whole line.

CODE:
if (!empty($profile_fields['row']))
{
$template->assign_vars($profile_fields['row']);
}
Add before
Tip: Add these lines on a new blank line before the preceding line(s) to find.

CODE:
// idiotnesia wuz here - user rep point
$user->add_lang('mods/reputation_mod');
$template->assign_vars(array(
'S_REPUTATION' => $member['user_hide_reputation'] ? false : true,
'REPUTATION' => $member['user_reputation'],
'REP_POWER' => $reputation->get_rep_power($member['user_posts'], $member['user_regdate'], $member['user_reputation'], $member['group_id']),
)
);
// end

Esa parte me comió, yo lo hice así:

$user->add_lang('mods/reputation_mod');
$template->assign_vars(array(
'S_REPUTATION' => $member['user_hide_reputation'] ? false : true,
'REPUTATION' => $member['user_reputation'],
'REP_POWER' => $reputation->get_rep_power($member['user_posts'], $member['user_regdate'], $member['user_reputation'], $member['group_id']),
)
);
if (!empty($profile_fields['row']))
{
$template->assign_vars($profile_fields['row']);
}


Es así? ¿Qué hago? ¿Cómo es? :oops:

Re: [Ayuda] |Mod| User Reputation Points

Publicado: 02 Mar 2010, 19:29
por angelismo
Sigue estas instrucciones para el includes/functions_user.php
busca

Código: Seleccionar todo

// Those are group-only attributes
   $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit', 'group_max_recipients', 'group_founder_manage');
y añade despues

Código: Seleccionar todo

// idiotnesia wuz here - user rep point
   $attribute_ary['group_reputation_power'] = 'int';
   $group_only_ary[] = 'group_reputation_power';
// end
y para que no hagas más preguntas sobre este mod ,te pongo el resto del fix para phpbb 3.0.6
includes/acp/acp_groups.php
buscar

Código: Seleccionar todo

   foreach ($test_variables as $test => $type)
añadir antes

Código: Seleccionar todo

// idiotnesia wuz here - user rep point
                  $test_variables['reputation_power'] = 'int';
// end
buscar

Código: Seleccionar todo

   'L_AVATAR_EXPLAIN'   => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)),
            ));
añadr despues

Código: Seleccionar todo

// idiotnesia wuz here - user rep point
            $template->assign_vars(array(
               'GROUP_REPUTATION_POWER'   => (isset($group_row['group_reputation_power'])) ? $group_row['group_reputation_power'] : 0,
               )
            );
// end
styles/prosilver/template/memberlist_view.html
buscar

Código: Seleccionar todo

              <dt>{L_TOTAL_POSTS}:</dt>
            <dd>{POSTS} <!-- IF S_DISPLAY_SEARCH -->| <strong><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a></strong><!-- ENDIF -->
               <!-- IF POSTS_PCT --><br />({POSTS_PCT} / {POSTS_DAY})<!-- ENDIF -->
               <!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --><br />(<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>)<!-- ELSEIF POSTS_IN_QUEUE --><br />({L_POSTS_IN_QUEUE})<!-- ENDIF -->
            </dd>
añadir despues

Código: Seleccionar todo

 <!-- IF S_REPUTATION -->
         <dt>{L_RP_TOTAL_POINTS}:</dt> <dd>{REPUTATION}</dd>
         <dt>{L_RP_POWER}:</dt> <dd>{REP_POWER}</dd>
         <!-- ENDIF -->
y listo ,con esto el user reputation poinst es compatible con phpbb 3.0.6
Esto lo he sacado de aqui
http://www.phpbb.com/community/viewtopi ... start=1125

Re: [Ayuda] |Mod| User Reputation Points

Publicado: 03 Mar 2010, 03:19
por AMS
Gracias angelismo, es más cómodo verlo a como lo das que desde el install.xml.

Lo llegué a desinstalar las lineas que iba agregando por si algún error y volver a empezar nuevamente.

Pero estoy un poco confundido en el orden.

Supongamos este Ejemplo:

includes/acp/acp_groups.php

Dice Buscar:
foreach ($test_variables as $test => $type)

Añadir antes:
// idiotnesia wuz here - user rep point
$test_variables['reputation_power'] = 'int';
// end

Entonces sería:

$test_variables['reputation_power'] = 'int';
foreach ($test_variables as $test => $type)


Mas o menos así es la cuestión?

Hay me disculpas hermano, por las molestias. :mrgreen:

Re: [Ayuda] |Mod| User Reputation Points

Publicado: 03 Mar 2010, 14:36
por jakk
quedaria asi:

Código: Seleccionar todo

// idiotnesia wuz here - user rep point
$test_variables['reputation_power'] = 'int';
// end
foreach ($test_variables as $test => $type)

Re: [Ayuda] |Mod| User Reputation Points

Publicado: 03 Mar 2010, 16:53
por AMS
Gracias jakk, por saciar mi duda. :)