Version: , by huge
Developer Last Online: May 2002
Version: Unknown
Rating:
Released: 11-24-2001
Last Update: Never
Installs: 0
No support by the author.
In the forumhome template of VB 2.2.1
I would like the text to read as follows in the browser:
"Welcome to our newest member Mike , from U of Montreal."
geting it's information as follows:
"Welcome to our newest member <$newusername>, from <field9 of userfields table>."
Here is the template code where this should be inserted:
Welcome to our newest member, <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$newuserid"><b>$newusername </b></a>.
Thank you for helping me out, I have been able to make all other modifications that I needed in the postbit but I cannot figure out how to call up the information here in forumhome.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
// get newest member
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];
with this:
Code:
// get newest member
$getnewestusers=$DB_site->query_first("SELECT userid,username,field9 FROM user LEFT JOIN userfield USING (userid) WHERE user.userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];
$newuserlocation=$getnewestusers[field9];
Now use $newuserlocation to show that field in the forumhome template.
Thanks for posting a response so quickly, I really appreciate you helping me, unfortunately it did not work.
Here is the email error message that I get when I modify index.php as you suggested:
--------------
Database error in vBulletin 2.2.1:
Invalid SQL: SELECT userid,username,field9 FROM user LEFT JOIN userfield USING (userid) WHERE user.userid=4
mysql error: Column: 'userid' in field list is ambiguous
This is what my userfield table looks like from phpMyAdmin, although I really do not know if this will help you at all:
Database dentist2_forum - table userfield
Field Type Attributes Null Default Extra
userid int(10) UNSIGNED No 0
field6 char(250) No
field7 char(250) No
field8 char(250) No
field9 char(250) No
Indexes : Keyname Unique Fulltext Field
PRIMARY Yes No userid
Space usage : Type Usage
Data 4,020 Bytes
Index 2,048 Bytes
Total 6,068 Bytes
Row Statistic : Statements Value
Format fixed
Rows 4
Row length ? 1,005
Row size ? 1,517 Bytes
Sorry, my bad.
I forgot to specify the table before the userid field:
Code:
// get newest member
$getnewestusers=$DB_site->query_first("SELECT user.userid,username,field9 FROM user LEFT JOIN userfield USING (userid) WHERE user.userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];
$newuserlocation=$getnewestusers[field9];