Vergleich reputation.php - 1.4.0 - 1.4.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: reputation.php 3790 2008-04-23 22:50:33Z Tikitiki $

 * $Id: reputation.php 4699 2010-01-18 13:42:50Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

 
define('THIS_SCRIPT', 'reputation.php');


$templatelist = '';
require_once "./global.php";


$templatelist = '';
require_once "./global.php";

Zeile 351Zeile 352
	// Fetch the total number of reputations for this user
$query = $db->simple_select("reputation r", "COUNT(r.rid) AS reputation_count", "r.uid='{$user['uid']}' $conditions");
$reputation_count = $db->fetch_field($query, "reputation_count");

	// Fetch the total number of reputations for this user
$query = $db->simple_select("reputation r", "COUNT(r.rid) AS reputation_count", "r.uid='{$user['uid']}' $conditions");
$reputation_count = $db->fetch_field($query, "reputation_count");

 

// If the user has no reputation, suspect 0...
if(!$user['reptuation'])
{
$user['reputation'] = 0;
}

// Quickly check to see if we're in sync...
$query = $db->simple_select("reputation", "SUM(reputation) AS reputation", "uid = '".$user['uid']."'");
$sync_reputation = $db->fetch_field($query, "reputation");

if($sync_reputation != $user['reputation'])
{
// We're out of sync! Oh noes!
$db->update_query("users", array("reputation" => $sync_reputation), "uid = '".$user['uid']."'");
$user['reputation'] = $sync_reputation;
}


// Set default count variables to 0
$positive_count = $negative_count = $neutral_count = 0;


// Set default count variables to 0
$positive_count = $negative_count = $neutral_count = 0;

Zeile 395Zeile 413
			if($reputation_vote['dateline'] >= $last_month)
{
$negative_month++;

			if($reputation_vote['dateline'] >= $last_month)
{
$negative_month++;

			}

			}

			if($reputation_vote['dateline'] >= $last_6months)
{
$negative_6months++;

			if($reputation_vote['dateline'] >= $last_6months)
{
$negative_6months++;

Zeile 406Zeile 424
		{
$neutral_count++;
if($reputation_vote['dateline'] >= $last_week)

		{
$neutral_count++;
if($reputation_vote['dateline'] >= $last_week)

			{

			{

				$neutral_week++;
}
if($reputation_vote['dateline'] >= $last_month)
{
$neutral_month++;

				$neutral_week++;
}
if($reputation_vote['dateline'] >= $last_month)
{
$neutral_month++;

			}

			}

			if($reputation_vote['dateline'] >= $last_6months)
{
$neutral_6months++;
}

			if($reputation_vote['dateline'] >= $last_6months)
{
$neutral_6months++;
}

		}

		}

	}

// Check if we're browsing a specific page of results

	}

// Check if we're browsing a specific page of results

Zeile 456Zeile 474
	");
while($reputation_vote = $db->fetch_array($query))
{

	");
while($reputation_vote = $db->fetch_array($query))
{

 
		// Get the reputation for the user who posted this comment
if($reputation_vote['adduid'] == 0)
{
$reputation_vote['user_reputation'] = 0;
}

$reputation_vote['user_reputation'] = get_reputation($reputation_vote['user_reputation'], $reputation_vote['adduid']);


		// Format the username of this poster

		// Format the username of this poster

		$reputation_vote['username'] = format_name($reputation_vote['username'], $reputation_vote['user_usergroup'], $reputation_vote['user_displaygroup']);
$reputation_vote['username'] = build_profile_link($reputation_vote['username'], $reputation_vote['uid']);











		if(!$reputation_vote['username'])
{
$reputation_vote['username'] = $lang->na;
$reputation_vote['user_reputation'] = '';
}
else
{
$reputation_vote['username'] = format_name($reputation_vote['username'], $reputation_vote['user_usergroup'], $reputation_vote['user_displaygroup']);
$reputation_vote['username'] = build_profile_link($reputation_vote['username'], $reputation_vote['uid']);
$reputation_vote['user_reputation'] = "({$reputation_vote['user_reputation']})";
}


		$vote_reputation = intval($reputation_vote['reputation']);

// This is a negative reputation
if($vote_reputation < 0)

		$vote_reputation = intval($reputation_vote['reputation']);

// This is a negative reputation
if($vote_reputation < 0)

		{

		{

			$status_class = "trow_reputation_negative";
$vote_type_class = "reputation_negative";
$vote_type = $lang->negative;

			$status_class = "trow_reputation_negative";
$vote_type_class = "reputation_negative";
$vote_type = $lang->negative;

Zeile 475Zeile 510
			$status_class = "trow_reputation_neutral";
$vote_type_class = "reputation_neutral";
$vote_type = $lang->neutral;

			$status_class = "trow_reputation_neutral";
$vote_type_class = "reputation_neutral";
$vote_type = $lang->neutral;

		}

		}

		// Otherwise, this is a positive reputation
else
{

		// Otherwise, this is a positive reputation
else
{

Zeile 483Zeile 518
			$status_class = "trow_reputation_positive";
$vote_type_class = "reputation_positive";
$vote_type = $lang->positive;

			$status_class = "trow_reputation_positive";
$vote_type_class = "reputation_positive";
$vote_type = $lang->positive;

		}

$vote_reputation = "({$vote_reputation})";

// Get the reputation for the user who posted this comment
if($reputation_vote['adduid'] == 0)
{
$reputation_vote['user_reputation'] = 0;
}
$reputation_vote['user_reputation'] = get_reputation($reputation_vote['user_reputation'], $reputation_vote['adduid']);
if($reputation_vote['username'])
{
$reputation_vote['user_reputation'] = " <span class=\"smalltext\">({$reputation_vote['user_reputation']})";
}
else
{
$reputation_vote['user_reputation'] = '';

 
		}


		}


 
		$vote_reputation = "({$vote_reputation})";


// Format the date this reputation was last modified
$last_updated_date = my_date($mybb->settings['dateformat'], $reputation_vote['dateline']);


// Format the date this reputation was last modified
$last_updated_date = my_date($mybb->settings['dateformat'], $reputation_vote['dateline']);

Zeile 520Zeile 539

// Parse smilies in the reputation vote
$reputation_parser = array(


// Parse smilies in the reputation vote
$reputation_parser = array(

			"allow_html" => "no",
"allow_mycode" => "no",
"allow_smilies" => "yes",
"allow_imgcode" => "no"

			"allow_html" => 0,
"allow_mycode" => 0,
"allow_smilies" => 1,
"allow_imgcode" => 0

		);

$reputation_vote['comments'] = $parser->parse_message($reputation_vote['comments'], $reputation_parser);

		);

$reputation_vote['comments'] = $parser->parse_message($reputation_vote['comments'], $reputation_parser);

Zeile 536Zeile 555
		eval("\$reputation_votes = \"".$templates->get("reputation_no_votes")."\";");
}


		eval("\$reputation_votes = \"".$templates->get("reputation_no_votes")."\";");
}


	eval("\$reputation = \"".$templates->get("reputation")."\";");

 
	$plugins->run_hooks("reputation_end");

	$plugins->run_hooks("reputation_end");

 
	eval("\$reputation = \"".$templates->get("reputation")."\";");

	output_page($reputation);
}
?>

	output_page($reputation);
}
?>