Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Add author info in posts
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Add author info in posts

 Post Reply Post Reply
Author
claustrier View Drop Down
Groupie
Groupie


Joined: 19 October 2008
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote claustrier Quote  Post ReplyReply Direct Link To This Post Topic: Add author info in posts
    Posted: 11 December 2010 at 2:40pm
Hi
 
I am trying to add some additional infos about the author in the posts (forum_posts.asp)
 
I already have the tblAuthor up and running with the extra fields, and displaying these on memper_profile.asp - works with no problems.
 
But trying to display these 2 extra fields on the forum_posts.asp is another matter - mainly because I do not understand the logic of the asp, I believe ;-)
 
I understand I must first add (around line 147)
 
Dim strHjemmeklub
Dim strHandicap
 
Then I thought I could just add (around line 1106)
 
strHjemmeklub = sarryPosts(20,intCurrentRecord)
strHandicap = sarryPosts(21,intCurrentRecord)
 
and finally display the results (around line 1233)
 
If strHjemmeklub <> "" Then Response.Write(vbCrLf & "   <br />" & strTxtHjemmeklub & ": " & strHjemmeklub)
If strHandicap <> "" Then Response.Write(vbCrLf & "   <br />" & strTxtHandicap & ": " & strHandicap)
 
 
...but this gets me an out of range error. HOW do I add these 2 fields succesfully??? Any help greatly appreciated!!
 
 
 
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2010 at 8:06pm

The problem is a simple one.

You have forgotten to add the new Fields to the SQL statement.

Look for the following line around 574:

Quote strSQL = strSQL & strDbTable & "Thread.Thread_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date, " & strDbTable & "Thread.Show_signature, " & strDbTable & "Thread.IP_addr, " & strDbTable & "Thread.Hide, " & strDbTable & "Author.Author_ID, " & strDbTable & "Author.Username, " & strDbTable & "Author.Homepage, " & strDbTable & "Author.Location, " & strDbTable & "Author.No_of_posts, " & strDbTable & "Author.Join_date, " & strDbTable & "Author.Signature, " & strDbTable & "Author.Active, " & strDbTable & "Author.Avatar, " & strDbTable & "Author.Avatar_title, " & strDbTable & "Group.Name AS GroupName, " & strDbTable & "Group.Stars, " & strDbTable & "Group.Custom_stars, " & strDbTable & "GuestName.Name AS GuestName "


Add to the end of this line (inside the quotation tags) your new fields. Make sure to add " & strDbTable & "Author. to the start of the field name just like the others in the string.

Also add the fields in the order you wish to access them (eg strHjemmeklub should be first added)


S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
alimvelim View Drop Down
Newbie
Newbie


Joined: 05 January 2011
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote alimvelim Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2011 at 8:40am
thanks.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.