Mod reputatie phpbb3 (Install+download)

0
609
Mod reputatie phpbb3 (Install+download)
Ti-a placut acest articol? Acorda-i o nota

Titlu: User reputation points
Description:Acest mod va adauga sistemul de reputatie la forumul dvs. (platforma phpbb3)
Version:0.3.1
Author Notes:en UMIL is required to run the installer. You can download the latest release at http://www.phpbb.com/mods/umil or using the package I included in contrib folder.

Instalare
Urcati tot ce contine folderul root pe host

Fisiere de modificat(este recomandat sa copiati toate fisierele pe care trebuie sa l-e modificati si sa le editati cu Notepad++)

  • Deschide common.php

Cauta

require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);

Adauga dupa

// idiotnesia wuz here - user rep point
require($phpbb_root_path . 'includes/functions_reputation.' . $phpEx);
// end
  • Deschide memberlist.php

Cauta

 if (!empty($profile_fields<'row'>))
{
$template->assign_vars($profile_fields<'row'>);
}

Adauga inainte

// 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
  • Deschide viewtopic.php

Cauta:

// Setup look and feel
$user->setup('viewtopic', $topic_data<'forum_style'>);

Adauga dupa

// idiotnesia wuz here - user rep point
$user->add_lang('mods/reputation_mod');
// end

Cauta

// Does this topic contain a poll?

Adauga inainte
Cod:
// idiotnesia wuz here - user rep point
$reputation->viewtopic($forum_id);
// end

Cauta

// Generate online information for user

Adauga inainte

// idiotnesia wuz here - user rep point
$reputation_cache = $reputation->get_user_reputation($id_cache);
// end

Cauta

   if (isset($cp_row<'row'>) &amp;&amp; sizeof($cp_row<'row'>))
{
$postrow = array_merge($postrow, $cp_row<'row'>);
}

Adauga dupa

// idiotnesia wuz here - user rep point
$postrow = array_merge($postrow, $reputation->reputation_row($poster_id, $row<'post_id'>, $reputation_cache));
// end
  • Deschide adm/style/acp_groups.html

Cauta

<dl>
<dt><label for="group_legend">{L_GROUP_LEGEND}:</label></dt>
<dd><input name="group_legend" type="checkbox" id="group_legend"{GROUP_LEGEND} /></dd>
</dl>

Adauga dupa

<dl>
<dt><label for="group_reputation_power">{L_RP_GROUP_POWER}:</label></dt>
<dd><input name="group_reputation_power" type="text" id="group_reputation_power" maxlength="4" size="4" value="{GROUP_REPUTATION_POWER}" /></dd></dd>
</dl>
  • Deschide includes/functions_user.php

Cauta

$update_ary = array(
FORUMS_TABLE         => array('forum_last_poster_name'),
MODERATOR_CACHE_TABLE   => array('username'),
POSTS_TABLE            => array('post_username'),
TOPICS_TABLE         => array('topic_first_poster_name', 'topic_last_poster_name'),
);

Adauga dupa

// idiotnesia wuz here - user rep point
$update_ary<REPUTATIONS_TABLE> = array('username');
// end

Cauta

