News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Pomoc

Started by _MaX_PaYnE_, June 06, 2010, 06:00:10 AM

Previous topic - Next topic

Masterd

./Themes/default/languages/Modifications.english.php

Nađi:

?>

Prije toga izbriši:

//Activitybar by Nas
$txt['activitybar_standardlabel'] = 'Activity';
$txt['activitybar_enable'] = 'Enable activity bar <div class="smalltext">Enable the activity bar, a bar that shows how active a user has been.</div>';
$txt['activitybar_label'] = 'Bar label <div class="smalltext">A label displayed along with the bar. Default is "'.$txt['activitybar_standardlabel'].'".</div>';
$txt['activitybar_timeframe'] = 'Activity Timeframe <div class="smalltext">The modification will count all posts made during this timeframe. <br />In days. Default to 30.</div>';
$txt['activitybar_show_in_posts'] = 'Display the activity bar in posts';
$txt['activitybar_show_in_profile'] = 'Display the activity bar in profiles';
$txt['activitybar_max_posts'] = 'Max posts <div class="smalltext">Number of posts required in order to fill the bar. <br />Leave empty for defaults (500 posts).</div>';
$txt['activitybar_max_width'] = 'Max width <div class="smalltext">The width of the bar. When the post limit set above is reached, the bar will have this width. <br />In pixels. Leave empty for defaults (139px).</div>';


./Themes/default/languages/Modifications.croatian(-utf8).php 

Nađi:

?>

Prije toga će se nalaziti tvoj prijevod. Izbriši ga.

./Sources/Display.php

Izbriši ovo:


         'activitybar' => activitybar($message['ID_MEMBER']),

./Sources/ModSettings.php

Izbriši:


      // Activitybar by Nas
         array('check', 'activitybar_enable'),
         array('check', 'activitybar_show_in_posts'),
         array('check', 'activitybar_show_in_profile'),
         array('text', 'activitybar_label'),
         array('int', 'activitybar_timeframe'),
         array('int', 'activitybar_max_posts'),
         array('int', 'activitybar_max_width'),
      '',



./Sources/Profile.php

Izbriši:

$context['activitybar'] = activitybar($memID);

./Sources/Subs.php

Izbriši:

// For the activity bar.
function activitybar($user)
{
   global $modSettings, $db_prefix;

   // Make sure everything is set. If something is missing, use a default value.
   $max_width = !empty($modSettings['activitybar_max_width']) ? $modSettings['activitybar_max_width'] : 139;
   $max_posts = !empty($modSettings['activitybar_max_posts']) ? $modSettings['activitybar_max_posts'] : 500;
   $days = !empty($modSettings['activitybar_timeframe']) ? $modSettings['activitybar_timeframe'] : 30;

   // Calculate the startingdate
   $startingdate = time() - ($days * 86400);

   // Get all posts posted since the startingdate.
   $request = db_query("
   SELECT posterTime, id_member
   FROM {$db_prefix}messages
   WHERE posterTime > '$startingdate' AND id_member = '$user'", __FILE__, __LINE__);
   
   
   // Count the posts.
   $posts = mysql_num_rows($request);
   
   // Tidy up.
   mysql_free_result($request);

      // Calculate everything.
      $num_posts = $posts / $max_posts;
      $num_posts = $num_posts > 1 ? 1 : $num_posts;
      $percentage = $num_posts * 100;
      $bar_width = $max_width * $num_posts;

      // Store the result in a array.
      $context['bar'] = array(
         'width' => $bar_width,
         'percentage' => round($percentage,2),   
      );

      // There you go. Anything else?
      return $context['bar'];

}


./Themes/default/Display.template.php

Izbriši:

// Show a activitybar.
         if(!empty($modSettings['activitybar_enable']) && !empty($modSettings['activitybar_show_in_posts']))
            echo '
                  <br /><br />', !empty($modSettings['activitybar_label']) ? $modSettings['activitybar_label'] : $txt['activitybar_standardlabel'], '
                  <div class="activity_holder" style="width: ', !empty($modSettings['activitybar_max_width']) ? $modSettings['activitybar_max_width'] : 139, 'px;"><div class="activity_bar" style="width: ', $message['activitybar']['width'], 'px;"><div class="activity_percentage smalltext">', $message['activitybar']['percentage'], '%</div></div></div>';


./Themes/default/Profile.template.php

Izbriši:

   // Show a activitybar.
   if(!empty($modSettings['activitybar_enable']) && !empty($modSettings['activitybar_show_in_profile']))
      echo '
            <td><b>', !empty($modSettings['activitybar_label']) ? $modSettings['activitybar_label'] : $txt['activitybar_standardlabel'], ':</b></td>
            <td><div class="activity_holder" style="width: ', !empty($modSettings['activitybar_max_width']) ? $modSettings['activitybar_max_width'] : 139, 'px;"><div class="activity_bar" style="width: ', $context['activitybar']['width'], 'px;"><div class="activity_percentage smalltext">', $context['activitybar']['percentage'], '%</div></div></div></td>
            </tr><tr>';
   

./Themes/default (ili tvoja tema)/style.css

Izbriši:


       
.activity_holder
{
   height: 15px;
   border: 1px solid #9BAEBF;
}

.activity_bar
{
   height: 15px;
   background: #E9F0F6 url(images/titlebg.jpg) repeat-x;
}

.activity_percentage
{
   height: 15px;
   color: #333333;
   text-align: center;
}


To bi trebalo pomoći.

 


                 



_MaX_PaYnE_

Itekako mi je pomoglo.... Hvala ti punooo  ;)

Masterd

Molim. Budući da si rješio problem označit ću temu rješenom.

Advertisement: