Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by RitterWilliam RitterWilliam is offline
Developer Last Online: Apr 2002 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-23-2001 Last Update: Never Installs: 0
 
No support by the author.

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 .

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-24-2001, 03:13 AM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Without knowing exactly what you did it would be almost impossible to know what's wrong.
Reply With Quote
  #3  
Old 10-24-2001, 05:34 AM
RitterWilliam RitterWilliam is offline
 
Join Date: Oct 2001
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 10-24-2001, 06:21 AM
RitterWilliam RitterWilliam is offline
 
Join Date: Oct 2001
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 10-24-2001, 04:30 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you please enter your vB license info into your user profile? See my sig for details. Thanks!
Reply With Quote
  #6  
Old 10-24-2001, 05:21 PM
RitterWilliam RitterWilliam is offline
 
Join Date: Oct 2001
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, no problem.

I am a user of a multiple license of http://www.gamigo.de

my page: www.aoe2.de
Reply With Quote
  #7  
Old 10-24-2001, 05:30 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 10-24-2001, 05:32 PM
RitterWilliam RitterWilliam is offline
 
Join Date: Oct 2001
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, I have already edited my last posting, thanks .


Yeah - version vB2 - maybe I will upgrade it later.
Reply With Quote
  #9  
Old 10-26-2001, 08:31 AM
RitterWilliam RitterWilliam is offline
 
Join Date: Oct 2001
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm... does anyone help me?

William
Reply With Quote
  #10  
Old 10-26-2001, 03:04 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To get support on this you'll need to add your license info to your user profile.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:30 PM.


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.08063 seconds
  • Memory Usage 2,311KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete