Seite 4 von 5

Verfasst: 16.03.2003 16:30
von mr. gamesbay

Code: Alles auswählen

ALTER TABLE phpbb_users ADD user_bewertungpositiv INT(5); 
ALTER TABLE phpbb_users ADD user_bewertungnegativ INT(5); 
Muss ich da noch was ändern, wenn der anfangswert 0 sein soll, sprich der soll angezeigt werden.

Verfasst: 16.03.2003 16:59
von mr. gamesbay
Noch mehr fragen :D

Liege ich richtig mit diesem ?
Das in viewtopic_body.tpl einfügen:

Code: Alles auswählen

<a>Traiding Points:</span><br />{postrow.POSITIV}</span><br />{postrow.NEGATIV}</span><br />
Aber was (und wo) zum Henker soll ich in die viewtopic.php einfügen ? :D

Need immer noch Help.

Verfasst: 16.03.2003 17:28
von Mister_X
user_edit_body sollte man auch nicht bearbeiten, oder ?
doch, sonst kannst du die Werte auch im Adminbereich nicht anpassen

für den Startwert 0 sollte es so aussehen:

Code: Alles auswählen

ALTER TABLE phpbb_users ADD user_bewertungpositiv INT(5) default '0';
ALTER TABLE phpbb_users ADD user_bewertungnegativ INT(5) default '0';
viewtopic_body.tpl sieht richtig aus

viewtopic.php
suche nach

Code: Alles auswählen

'YIM' => $yim,
und füge danach ein:

Code: Alles auswählen

'POSITIV' => $postrow[$i]['user_bewertungpositiv'],
'NEGATIV' => $postrow[$i]['user_bewertungnegativ'],

Verfasst: 16.03.2003 17:30
von mr. gamesbay
Danke, jetzt geht es weiter an die Arbeit :D

Verfasst: 16.03.2003 18:31
von mr. gamesbay
Prob. 1:
Wenn die Zahl in der Tabelle "0" ist wird sie nicht angezeigt.
Siehe hier:
http://www.gamesbay.de/forum/profile.ph ... ofile&u=25

Ist die Zahl höher als null, wird sie angezeigt:
http://www.gamesbay.de/forum/profile.ph ... rofile&u=2

Warum wird die null (0) nicht angezeigt ?

Verfasst: 16.03.2003 19:05
von Mister_X
steht die 0 auch in der Datenbank bei diesem Benutzer ?

Verfasst: 16.03.2003 19:11
von mr. gamesbay
Mister_X hat geschrieben:steht die 0 auch in der Datenbank bei diesem Benutzer ?
Ja, wird auch in der user_edit_body abgefragt und angezeigt.

Hier ist der neue Code in der profile_view_body, vielleicht siehst du den fehler.

Code: Alles auswählen

		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">
          Trading Points</span></td>
		  <td valign="top" align="left" nowrap="nowrap"><b><span class="gen">{POSITIV} {L_POSITIV}<br />{NEGATIV} {L_NEGATIV}</span></b></td>

		  </tr>

Verfasst: 16.03.2003 19:23
von Mister_X
probiere mal folgendes in der viewtopic.php
suche nach

Code: Alles auswählen

'POSITIV' => $postrow[$i]['user_bewertungpositiv'], 
und ersetze dies durch

Code: Alles auswählen

'POSITIV' => ( $postrow[$i]['user_bewertungpositiv'] ) ? $postrow[$i]['user_bewertungpositiv'] : '0', 
Geht es dann ?

Verfasst: 16.03.2003 19:52
von mr. gamesbay
Ne, immer noch nicht :(

Verfasst: 16.03.2003 20:47
von mr. gamesbay
Das habe ich bis jetzt alles gemacht:

Code: Alles auswählen



ALTER TABLE phpbb_users ADD user_positiv INT(5); 
ALTER TABLE phpbb_users ADD user_negativ INT(5); 


##########

usercp_viewprofile.php
----------------------

>>FINDE:
	'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : '&nbsp;',

>>DANACH EINFUEGEN:
	'POSITIV' => ( $profiledata['user_positiv'] ) ? $profiledata['user_positiv'] : '&nbsp;',
	'NEGATIV' => ( $profiledata['user_negativ'] ) ? $profiledata['user_negativ'] : '&nbsp;',

---------------------

>>FINDE:
'L_INTERESTS' => $lang['Interests'],

>>DANACH EINFUEGEN:
'L_POSITIV' => $lang['Positiv'],
'L_NEGATIV' => $lang['Negativ'],


############

admin_users.php 
---------------

>>FINDE:
$interests = (!empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags($HTTP_POST_VARS['interests']) ) : ""; 

>>DANACH EINFUEGEN:
$positiv = ( !empty($HTTP_POST_VARS['positiv']) ) ? trim(strip_tags( $HTTP_POST_VARS['positiv'] ) ) : ''; 
$negativ = ( !empty($HTTP_POST_VARS['negativ']) ) ? trim(strip_tags( $HTTP_POST_VARS['negativ'] ) ) : ''; 

------------------

>>FINDE:
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature); 

