|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
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
|
|
|
|
Joined: Oct 2000
Posts: 38
Member
|
Member
Joined: Oct 2000
Posts: 38 |
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]](https://ubbdev.com/ubb/smilies/wink.gif) This message has been edited by Wartortle on November 10, 2000 at 07:08 PM
Wartortle I'm supposed to put somthin here?
|
|
|
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
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
Joined: Aug 2000
Posts: 3,590 |
Mind telling us what you are trying to do ![[Linked Image]](https://ubbdev.com/ubb/smilies/biggrin.gif) 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
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?
|
|
|
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
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
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
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]](https://ubbdev.com/ubb/smilies/biggrin.gif) 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
Joined: Oct 2000
Posts: 38 |
Could you show me the sub OpenFile routine? ------------------ Wartortle
I'm supposed to put somthin here? 
Wartortle I'm supposed to put somthin 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: 1,157
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|