Previous Thread
Next Thread
Print Thread
Rate Thread
#184098 01/30/2005 11:48 AM
Joined: Sep 2001
Posts: 672
Member
Member
Offline
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 3:00 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
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 02/01/2005 12:56 AM
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
weird, must be doing something else wrong if it aint workin

#184101 02/09/2005 10:03 PM
Joined: Sep 2001
Posts: 672
Member
Member
Offline
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 9:47 AM
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
Becuase requiring ubb_lib_files doesnt work.

Sponsored Links
#184103 02/12/2005 10:24 PM
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
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 11:56 AM
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
oh I know, thats all been done already wink

#184105 02/14/2005 11:01 PM
Joined: Oct 2000
Posts: 2,223
Veteran
Veteran
Offline
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 11:04 PM
Joined: Oct 2000
Posts: 2,223
Veteran
Veteran
Offline
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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)