Seite 1 von 1

Profil - cash anzeige ändern!

Verfasst: 21.09.2004 23:49
von Werbung
Hi...

im profil wird ja angezeigt wie viel Points (oder wie auch immer die währung ist) angezeigt. ich will gerne dieses an das restliche profil art anpassen.
des wäre dann so ungefähr:

Code: Alles auswählen

<tr>
<td align="right" valign="top" nowrap="nowrap" class="explaintitle">{L_TOTAL_POSTS}:</td>
<td valign="top">{POSTS}<br />
<span class="genmed">[{POST_PERCENT_STATS} / {POST_DAY_STATS}]<br />
<a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a></span></td>
</tr>code]

hier hab ich mal ein auszug. kann ich denn nicht irgendwie mei cash anzeige "{CASH}" nicht auch an das anpassen. wenn ja wie mach ich das?

Verfasst: 22.09.2004 12:46
von Acid
k/A ob´s funktioniert (ob man die Punkte derart berechnen kann) und ob die Punkte bei den Usern als 'user_points' gespeichert werden.

profile_view_body.tpl

Code: Alles auswählen

#
#-------[ FINDE ]----------------------
#
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_TOTAL_POSTS}:&nbsp;</span></td>
		  <td valign="top"><b><span class="gen">{POSTS}</span></b><br /><span class="genmed">[{POST_PERCENT_STATS} / {POST_DAY_STATS}]</span> <br /><span class="genmed"><a href="{U_SEARCH_USER}" class="genmed">{L_SEARCH_USER_POSTS}</a></span></td>
		</tr>

#
#-------[ DARUNTER EINFÜGEN ]----------------------
#
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_TOTAL_POINTS}:&nbsp;</span></td>
		  <td valign="top"><b><span class="gen">{POINTS}</span></b><br /><span class="genmed">[{POINTS_PERCENT_STATS} / {POINTS_DAY_STATS}]</span></td>
		</tr>
usercp_viewprofile.php

Code: Alles auswählen

#
#-------[ FINDE ]----------------------
#
else
{
	$percentage = 0;
}

#
#-------[ DARUNTER EINFÜGEN ]----------------------
#
$points_per_day = $profiledata['user_points'] / $memberdays;
// Get the users percentage of total points
if ( $profiledata['user_points'] != 0  )
{
	$total_points = get_db_stat('pointscount');
	$points_percentage = ( $total_points ) ? min(100, ($profiledata['user_points'] / $total_points) * 100) : 0;
}
else
{
	$points_percentage = 0;
}

#
#-------[ FINDE ]----------------------
#
	'AVATAR_IMG' => $avatar_img,

#
#-------[ DARUNTER EINFÜGEN ]----------------------
#
	'L_TOTAL_POINTS' => $lang['Total_points'], 
	'POINTS_DAY_STATS' => sprintf($lang['User_points_day_stats'], $points_per_day), 
	'POINTS_PERCENT_STATS' => sprintf($lang['User_points_pct_stats'], $points_percentage), 
	'POINTS' => $profiledata['user_points'],
functions.php

Code: Alles auswählen

#
#-------[ FINDE ]----------------------
#
		case 'topiccount':
			$sql = "SELECT SUM(forum_topics) AS topic_total, SUM(forum_posts) AS post_total
				FROM " . FORUMS_TABLE;
			break;

#
#-------[ DARUNTER EINFÜGEN ]----------------------
#
		case 'pointscount':
			$sql = "SELECT SUM(user_points) AS points_total FROM ". USERS_TABLE;
			break;

#
#-------[ FINDE ]----------------------
#
		case 'topiccount':
			return $row['topic_total'];
			break;

#
#-------[ DARUNTER EINFÜGEN ]----------------------
#
		case 'pointscount':
			return $row['points_total'];
			break;
lang_main.php

Code: Alles auswählen

#
#-------[ FINDE ]----------------------
#
$lang['Total_posts'] = 'Beiträge insgesamt';

#
#-------[ DARÜBER EINFÜGEN ]----------------------
#
$lang['Total_points'] = 'Punkte insgesamt';
$lang['User_points_day_stats'] = '%.2f Punkte pro Tag';
$lang['User_points_pct_stats'] = '%.2f%% aller Beiträge';

wow...

Verfasst: 22.09.2004 12:58
von Werbung
danke, genau so wollt ich es haben... danke für die mühe!

eine bitte hätte ich noch...! der link fehlt:

[ Werbung's Punkte verändern ] wo kann ich den dazufügen, sollte auch wenns geht in englisch angezeigt werden, wenn man die jeweilige sprache benutzt!

MfG Werbung

Verfasst: 22.09.2004 13:09
von Acid
Funktioniert denn die obige Codeänderung.. die Werte sind korrekt? :o

Wohin sollte dieser Link führen?

Jap!

Verfasst: 22.09.2004 20:55
von Werbung
die Änderung von dir funktioniert astrein. danke noch mal.

hab den link selber hinbekommen! hab in der cash_viewtopic einpaar änderung gemacht. und dann hats geklappt.

MfG Werbung