Author |
Topic |
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 30 July 2002 : 08:22:30
|
Ah, OK, I think I see what needs to be done now, looks like you're going to need an extra database query to retrieve the field. Gimme a bit of time and I'll look over it for you. I'll post back later on today. In the meantime, could you post an updated text file of your topic.asp.
c ya in the funny books MeTV - tvthemetunes.net - forums house of design - graphic design consultants "I have not failed. I've just found 10000 ways that won't work." |
|
|
richfed
Average Member
United States
999 Posts |
Posted - 30 July 2002 : 18:35:26
|
Ok ... here ya go:
Updated topic.txt
No rush, MeTV, whenever you can ...
Thank you very much for trying!
Rich |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 31 July 2002 : 18:26:50
|
I did this last night myself.
You'll have to add info to your config.asp as well.
For example, if you are trying to mimmick, say, the AIM field, try this:
Do a file search on your hard drive. Look only in the directory your forum is in. In the search, leave the field for the file name blank, but then in the "containing text" field type in AIM. This will show you all the files which have AIM in file. You'll have to check them all out. Leave no stone unturned if you really want to learn how it ticks. You may be surprised at how much work it is to add a field to a profile.
And, yes, you will have to add info to your database for your new field.
.....
I think you are seeking the whole sha-bang, right? Like you want a user to add info in the field from their profile, you want any other user to be able to view that info in someone else's profile, and you want a link, icon, whatever, to appear in the topic.asp file.
Two MODs which are references for this can be Crash's Award Member MOD and MortiOli's Gender MOD. Crash's adds a field to a user's profile and their topic posts from an admin panel, and MortiOli's takes advantage of the existing Gender field in the standard Snitz forum.
Retrace their steps. Between the two, you should have an idea of what is going on.
Etymon
Are you looking for answers at Snitz? | Searching the forums is easiest! Basic | Advanced (Internet Explorer only)
Edited by - Etymon on 31 July 2002 18:34:20 |
|
|
richfed
Average Member
United States
999 Posts |
Posted - 02 August 2002 : 07:00:17
|
quote: Retrace their steps. Between the two, you should have an idea of what is going on.
I doubt that!!!! Tampering with code, without specific instructions, is out of my league!
I have the field created and operating in the profile section already, by the way. It's just getting it to show in a post that is my problem!
Rich |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 02 August 2002 : 14:09:11
|
Retrace Crash's MOD and see what he does with topic.asp ... that's all I have time to help you with on this issue right now.
Etymon
Are you looking for answers at Snitz? | Searching the forums is easiest! Basic | Advanced (Internet Explorer only) |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 06 August 2002 : 08:34:09
|
Apologies Rich, I really haven't had a whole lot of time to look over this for you recently. Just to confirm before I start working on it:
1) The text file you posted above is the most up to date version of your topic.asp.
2) There is a new table, FORUM_USERFIELDS, in your database with a field called USER_FIELD_ID.
3) THis field is linked to your FORUM_MEMBERS table via a field called USR_VALUE.
I will also need to know the names of any other fields in FORUM_USERFIELDS.
Once I get all this confirmed, I'll edit the topic.txt file you provided and repost it here.
c ya in the funny books MeTV - tvthemetunes.net - forums house of design - graphic design consultants "I have not failed. I've just found 10000 ways that won't work." |
|
|
richfed
Average Member
United States
999 Posts |
Posted - 06 August 2002 : 12:55:47
|
quote:
Apologies Rich, I really haven't had a whole lot of time to look over this for you recently.
No problem at all ... it's your time! I'm just appreciative that you're willing to do this at all!!!
quote: Just to confirm before I start working on it:
1) The text file you posted above is the most up to date version of your topic.asp.
Yep. Just sent over the latest!
quote: 2) There is a new table, FORUM_USERFIELDS, in your database with a field called USER_FIELD_ID.
Yes. the ID values to date are 2 & 3. 2 is the value of concern here.
quote: 3) THis field is linked to your FORUM_MEMBERS table via a field called USR_VALUE.
Yes ... that is the field where the member inputed info is located, and that is what I desire to show up when that member posts.
quote: I will also need to know the names of any other fields in FORUM_USERFIELDS.
OK ... There are 3 fields in that table: MEMBER_ID, USR_FIELD_ID, and USR_VALUE
Thanks!
Rich |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 06 August 2002 : 13:27:22
|
OK, still a touch confused as to the linkage of fields, but I'll go download the Mod, see if that clears things up and hopefully get to work on this tomorrow some time.
c ya in the funny books MeTV - tvthemetunes.net - forums house of design - graphic design consultants "I have not failed. I've just found 10000 ways that won't work." |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 07 August 2002 : 06:06:41
|
OK, haven't been able to test this as I haven't installed the User Fields Mod, but having read through the readme, I came up with the following:
http://www.tvthemetunes.net/forum/zip/topic.txt
I've added 2 chunks of code starting at lines 582 & 765 (alternatively just search for Added by MeTV) based on the alterations specified for pop_profile.asp in the readme. Some HTML tweaking will probably be required to get everything to display as you want it.
c ya in the funny books MeTV - tvthemetunes.net - forums house of design - graphic design consultants "I have not failed. I've just found 10000 ways that won't work." |
|
|
richfed
Average Member
United States
999 Posts |
Posted - 07 August 2002 : 06:19:45
|
Thanks, MeTV ... Will test it over the weekend and let you know how I fare!!!
Rich |
|
|
richfed
Average Member
United States
999 Posts |
Posted - 09 August 2002 : 19:42:19
|
WooHooo! That worked!!!! Almost perfectly! Thank you, MeTV, very much!!!!
No error messages; the desired field appeared; and the desired field appeared exactly where I wanted it to!
Now, for "almost" part ...
First of all, here are the two chunks of code I inserted into topic.asp:
quote: <% '########## Added by MeTV ######## if (intUserFields = 1 ) then set rstemp = My_Conn.Execute("SELECT * FROM " & strMemberTablePrefix & "USERFIELDS ORDER BY USR_FIELD_ID") do until rstemp.EOF response.write "<br>" if rstemp("USR_FIELDTYPE") = "C" then if getUserFieldValue(rstemp("USR_FIELD_ID"),rsReplies("MEMBER_ID")) = "1" then response.write "Yes" Else response.write "No" End If Else response.write getUserFieldValue(rstemp("USR_FIELD_ID"),rsReplies("MEMBER_ID")) End If rstemp.MoveNext loop rstemp.Close set rstemp = nothing end if '####################################### %>
& loweer down [identical]
quote: <% '########## Added by MeTV ######## if (intUserFields = 1 ) then set rstemp = My_Conn.Execute("SELECT * FROM " & strMemberTablePrefix & "USERFIELDS ORDER BY USR_FIELD_ID") do until rstemp.EOF response.write "<br>" if rstemp("USR_FIELDTYPE") = "C" then if getUserFieldValue(rstemp("USR_FIELD_ID"),rsTopic("MEMBER_ID")) = "1" then response.write "Yes" Else response.write "No" End If Else response.write getUserFieldValue(rstemp("USR_FIELD_ID"),rsTopic("MEMBER_ID")) End If rstemp.MoveNext loop rstemp.Close set rstemp = nothing end if '####################################### %>
I had only wanted one of the new user fields to appear [made via the User Fields MOD]. Both do. But, that's not bad. Actually, I like it that way & want to leave it as is. My "concern" is what if I add additional fields down the road that I don't want to appear? How could I prevent that?
More importantly, is the HTML. The only change I think I need is change the size to "1". Where do I insert that, and in what format so as not to adversely affect the ASP coding. I made several attempts, by copying code just above it that is for the "Show Rank" function, but I kept getting line errors ... so, obviously, I don't know how to integrate the html with the asp.
|
Rich [size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1] |
|
|
richfed
Average Member
United States
999 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 12 August 2002 : 07:45:37
|
Huzzah! Glad to see we finally got it working! Just checked it out and it's looking good.
AS I haven't used the User Fields Mod myself, I won't be able to help you with preventing additional fields showing up if you add them, you'll need to ask someone more familiar with the workings of the User Fields Mod. In the meantime, I'll go back over the readme, see if I can point you in the right direction at least.
c ya in the funny books MeTV - tvthemetunes.net - forums house of design - graphic design consultants "I have not failed. I've just found 10000 ways that won't work." |
|
|
Topic |
|