RGZ Gaming Forum


 
AcasaUltimele imaginiCăutareÎnregistrareConectare

Distribuiţi|

[Tutorial] Mod reputatie(Install+download)

Vezi subiectul anterior Vezi subiectul urmator In jos
AutorMesaj
lol/!?
Moderator Global
lol/!?

Rank: Moderator Global
Status:
Posturi : 116
Reputatie : 5
Data de Inscriere : 21/07/2014
[Tutorial] Mod reputatie(Install+download) Empty
MesajSubiect: [Tutorial] Mod reputatie(Install+download) [Tutorial] Mod reputatie(Install+download) EmptyMier Iul 30, 2014 4:08 pm

Titlu: User reputation points

Description:Acest mod va adauga sistemul de reputatie la forumul dvs!


Version:0.3.1

Installation Level:Easy

Installation Time:~12 minutes

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.

[size=150]Instalare[/size]
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
Cod:
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
Cod:
// idiotnesia wuz here - user rep point
require($phpbb_root_path . 'includes/functions_reputation.' . $phpEx);
// end
Deschide memberlist.php
Cauta
Cod:
      if (!empty($profile_fields['row']))
      {
         $template->assign_vars($profile_fields['row']);
      }
Adauga inainte
Cod:
// 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
Cod:
// Setup look and feel
$user->setup('viewtopic', $topic_data['forum_style']);
Adauga dupa
Cod:
// idiotnesia wuz here - user rep point
$user->add_lang('mods/reputation_mod');
// end
Cauta
Cod:
// Does this topic contain a poll?
Adauga inainte
Cod:
// idiotnesia wuz here - user rep point
$reputation->viewtopic($forum_id);
// end
Cauta
Cod:
// Generate online information for user
Adauga inainte
Cod:
// idiotnesia wuz here - user rep point
$reputation_cache = $reputation->get_user_reputation($id_cache);
// end
Cauta
Cod:
   if (isset($cp_row['row']) && sizeof($cp_row['row']))
   {
      $postrow = array_merge($postrow, $cp_row['row']);
   }
Adauga dupa
Cod:
// 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
Cod:
   <dl>
      <dt><label for="group_legend">{L_GROUP_LEGEND}:</label></dt>
      <dd><input name="group_legend" type="checkbox" class="radio" id="group_legend"{GROUP_LEGEND} /></dd>
   </dl>
Adauga dupa
Cod:
   <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
Cod:
   $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
Cod:
// idiotnesia wuz here - user rep point
   $update_ary[REPUTATIONS_TABLE] = array('username');
// end
Cauta
Cod:
function user_delete($mode, $user_id, $post_username = false)
{
   global $cache, $config, $db, $user, $auth;
   global $phpbb_root_path, $phpEx;
Adauga dupa
Cod:
// idiotnesia wuz here - user rep point
   global $reputation;
// end
Cauta
Cod:
   if ($user_row['user_avatar'] && $user_row['user_avatar_type'] == AVATAR_UPLOAD)
   {
      avatar_delete('user', $user_row);
   }
Adauga dupa
Cod:
//idiotnesia wuz here
   $reputation->delete_user($user_id);
// end
Cauta
Cod:
foreach ($attribute_ary as $attribute => $type)
  {
      if (isset($group_attributes[$attribute]))
Adauga dupa
Cod:
// 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
Cod:
      $user->add_lang('acp/groups');
Adauga dupa
Cod:
// idiotnesia wuz here - user rep point
      $user->add_lang('mods/reputation_mod');
// end
Cauta
Cod:
               if ($user->data['user_type'] == USER_FOUNDER)
               {
                  $submit_ary['founder_manage'] = isset($_REQUEST['group_founder_manage']) ? 1 : 0;
               }
Adauga dupa
Cod:
// idiotnesia wuz here - user rep point
               $submit_ary['reputation_power'] = request_var('group_reputation_power', 0);
// end
Cauta
Cod:
                  $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
Cod:
// idiotnesia wuz here - user rep point
                  $test_variables[] = 'reputation_power';
// end
Cauta
Cod:
               'L_AVATAR_EXPLAIN'   => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)),
               )
            );
Adauga dupa
Cod:
// 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
Cod:
               'U_SEARCH_USER'      => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data['user_id'] . '&sr=posts') : '',
            ));
Adauga dupa
Cod:
// 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
Cod:
         case 'personal':
            add_form_key('ucp_prefs_personal');
Adauga dupa
Cod:
// idiotnesia wuz here - user rep point
            $user->add_lang('mods/reputation_mod');
