[MOD] Mod reputatie phpbb3 (Install+download)

Locked
User avatar
GoKuSaN
Membru
Membru
Posts: 137
Joined: 6 years ago
Has thanked: 0
Been thanked: 0
Status: Offline

6 years ago

Titlu: User reputation points
Description:Acest mod va adauga sistemul de reputatie la forumul dvs. (platforma phpbb3)
Version:0.3.1

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

?
1
2
3
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

?
1
2
3
// idiotnesia wuz here - user rep point
require($phpbb_root_path . 'includes/functions_reputation.' . $phpEx);
// end
Deschide memberlist.php
Cauta

?
1
2
3
4
if (!empty($profile_fields<'row'>))
{
$template->assign_vars($profile_fields<'row'>);
}
Adauga inainte

?
1
2
3
4
5
6
7
8
9
// 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:

?
1
2
// Setup look and feel
$user->setup('viewtopic', $topic_data<'forum_style'>);
Adauga dupa

?
1
2
3
// idiotnesia wuz here - user rep point
$user->add_lang('mods/reputation_mod');
// end
Cauta

?
1
2
3
4
5
6
7
// Does this topic contain a poll?

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

?
1
// Generate online information for user
Adauga inainte

?
1
2
3
// idiotnesia wuz here - user rep point
$reputation_cache = $reputation->get_user_reputation($id_cache);
// end
Cauta

?
1
2
3
4
if (isset($cp_row<'row'>) && sizeof($cp_row<'row'>))
{
$postrow = array_merge($postrow, $cp_row<'row'>);
}
Adauga dupa

?
1
2
3
// 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

?
1
2
3
4
<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

?
1
2
3
4
<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

?
1
2
3
4
5
6
$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

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

?
1
2
3
4
function user_delete($mode, $user_id, $post_username = false)
{
global $cache, $config, $db, $user, $auth;
global $phpbb_root_path, $phpEx;
Adauga dupa

?
1
2
3
// idiotnesia wuz here - user rep point
global $reputation;
// end
Cauta

?
1
2
3
4
if ($user_row<'user_avatar'> && $user_row<'user_avatar_type'> == AVATAR_UPLOAD)
{
avatar_delete('user', $user_row);
}
Adauga dupa

?
1
2
3
//idiotnesia wuz here
$reputation->delete_user($user_id);
// end
Cauta

?
1
2
3
foreach ($attribute_ary as $attribute => $type)
{
if (isset($group_attributes<$attribute>))
Adauga dupa

?
1
2
3
4
// 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

?
1
$user->add_lang('acp/groups');
Adauga dupa

?
1
2
3
// idiotnesia wuz here - user rep point
$user->add_lang('mods/reputation_mod');
// end
Cauta

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

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

?
1
2
$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

?
1
2
3
// idiotnesia wuz here - user rep point
$test_variables<> = 'reputation_power';
// end
Cauta

?
1
2
3
'L_AVATAR_EXPLAIN' => sprintf($user->lang<'AVATAR_EXPLAIN'>, $config<'avatar_max_width'>, $config<'avatar_max_height'>, round($config<'avatar_filesize'> / 1024)),
)
);
Adauga dupa

?
1
2
3
4
5
6
// 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

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

?
1
2
3
4
// 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

?
1
2
case 'personal':
add_form_key('ucp_prefs_personal');
Adauga dupa

?
1
2
3
// idiotnesia wuz here - user rep point
$user->add_lang('mods/reputation_mod');
// end
Cauta

?
1
2
3
4
5
if ($data<'notifymethod'> == NOTIFY_IM && (!$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

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

?
1
2
3
4
'user_lang' => $data<'lang'>,
'user_timezone' => $data<'tz'>,
'user_style' => $data<'style'>,
);
Adauga dupa

?
1
2
3
// idiotnesia wuz here - user rep point
$sql_ary<'user_hide_reputation'> = $data<'hidereputation'>;
// end
Cauta

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

?
1
2
3
4
5
6
7
// idiotnesia wuz here - user rep point
$template->assign_vars(array(
'S_HIDE_REPUTATION' => $data<'hidereputation'>,
'S_CAN_HIDE_REPUTATION' => ($config<'rp_enable'> && $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

?
1
<!-- IF S_SHOW_ACTIVITY -->
Adauga inainte

?
1
2
3
4
5
6
7
8
9
10
<!-- 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

?
1
2
3
<tr>
<th colspan="3">{L_YOUR_DETAILS}</th>
</tr>
Adauga inainte

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!-- 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

?
1
<!-- IF S_SELECT_NOTIFY -->
Adauga inainte

?
1
2
3
4
5
6
<!-- 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>&nbsp;&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

?
1
2
3
<!-- BEGIN custom_fields -->
<br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
<!-- END custom_fields -->
Adauga dupa

?
1
2
3
4
5
<!-- 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: [downlink][Please login or register to view this link][/downlink]
Locked

Return to “Mod-uri”