Current time: 11-25-2024, 07:51 AM Hello There, Guest! (LoginRegister)


Post Reply 
Line Break in long lines (Seen in folder protection area)
Author Message
MasterTH Offline
Member
***

Posts: 570
Joined: Feb 2009
Reputation: 4
Post: #1
Line Break in long lines (Seen in folder protection area)
Hi,

a customer tells me, that in his usage of the passwort-protected folders the site is getting longer and longer. he has 20 or 30 users in one group. And when he adds a user to the group the line of the group gets longer, everytime.

So, my suggestion is, to add a line break after x signs, and the line is cutted after the last ","...

Code:
if (lenght($string > 30)){

}


to be continued... Wink
01-18-2010 01:05 AM
Find all posts by this user Quote this message in a reply
MasterTH Offline
Member
***

Posts: 570
Joined: Feb 2009
Reputation: 4
Post: #2
RE: Line Break in long lines (Seen in folder protection area)
i coded something, but i dont know why the for-loop isn't entered

Code:
#!/usr/bin/perl

use strict;

my $completestring;
my $splittedstring;
my $splittedstring2='';
my $splittedstring3='';
my @splitteddataset;
my $datasetsize;
my $lengthnextsplit;

$completestring="asdhkjashdkas,asdhkasdhkasd,asdhklashdkasd,asdhkashdkas,asdhkasdhkasd,asdhkashdk​asd,asdhjashdkasd,asdhjashkdas,123";
$splittedstring=$completestring;

while (length($splittedstring)>30) {
    $splittedstring2 = substr($splittedstring, 0, 30);
    #print "$splittedstring2\n";
    @splitteddataset = reverse split(/,/,$splittedstring2,2);
    my $splittedstring3 = "$splittedstring3\s@splitteddataset[1],\s";

    $lengthnextsplit = length($splittedstring3);
    $splittedstring = substr($splittedstring, $lengthnextsplit,30);
    
}


but i think this should work... when the for-loop sets the string3...


I'd like to have some feedback Wink
(This post was last modified: 01-23-2010 07:19 PM by MasterTH.)
01-23-2010 08:36 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #3
RE: Line Break in long lines (Seen in folder protection area)
why perl?

this is a gui problem and should be solved in the gui... -> php...

/J
01-23-2010 07:29 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MasterTH Offline
Member
***

Posts: 570
Joined: Feb 2009
Reputation: 4
Post: #4
RE: Line Break in long lines (Seen in folder protection area)
i had a lot of work to do, but now i found the time to code this in php.

i'll try it in my installation an post the code in here.
04-01-2010 01:59 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: Line Break in long lines (Seen in folder protection area)
Hi

thanx - I'm looking forward to your solution :-)

/J
04-01-2010 05:18 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)