function user_delete($mode, $user_id, $post_username = false)
{
global $cache, $config, $db, $user, $auth;
global $phpbb_root_path, $phpEx;

Adauga dupa

// idiotnesia wuz here - user rep point
global $reputation;
// end

Cauta

  if ($user_row<'user_avatar'> &amp;&amp; $user_row<'user_avatar_type'> == AVATAR_UPLOAD)
{
avatar_delete('user', $user_row);
}

Adauga dupa

//idiotnesia wuz here
$reputation->delete_user($user_id);
// end

Cauta

foreach ($attribute_ary as $attribute => $type)
{
if (isset($group_attributes<$attribute>))

Adauga dupa

// idiotnesia wuz here - user rep point
$attribute_ary<'group_reputation_power'> = 'int';
$group_only_ary<> = 'group_reputation_power';
// end
  • Deschideincludes/acp/acp_groups.php

Cauta

   $user->add_lang('acp/groups');

Adauga dupa

// idiotnesia wuz here - user rep point
$user->add_lang('mods/reputation_mod');
// end

Cauta

if ($user->data<'user_type'> == USER_FOUNDER)
{
$submit_ary<'founder_manage'> = isset($_REQUEST<'group_founder_manage'>) ? 1 : 0;
}

Adauga dupa

// idiotnesia wuz here - user rep point
$submit_ary<'reputation_power'> = request_var('group_reputation_power', 0);
// end

Cauta

$group_attributes = array();
$test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit', 'max_recipients', 'founder_manage');

Adauga dupa

// idiotnesia wuz here - user rep point
$test_variables<> = 'reputation_power';
// end

Cauta

'L_AVATAR_EXPLAIN'   => sprintf($user->lang<'AVATAR_EXPLAIN'>, $config<'avatar_max_width'>, $config<'avatar_max_height'>, round($config<'avatar_filesize'> / 1024)),
)
);

Adauga dupa

// 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
  • Deschide includes/ucp/ucp_main.php

Cauta

'U_SEARCH_USER'      => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data<'user_id'> . '&amp;amp;sr=posts') : '',
));

Adauga dupa

// idiotnesia wuz here
global $reputation;
$reputation->display_comment($user->data<'user_id'>, 'ucp', 0, $config<'rp_recent_points'>, false);
// end
  • Deschide includes/ucp/ucp_prefs.php

Cauta

case 'personal':
add_form_key('ucp_prefs_personal');

Adauga dupa

// idiotnesia wuz here - user rep point
$user->add_lang('mods/reputation_mod');
// end

Cauta

if ($data<'notifymethod'> == NOTIFY_IM &amp;&amp; (!$config<'jab_enable'> || !$user->data<'user_jabber'> || !@extension_loaded('xml')))
{
// Jabber isnt enabled, or no jabber field filled in. Update the users table to be sure its correct.
$data<'notifymethod'> = NOTIFY_BOTH;
}

Adauga inainte

// idiotnesia wuz here - user rep point
$data<'hidereputation'> = request_var('hidereputation', (bool) $user->data<'user_hide_reputation'>);
// end

Cauta

'user_lang'            => $data<'lang'>,
'user_timezone'         => $data<'tz'>,
'user_style'         => $data<'style'>,
);

Adauga dupa

// idiotnesia wuz here - user rep point
$sql_ary<'user_hide_reputation'> = $data<'hidereputation'>;
// end

Cauta

'S_SELECT_NOTIFY'      => ($config<'jab_enable'> &amp;&amp; $user->data<'user_jabber'> &amp;&amp; @extension_loaded('xml')) ? true : false)
);

Adauga dupa

// idiotnesia wuz here - user rep point
$template->assign_vars(array(
'S_HIDE_REPUTATION'   => $data<'hidereputation'>,
'S_CAN_HIDE_REPUTATION'   => ($config<'rp_enable'> &amp;&amp; $auth->acl_get('u_rp_disable')) ? true : false,
)
);
// end

Pentru Subsilver2

Deorece multi folosesc subsilver ca tema de baza ,nu voi mai adauga fisierele care trebuie modificate la prosilver

  • Deschide memberlist_view.html

Cauta

<!-- IF S_SHOW_ACTIVITY -->

Adauga inainte

<!-- IF S_REPUTATION -->
<tr>
<td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_RP_TOTAL_POINTS}: </td>
<td><b>{REPUTATION}</b></td>
</tr>
<tr>
<td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_RP_POWER}: </td>
<td><b>{REP_POWER}</b></td>
</tr>
<!-- ENDIF -->
  • Deschide ucp_main_front.html

Cauta

