RitterWilliam
10-23-2001, 07:42 PM
Hello
Well, I have a problem with the 'last Post by User XY' display on the mainpage (the page where you can see all the boards being enabled) of the vB.
I have scripted a new form, with some dropdowns and so on... for posting a new post. Everything works, the post turns up in the forum, the username is added, the url is correct, the user receives a new point and everything looks nice. But one thing does not work :|. The display of 'last Post by User XY' - the URL is showed correctly but the usernam is wrong. I do not know why but the script or the forum does not use and show respectively the username of the user having posted the last posting with my new form.
Do you have any idea why that problem exists and what I could do to eliminate it?
Thank's a lot
RitterWilliam
PS: Sorry for my bad English, I hope that you will understand my posting ;).
Steve Machol
10-24-2001, 03:13 AM
Without knowing exactly what you did it would be almost impossible to know what's wrong.
RitterWilliam
10-24-2001, 05:34 AM
Well, right. Here is the mainpart of the sourcecode.
------------------------------------------------------------------------------
<?php
if ($send)
{
//************************************************** ****************************
//*************************P A S S W O R T A B F R A G E**********************
//************************************************** ****************************
$db = mysql_connect("", "", "";
$res = mysql_db_query("forum79", "select password from user where username like '$username_eing'");
$num = mysql_num_rows($res);
if ($num == 1)
{
$password_forum = mysql_result($res, "password");
if ($password_forum == $password_eing)
echo "<p>";
else
{
echo "$username_eing, du hast ein falsches Passwort angegeben, bitte benutzte den Zurückbutton deines Browsers, um es zu korrigieren.<p>";
echo "Wenn du dein Passwort vergessen haben solltest, klicke <a href=http://aoe2-forum.gamigo.de/member.php?action=lostpw>hier</a>.";
exit;
}
}
else
echo "<p>$username_eing, du bist in diesem Forum nicht registriert. Um dich für das <a href=http://aoe2-forum.gamigo.de>AoE2.de Forum</a> zu registrieren klicke <a href=http://aoe2-forum.gamigo.de/member.php?action=signup>hier</a>.";
mysql_close($db);
//************************************************** ****************************
//*Insert Daten in Schlachtfeld Tab (non-board-db)**
//************************************************** ****************************
$db = mysql_connect("", "", "");
$termin = mktime($stunde,$minute,0,$monat,$tag,2001);
$datum = date("d.m.Y",$termin);
$uhrzeit = date("H:i",$termin);
$sqlab = "insert schlachtfeld";
$sqlab .= "(termin, spielort1, spielort2, spieler1, spieler2, spieltyp, karte, groesse, schwierigkeitsgrad, rohstoffe, bevlimit, geschwindigkeit, kartensicht, startzeitalter, sieg, farbe, kommentar, beschreibung) values ";
$sqlab .= "('$termin', '$spielort1', '$spielort2', '$spieler1', '$spieler2', '$spieltyp', '$karte', '$groesse', '$schwierigkeitsgrad', '$rohstoffe', '$bevlimit', '$geschwindigkeit', '$kartensicht', '$startzeitalter', '$sieg', '$farbe', '$kommentar', '$beschreibung')";
mysql_db_query("aoe2de", $sqlab);
$num = mysql_affected_rows();
mysql_close($db);
if ($num>0)
{
//************************************************** ****************************
//****D E K L A R I E R E N D E R E I N Z E L N E N V A R I A B L E N*****
//************************************************** ****************************
$post_datum = time();
$title = $datum." | ".$uhrzeit." Uhr | ".$spieler1." on ".$spieler2." | ".$kommentar;
$subject = "Online Schlachtfeld - Spiel:";
$forumid = 18;
$open = 1;
$visible = 1;
$iconid = 2;
$beschreibung=nl2br($beschreibung);
$userindex=$username_eing;
$userindex=strtolower($userindex);
$inhalt = "<table id=tabelle>";
$inhalt .= "<tr><td><b>Termin:</td><td>".$datum." | ".$uhrzeit." Uhr</td></tr>";
$inhalt .= "<tr><td><b>Spielort:</td><td>".$spielort1."</td></tr>";
$inhalt .= "<tr><td><b>Room / IP:</td><td>".$spielort2."</td></tr>";
$inhalt .= "<tr><td><b>Spieler:</td><td>".$spieler1." on ".$spieler2."</td></tr>";
$inhalt .= "<tr><td><b>Spieltyp:</td><td>".$spieltyp."</td></tr>";
$inhalt .= "<tr><td><b>Karte:</td><td>".$karte."</td></tr>";
$inhalt .= "<tr><td><b>Größe:</td><td>".$groesse."</td></tr>";
$inhalt .= "<tr><td><b>Schwierigkeitsgrad:</td><td>".$schwierigkeitsgrad."</td></tr>";
$inhalt .= "<tr><td><b>Rohstoffe:</td><td>".$rohstoffe."</td></tr>";
$inhalt .= "<tr><td><b>Bevölkerungslimit:</td><td>".$bevlimit."</td></tr>";
$inhalt .= "<tr><td><b>Geschwindigkeit:</td><td>".$geschwindigkeit."</td></tr>";
$inhalt .= "<tr><td><b>Startzeitalter:</td><td>".$startzeitalter."</td></tr>";
$inhalt .= "<tr><td><b>Kartensicht:</td><td>".$kartensicht."</td></tr>";
$inhalt .= "<tr><td><b>Sieg:</td><td colspan=3>".$sieg."</td></tr>";
$inhalt .= "<tr><td><b>Ich bestehe auf folgende Farbe ;):</td><td>".$farbe."</td></tr>";
$inhalt .= "<tr><td valign=top><b>Beschreibung:</td><td>".$beschreibung."</td></tr>";
$inhalt .= "</table>";
//************************************************** ****************************
//******************************Insert Daten in Forum Table [Threads]*************
//************************************************** ****************************
// [threadid] title=$title lastpost=$post_datum forumid=$forumid open=$open
// [replycount] postusername=$username_eing lastposter=$username_
//eing dateline=$post_datum [views] iconid=2 [notes] visible=$visible
// subjectindex=$subject threadindex=$inhalt userindex='$userindex'
//************************************************** ****************************
//************************************************** ****************************
$db = mysql_connect("", "", "");
$sqlab = "insert thread";
$sqlab .= "(title, lastpost, forumid, open, postusername, lastposter, dateline, iconid, visible, subjectindex, threadindex, userindex) values ";
$sqlab .= "('$title', '$post_datum', '$forumid', '$open', '$username_eing', '$username_eing', '$post_datum', '$iconid', '$visible', '$subject', '$inhalt', '$userindex')";
mysql_db_query("forum79", $sqlab);
$num = mysql_affected_rows();
if ($num>0)
{
//************************************************** ****************************
//******************Insert Daten in Forum Table [Posts]***************************
//************************************************** ****************************
// [postid] threadid=$threadid username=$username_eing userid=$selectArray[0]
// title=$title dateline=$post_datum pagetext=$inhalt allowsmilie=1 email=1
// signature=1 ipaddress=$ipaddress iconid=$iconid visible=$visible
//************************************************** ****************************
//************************************************** ****************************
$select=mysql_db_query("forum79", "select * from user where username like '$username_eing'");
$selectArray=mysql_fetch_array($select);
$thread_id=mysql_db_query("forum79", "select threadid from thread where dateline like '$post_datum'");
$threadid=mysql_result($thread_id, "threadid");
$ipaddress=getenv("REMOTE_ADDR");
$sqlab = "insert post";
$sqlab .= "(threadid, userid, title, dateline, pagetext, allowsmilie, email, signature, ipaddress, iconid, visible) values ";
$sqlab .= "('$threadid', '$selectArray[0]', '$title', '$post_datum', '$inhalt', 1, 1, 1, '$ipaddress', '$iconid', '$visible')";
mysql_db_query("forum79", $sqlab);
$num = mysql_affected_rows();
if ($num>0)
{
$res = mysql_db_query("forum79", "select posts from user where username like '$username_eing'");
$posts_org = mysql_result($res, "posts");
$posts_neu= $posts_org + 1;
$user="update user set";
$user.=" posts='$posts_neu' where username like '$username_eing'";
mysql_db_query("forum79", $user);
$num_user=mysql_affected_rows();
if($num_user>0)
{
echo "Game is posted";
exit;
}
else
{
echo "ERROR!<p>";
exit;
}
}
else
{
echo "Es ist ein Fehler beim Eintragen des Spieles unterlaufen, bitte alle eingegebenen Daten überprüfen!<p>";
exit;
}
}
else
{
echo "Es ist ein Fehler beim Eintragen des Spieles unterlaufen, bitte alle eingegebenen Daten überprüfen!<p>";
exit;
}
mysql_close($db);
}
else
{
echo "Es ist ein Fehler beim Eintragen des Spieles unterlaufen, bitte alle eingegebenen Daten überprüfen!<p>";
}
mysql_close($db);
}
?>
----------------------------------------------------
All the variables being insert in the "Schlachtfeld Table" are given by an extra form which works.
RitterWIlliam
RitterWilliam
10-24-2001, 06:21 AM
These are the fields and the variables being added in the Table 'Threads':
//******************************Insert Daten in Forum Table [Threads]*************
//************************************************** ****************************
// [threadid] title=$title lastpost=$post_datum forumid=$forumid open=$open
// [replycount] postusername=$username_eing lastposter=$username_
//eing dateline=$post_datum [views] iconid=2 [notes] visible=$visible
// subjectindex=$subject threadindex=$inhalt userindex='$userindex'
//************************************************** ****************************
These are the fields and the variables being added in the Table 'Posts':
//******************Insert Daten in Forum Table [Posts]***************************
//************************************************** ****************************
// [postid] threadid=$threadid username=$username_eing userid=$selectArray[0]
// title=$title dateline=$post_datum pagetext=$inhalt allowsmilie=1 email=1
// signature=1 ipaddress=$ipaddress iconid=$iconid visible=$visible
//************************************************** ****************************
These are the fields and the variables being added/updated in the Table 'User':
posts=$posts_neu
------------------------------------------------------------------------------------
All the fields standing in [] have no special variables.
RitterWilliam
Steve Machol
10-24-2001, 04:30 PM
Could you please enter your vB license info into your user profile? See my sig for details. Thanks!
RitterWilliam
10-24-2001, 05:21 PM
Yes, no problem.
I am a user of a multiple license of http://www.gamigo.de
my page: www.aoe2.de
Admin
10-24-2001, 05:30 PM
It's the customer number and password you got when you purchased vBulletin, and what you use to access the Members Area.
And you should really upgrade, I won't list the many reasons.
RitterWilliam
10-24-2001, 05:32 PM
Yes, I have already edited my last posting, thanks ;).
Yeah - version vB2 - maybe I will upgrade it later.
RitterWilliam
10-26-2001, 08:31 AM
Hmm... does anyone help me?
William
Steve Machol
10-26-2001, 03:04 PM
To get support on this you'll need to add your license info to your user profile.
RitterWilliam
10-26-2001, 06:44 PM
multiple license of http://www.gamigo.de
I just have these infos :|.
Ritter William
Stadler
10-29-2001, 07:56 AM
You maybe should have told them, that gamigo.de is your Hoster and that you're not the real owner of vBulletin but an Admin with a legal FTP-Account and the rights to install and use it, because it's an additional feature of gamigo.de to provide you with it!
RitterWilliam
10-31-2001, 07:30 PM
Well, okay - that's what i've meant.
Gamigo.de is a German Gaming-Network having a multiple license for all its hosted sites. And AoE2.de is one of these sites. I am the official webmaster of AoE2.de and have the rights to use the vBulletin - but because of this multiple license I have no possibility to get the license number.
Thanks
RitterWilliam
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.