>>FINDE IN DIESER ZEILE:
$interests

>>DANACH EINFUEGEN:
, $positiv , $negativ

-----------------

>>FINDE:
$interests = stripslashes($interests);

>>DANACH EINFUEGEN:
$positiv = stripslashes($positiv); 
$negativ = stripslashes($negativ);

------------------

>>FINDE:
$sql = "UPDATE " . USERS_TABLE . " 
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . " 

>>FINDE IN DIESER ZEILE:
$interests) . "'

>>DANACH EINFUEGEN:
, user_positiv = '" . str_replace("\'", "''", $positiv) . "', user_negativ = '" . str_replace("\'", "''", $negativ) . "'

--------------------

>>FINDE:
$interests = stripslashes($interests); 

>>DANACH EINFUEGEN:
$positiv = stripslashes($positiv); 
$negativ = stripslashes($negativ); 

--------------------

>>FINDE:
$interests = $this_userdata['user_interests']; 

>>DANACH EINFUEGEN:
$positiv = $this_userdata['user_positiv']; 
$negativ = $this_userdata['user_negativ']; 

--------------------

>>FINDE:
$s_hidden_fields .= '<input type="hidden" name="interests" value="' . str_replace("\"", """, $interests) . '" />'; 

>>DANACH EINFUEGEN:
$s_hidden_fields .= '<input type="hidden" name="positiv" value="' . str_replace("\"", """, $positiv) . '" />'; 
$s_hidden_fields .= '<input type="hidden" name="negativ" value="' . str_replace("\"", """, $negativ) . '" />'; 

-----------------------

>>FINDE:
'INTERESTS' => $interests, 

>>DANACH EINFUEGEN:
'POSITIV' => $positiv, 
'NEGATIV' => $negativ, 

----------------------

>>FINDE:
'L_INTERESTS' => $lang['Interests'], 

>>DANACH EINFUEGEN:
'L_POSITIV' => $lang['Positiv'],
'L_NEGATIV' => $lang['Negativ'],

##################
lang_admin.php
-------------

>>FINDE:
// 
// That's all Folks! 


>>ADD BEFORE:
$lang['Positiv'] = "Positiv";
$lang['Negativ'] = "Negativ";

###################

lang_main.php
-------------

>>FINDE:
// 
// That's all Folks! 

>>ADD BEFORE:
$lang['Positiv'] = "Positiv";
$lang['Negativ'] = "Negativ";


#####################

profile_view_body.tpl
---------------------

>>FINDE:
		<tr> 
		  <td valign="top" align="right"><span class="gen">{L_INTERESTS}:</span></td>
		  <td> <b><span class="gen">{INTERESTS}</span></b></td>
		</tr>

>>DANACH EINFUEGEN:
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">
          Trading Points:&nbsp;</span></td>
		  		  <td valign="top" align="left"><span class="gen">{L_POSITIV}:</span><span class="gen">{POSITIV}</span> <br /><span class="gen">{L_NEGATIV}:</span><span class="gen">{NEGATIV}</span></b></td>
		</tr>


#################

user_edit_body.tpl
------------------

>>FINDE:
	<tr> 
	  <td class="catSides" colspan="2">&nbsp;</td>
	</tr>
	<tr>
	  <th class="thSides" colspan="2">{L_SPECIAL}</th>
	</tr>

>>DANACH EINFUEGEN:
        <tr> 
          <td class="row1"><span class="gen">{L_POSITIV}</span></td> 
          <td class="row2"> 
                <input type="text" name="positiv" size="35" maxlength="50" value="{positiv}" /> 
        </td> 
         </tr>
        <tr> 
          <td class="row1"><span class="gen">{L_NEGATIV}</span></td> 
          <td class="row2"> 
                <input type="text" name="negativ" size="35" maxlength="50" value="{negativ}" /> 
        </td> 
         </tr>



###########
Probleme:
Probleme mit viewtopic_body.tpl (Wie bekomme ich die werte auf die Seite)
und mit viewtopic.php (was muss ich nun hinzufügen)
und es wird keine "0" in profile_view_body angezeigt