Previous Thread
Next Thread
Print Thread
Rate Thread
#184098 01/30/2005 10:48 AM
Joined: Sep 2001
Posts: 672
H
havoq Offline OP
Member
OP Offline
Member
H
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?

Sponsored Links
#184099 01/30/2005 2:00 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Quote
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 smile


- Allen wavey
- What Drives You?
#184100 01/31/2005 11:56 PM
Joined: Sep 2001
Posts: 672
H
havoq Offline OP
Member
OP Offline
Member
H
Joined: Sep 2001
Posts: 672
weird, must be doing something else wrong if it aint workin

#184101 02/09/2005 9:03 PM
Joined: Sep 2001
Posts: 672
H
havoq Offline OP
Member
OP Offline
Member
H
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]
?

#184102 02/12/2005 8:47 AM
Joined: Sep 2001
Posts: 672
H
havoq Offline OP
Member
OP Offline
Member
H
Joined: Sep 2001
Posts: 672
Becuase requiring ubb_lib_files doesnt work.

Sponsored Links
#184103 02/12/2005 9:24 PM
Joined: May 2001
Posts: 1,042
Likes: 7
B
Moderator
Offline
Moderator
B
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.

#184104 02/13/2005 10:56 AM
Joined: Sep 2001
Posts: 672
H
havoq Offline OP
Member
OP Offline
Member
H
Joined: Sep 2001
Posts: 672
oh I know, thats all been done already wink

#184105 02/14/2005 10:01 PM
Joined: Oct 2000
Posts: 2,223
N
Veteran
Offline
Veteran
N
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.
#184106 02/14/2005 10:04 PM
Joined: Oct 2000
Posts: 2,223
N
Veteran
Offline
Veteran
N
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.

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
jgeoff
jgeoff
NJ
Posts: 96
Joined: April 2001
Forum Statistics
Forums63
Topics37,552
Posts293,825
Members13,841
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 231
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 27
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,808
Greg Hard 4,625
Top Posters(30 Days)
Morgan 1
Top Likes Received
isaac 66
Gizmo 12
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2021 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Snapshot build 20201211)
Responsive Width:

PHP: 5.4.45 Page Time: 0.051s Queries: 32 (0.017s) Memory: 3.3229 MB (Peak: 3.5432 MB) Data Comp: Zlib Server Time: 2021-02-28 00:12:03 UTC
Valid HTML 5 and Valid CSS