|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
Im trying to write an If statement here. if ($user_profile[104] eq 'yes') blah blah
however if i write a print $user_profile[104];
its not printing anything, and I know its because Im probably not writing a require statement in the code somewhere.
Which file do I have to require in order to grab the user_profile information. Ive tried so many, like ubb_lib_posting, ubb_profile, etc.
The [104] is only in cp_users.cgi that I created, and it writes to the members file.
I tried including cp_users.cgi but its not grabing the data from that array.
Any ideas?
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Originally posted by havoq:
Which file do I have to require in order to grab the user_profile information. Ive tried so many, like ubb_lib_posting, ubb_profile, etc.
sub OpenProfile { is in ubb_lib_files 
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
weird, must be doing something else wrong if it aint workin
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
Now rather Im trying to do the same statement in public_common. However its not grabbing the users profile.
Can anyone lend a hand as to what code to put in public_common, so I could grab a user_profile[104] ?
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
Becuase requiring ubb_lib_files doesnt work.
|
|
|
|
Joined: May 2001
Posts: 1,042 Likes: 7
Moderator
|
Moderator
Joined: May 2001
Posts: 1,042 Likes: 7 |
Before you start to grab the info, make absolutely sure it is printing to the file. Meaning physically open the file up through ftp and see that there is content on line 104 or not.
You'll also need to make changes to the maximum profile line limit variable as it's default is below 50, depending on the version that you have. If you have below 6.6(I believe), you'll want to look for the $mamxmemfield(in ubb_lib_files.cgi) and set it to above 104. In 6.7 it's in ubb_lib.cgi, search for $vars_config{'MaxMemFields'}, changing the value respectively.
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
oh I know, thats all been done already 
|
|
|
|
Joined: Oct 2000
Posts: 2,223
Veteran
|
Veteran
Joined: Oct 2000
Posts: 2,223 |
lets go back to basics, shall we? Open the file directly and see what is in there open (PROFILE, "/usr/local/myname/Members/00000001.cgi") || die "can't open file $!"; @readthis = ; close PROFILE; print "profile field 104 is $readthis[104]";
You'll have to clean that up a lil, it's been a while since I coded in perl, but you get the idea.
Picture perfect penmanship here.
|
|
|
|
Joined: Oct 2000
Posts: 2,223
Veteran
|
Veteran
Joined: Oct 2000
Posts: 2,223 |
You could even stick a while loop in there and dump the whole file out. My point is, let's just make sure it works ourside the ubb first, then make the ubb do it.
Picture perfect penmanship here.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|