Previous Thread
Next Thread
Print Thread
Rate Thread
#101682 11/10/2000 7:42 PM
Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
Joined: Feb 2000
Posts: 4,625
sub RunUser {
$FormattedUser = shift;
$FormattedUser2 =~ s/ /_/g; #convert spaces

@foundprofile = &OpenFile("$DataPath/$FormattedUser");

if (-e "$DataPath/members.cgi") {
$Count = 0;
foreach $thisone(@foundprofile) {
chomp($foundprofile[$Count]);
$Count++;
}
return(@founduser);
} else {

@profileinfo = split (/|/, $founduser[9]);

return (@datainfo);
}
} # end RunUser


It works, it runs slowly though.

------------------
UBBDEV Moderator
OCCUPATION: Programmer, webmaster.

Hack Developer of the Ultimate Bulletin Board. I am not an employee of Infopop

Due to time limitation, I do not offer support Via. E-mail. Please post on the forums.

Sincerely,
MasterMind

Sponsored Links
Joined: Oct 2000
Posts: 38
Member
Member
Offline
Joined: Oct 2000
Posts: 38
Quote
quote:
You can just replace that with:
chomp(@foundprofile);

could you give me that openfile sub so i can use it with my programs?

------------------
Wartortle

I'm supposed to put somthin here? [Linked Image]


This message has been edited by Wartortle on November 10, 2000 at 07:08 PM


Wartortle

I'm supposed to put somthin here? wink
Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
Joined: Feb 2000
Posts: 4,625
Thanks.
You can modify that one if you wish. All my basic routines are opensource unless otherwise noted.

------------------
UBBDEV Moderator
OCCUPATION: Programmer, webmaster.

Hack Developer of the Ultimate Bulletin Board. I am not an employee of Infopop

Due to time limitation, I do not offer support Via. E-mail. Please post on the forums.

Sincerely,
MasterMind

Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Mind telling us what you are trying to do [Linked Image]

Of course it will run slowly, you are KILLING the server there. Storing the entire contents of the members.cgi file, whcih can be HUGE in an array, then using foreach -- ouch!

------------------
Da Wannabe Cannuck

:: Who is Andy?

Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
My bad, guess your not reading members.cgi into the array, still don't know what you are doing.

------------------
Da Wannabe Cannuck

:: Who is Andy?

Sponsored Links
Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
Joined: Feb 2000
Posts: 4,625
atom -
I know it runs slowly. Thats why i asked for some help in making in run faster.

------------------
UBBDEV Moderator
OCCUPATION: Programmer, webmaster.

Hack Developer of the Ultimate Bulletin Board. I am not an employee of Infopop

Due to time limitation, I do not offer support Via. E-mail. Please post on the forums.

Sincerely,
MasterMind

Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
Joined: Feb 2000
Posts: 4,625
And, atom, i'm NOT putting it into an array.

------------------
UBBDEV Moderator
OCCUPATION: Programmer, webmaster.

Hack Developer of the Ultimate Bulletin Board. I am not an employee of Infopop

Due to time limitation, I do not offer support Via. E-mail. Please post on the forums.

Sincerely,
MasterMind

Joined: May 2000
Posts: 243
Member
Member
Offline
Joined: May 2000
Posts: 243
sub RunUser {
$FormattedUser = shift;
$FormattedUser2 =~ s/ /_/g; #convert spaces

@foundprofile = &OpenFile("$DataPath/$FormattedUser");

if (-e "$DataPath/members.cgi") {
$Count = @foundprofile;
return(@founduser);
} else {
@profileinfo = split (/|/, $founduser[9]);
return (@datainfo);
} # end if
} # end sub RunUser

Yeah, you still haven't answered Atom911 question. We need to know what your tring to do [Linked Image]

Ok, I was just doing some assuming but I played with it. Not sure where some of the variables/arrays come from. But I'll leave those up to you.

------------------
Powered by ZCom Bulletin Boards

Joined: Oct 2000
Posts: 38
Member
Member
Offline
Joined: Oct 2000
Posts: 38
Quote
quote:
Could you show me the sub OpenFile routine?

------------------
Wartortle

I'm supposed to put somthin here? wink


Wartortle

I'm supposed to put somthin here? wink

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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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
Morgan 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)