vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   'last Post by User XY' !problem! (https://vborg.vbsupport.ru/showthread.php?t=31109)

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."&nbsp;on&nbsp;".$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.


All times are GMT. The time now is 09:08 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01089 seconds
  • Memory Usage 1,780KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete