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

Sponsored Links
Re: Help With Statement #184099 01/30/2005 3:00 PM
Joined: Mar 2000
Posts: 21,079
AllenAyres Offline
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
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?
Re: Help With Statement #184100 02/01/2005 12:56 AM
Joined: Sep 2001
Posts: 672
havoq Offline OP
Member
OP Offline
Member
Joined: Sep 2001
Posts: 672
weird, must be doing something else wrong if it aint workin

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

Re: Help With Statement #184102 02/12/2005 9:47 AM
Joined: Sep 2001
Posts: 672
havoq Offline OP
Member
OP Offline
Member
Joined: Sep 2001
Posts: 672
Becuase requiring ubb_lib_files doesnt work.

Sponsored Links
Re: Help With Statement #184103 02/12/2005 10:24 PM
Joined: May 2001
Posts: 1,042
Brett Offline
Moderator
Offline
Moderator
Joined: May 2001
Posts: 1,042
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.

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

Re: Help With Statement #184105 02/14/2005 11:01 PM
Joined: Oct 2000
Posts: 2,223
navaho Offline
Veteran
Offline
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.
Re: Help With Statement #184106 02/14/2005 11:04 PM
Joined: Oct 2000
Posts: 2,223
navaho Offline
Veteran
Offline
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 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
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,490
Posts293,665
Members13,828
Most Online5,166
Sep 15th, 2019
Top Posters(All Time)
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,786
Greg Hard 4,625
Top Posters(30 Days)
isaac 4
Today's Statistics
Currently Online 1426
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 21
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191013.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.039s Queries: 14 (0.014s) Memory: 3.2575 MB (Peak: 3.4380 MB) Data Comp: Zlib Server Time: 2019-10-21 14:49:44 UTC
Valid HTML 5 and Valid CSS