<tr>
<th colspan="3">{L_YOUR_DETAILS}</th>
</tr>

Adauga inainte

<!-- IF .reputation_row -->
<tr>
<th colspan="3">{L_RP_RECENT_POINTS}</th>
</tr>
<tr>
<td colspan="3">
<table width="100%" cellspacing="1" cellpadding="4">
<tr>
<td><b>{L_RP_POINTS}</b></td>
<td><b>{L_RP_COMMENTS}</b></td>
<td><b>{L_RP_FROM}</b></td>
<td><b>{L_POSTS}</b></td>
</tr>
<!-- BEGIN reputation_row -->
<!-- IF reputation_row.S_ROW_COUNT is even --><tr><!-- ELSE --><tr><!-- ENDIF -->
<td><span>{reputation_row.POINT_IMG}</span></td>
<td><span>{reputation_row.COMMENT}</span></td>
<td><span>{reputation_row.FROM}</span></td>
<td><span><!-- IF reputation_row.POST_SUBJECT --><a href="{reputation_row.U_POST}">{reputation_row.POST_SUBJECT}</span></a><!-- ELSE -->{L_RP_NA}<!-- ENDIF --></td>
<!-- END reputation_row -->
</tr>
</table>
</td>
</tr>
<!-- ENDIF -->
  • Deschide ucp_prefs_personal.html

Cauta

<!-- IF S_SELECT_NOTIFY -->

Adauga inainte

<!-- IF S_CAN_HIDE_REPUTATION -->
<tr>
<td width="50%"><b>{L_RP_HIDE}:</b></td>
<td><input type="radio" name="hidereputation" value="1"<!-- IF S_HIDE_REPUTATION --> checked="checked"<!-- ENDIF --> /><span>{L_YES}</span>&amp;nbsp;&amp;nbsp;<input type="radio" name="hidereputation" value="0"<!-- IF not S_HIDE_REPUTATION --> checked="checked"<!-- ENDIF --> /><span>{L_NO}</span></td>
</tr>
<!-- ENDIF -->
  • Deschide viewtopic_body.html

Cauta

<!-- BEGIN custom_fields -->
<br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
<!-- END custom_fields -->

Adauga dupa

<!-- IF S_REPUTATION and postrow.S_USER_REPUTATION -->
<!-- IF S_REP_DISPLAY neq 'block' --><br /><strong>{L_RP_TOTAL_POINTS}:</strong> {postrow.REPUTATION_TEXT}<!-- ENDIF -->
<!-- IF S_REP_DISPLAY neq 'text'  --><br /><!-- IF postrow.U_VIEW_REP --><a href="{postrow.U_VIEW_REP}" onclick="popup(this.href, 780, 550); return false;" ><!-- ENDIF -->{postrow.REPUTATION_BLOCK}<!-- IF postrow.U_VIEW_REP --></a><!-- ENDIF --><!-- ENDIF -->
<!-- IF postrow.S_GIVE_REPUTATION --><br /><a href="{postrow.U_ADD_POS}"><img src="{T_IMAGES_PATH}reputation/add.png" title="{L_RP_ADD_POINTS} {postrow.POST_AUTHOR}" alt="{L_RP_ADD_POINTS} {postrow.POST_AUTHOR}" /></a><!-- IF postrow.S_GIVE_NEGATIVE--><a href="{postrow.U_ADD_NEG}"><img src="{T_IMAGES_PATH}reputation/subtract.png" title="{L_RP_SUBTRACT_POINTS} {postrow.POST_AUTHOR}" alt="{L_RP_SUBTRACT_POINTS} {postrow.POST_AUTHOR}" /></a><!-- ENDIF --><!-- ENDIF -->
<!-- ENDIF -->

Dupa ce termini instalarea ,ruleaza db_install.php

Download: CLICK

 

Recomand instalarea acestui mod cu automod phpbb3.

NICIUN COMENTARIU

LĂSAȚI UN MESAJ