// end
Cauta
Cod:
            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
Cod:
// idiotnesia wuz here - user rep point
            $data['hidereputation'] = request_var('hidereputation', (bool) $user->data['user_hide_reputation']);
// end
Cauta
Cod:
                     'user_lang'            => $data['lang'],
                     'user_timezone'         => $data['tz'],
                     'user_style'         => $data['style'],
                  );
Adauga dupa
Cod:
// idiotnesia wuz here - user rep point
                  $sql_ary['user_hide_reputation'] = $data['hidereputation'];
// end
Cauta
Cod:
               'S_SELECT_NOTIFY'      => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
            );
Adauga dupa
Cod:
// 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
[size=150]Pentru Subsilver2[/size]
  • Deorece multi folosesc subsilver ca tema de baza ,nu voi mai adauga fisierele care trebuie modificate la prosilver

Deschide memberlist_view.html
Cauta
Cod:
<!-- IF S_SHOW_ACTIVITY -->
Adauga inainte
Cod:
<!-- IF S_REPUTATION -->
         <tr>
            <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_RP_TOTAL_POINTS}: </td>
            <td><b class="gen">{REPUTATION}</b></td>
         </tr>
         <tr>
            <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_RP_POWER}: </td>
            <td><b class="gen">{REP_POWER}</b></td>
         </tr>
         <!-- ENDIF -->
Deschide ucp_main_front.html
Cauta
Cod:
<tr>
   <th colspan="3">{L_YOUR_DETAILS}</th>
</tr>
Adauga inainte
Cod:
<!-- IF .reputation_row -->
<tr>
   <th colspan="3">{L_RP_RECENT_POINTS}</th>
</tr>
<tr>
   <td class="row1" colspan="3">
      <table width="100%" cellspacing="1" cellpadding="4">
      <tr class="row3">
         <td><b class="genmed">{L_RP_POINTS}</b></td>
         <td><b class="genmed">{L_RP_COMMENTS}</b></td>
         <td><b class="genmed">{L_RP_FROM}</b></td>
         <td><b class="genmed">{L_POSTS}</b></td>
      </tr>
      <!-- BEGIN reputation_row -->
      <!-- IF reputation_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
         <td><span class="genmed">{reputation_row.POINT_IMG}</span></td>
         <td><span class="genmed">{reputation_row.COMMENT}</span></td>
         <td><span class="genmed">{reputation_row.FROM}</span></td>
         <td><span class="genmed"><!-- 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
Cod:
<!-- IF S_SELECT_NOTIFY -->
Adauga inainte
Cod:
<!-- IF S_CAN_HIDE_REPUTATION -->   
   <tr>
      <td class="row1" width="50%"><b class="genmed">{L_RP_HIDE}:</b></td>
      <td class="row2"><input type="radio" class="radio" name="hidereputation" value="1"<!-- IF S_HIDE_REPUTATION --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span> &nbsp;<input type="radio" class="radio" name="hidereputation" value="0"<!-- IF not S_HIDE_REPUTATION --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
   </tr>
<!-- ENDIF -->
Deschide viewtopic_body.html
Cauta
Cod:
<!-- BEGIN custom_fields -->
                  <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
               <!-- END custom_fields -->
Adauga dupa
Cod:
<!-- 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

[size=150]Download [/size]
[size=150]Click here for download[/size][/quote]
Sus In jos
Muffy
Membru
Muffy

Rank: Membru
Status:
Posturi : 265
Reputatie : 6
Data de Inscriere : 29/07/2014
[Tutorial] Mod reputatie(Install+download) Empty
MesajSubiect: Re: [Tutorial] Mod reputatie(Install+download) [Tutorial] Mod reputatie(Install+download) EmptyVin Aug 08, 2014 1:30 pm

Topic Inchis.
Sus In jos

[Tutorial] Mod reputatie(Install+download)

Vezi subiectul anterior Vezi subiectul urmator Sus

Subiecte similare

-
t [Tutorial-Rgz]Half-Life Model Viewer + tutorial utilizare!
t Tutorial Photoshop Cs6-Tutorial Incepatori || Basic
t [Tutorial-Rgz] LJ,HJ,CJ,SCJ
t [TUTORIAL] MC 1.4.1
t [RGZ-TUTORIAL]
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
RGZ Gaming Forum  :: »[RGZ] Zona IT & Web :: Resurse, stiinta si tehnologie :: Platforme WEB :: PHPBB3 :: Tutoriale-