Logo
FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
Broken Links... Again?

 
Post new topic   Reply to topic    www.fanart-central.net Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Stratadrake
Elder Than Dirt


Joined: 05 May 2004
Posts: 13721
Location: Moo

PostPosted: Fri Oct 29, 2004 10:55 am    Post subject: Reply with quote

Bug Report in Sector One.

I was commenting on a drawing, and because it was relevant, I tried to put in a few links. I should've known better -- the new bb code is a nice feature, but the   code is conflicting with it. Just look what it did -- Not only did it break the URL's, but it broke the URL [b]tags[/b] themselves.

Grrr... not funny. I also have to ask, if this can happen to the URL tags, doesn't that mean it could happen to the other bb tags too?
_________________
Strata here: [url=http://www.nanowrimo.org/eng/user/242293]Nanowrimo[/url] - [url=www.fanart-central.net/user-Stratadrake.php]FAC[/url] - [url=http://stratadrake.deviantart.com]dA[/url] - [url=www.furaffinity.net/user/Stratadrake/]FA[/url]
[size=9]Disclaimer: Posts may contain URLs. Click [url=http://tvtropes.org/pmwiki/pmwiki.php/Main/TVTropesWillRuinYourLife]at your own risk.[/url][/size]
Back to top
View user's profile Send private message
cstdenis
Evil Overlord


Joined: 31 Dec 1969
Posts: 6490
Location: In the tubes.

PostPosted: Fri Oct 29, 2004 3:33 pm    Post subject: Reply with quote

That wrapping thing is being nothing but problems.

I have a planned replacement, but dont have time to impliment it.


If you can write a regular expression that can strip excess punctionation and duplicated letters, you can do so and I'll add it. Eg, recursively replace !! with !

such that !!!! becomes !! becomes !

unless you have a better way.

either way, I wont have time 'till next month to do it, there are other new improvements comming in whats left of this month (or early next).
_________________
You will obey or molten silver will be poured into your ears.
Back to top
View user's profile Send private message Visit poster's website
Stratadrake
Elder Than Dirt


Joined: 05 May 2004
Posts: 13721
Location: Moo

PostPosted: Fri Oct 29, 2004 3:56 pm    Post subject: Reply with quote

I guess there's some consolation that it's not a [i]new[/i] problem....

I was able to generate a test comment earlier today where it broke up a basic [/u] tag, but I guess the reason why it's more likely to happen on a URL tag is that URL= tags are simply longer.

Hmm... oh! On another note, there seems to be a newline problem in picture descriptions. I just updated the description for one of my pictures, and it got lumped all together into one mushy paragraph.

My experience in PHP and C coding is a bit thin (no real need for me to use those skills), but if we had a function to abridge [i]all[/i] double-letters and stuff, that would also abridge words like "cool" and punctuation like ellipses.

I believe have a C compiler on my PC somewhere that I can experiment with....
_________________
Strata here: [url=http://www.nanowrimo.org/eng/user/242293]Nanowrimo[/url] - [url=www.fanart-central.net/user-Stratadrake.php]FAC[/url] - [url=http://stratadrake.deviantart.com]dA[/url] - [url=www.furaffinity.net/user/Stratadrake/]FA[/url]
[size=9]Disclaimer: Posts may contain URLs. Click [url=http://tvtropes.org/pmwiki/pmwiki.php/Main/TVTropesWillRuinYourLife]at your own risk.[/url][/size]
Back to top
View user's profile Send private message
cstdenis
Evil Overlord


Joined: 31 Dec 1969
Posts: 6490
Location: In the tubes.

PostPosted: Fri Oct 29, 2004 4:12 pm    Post subject: Reply with quote

I would limit it to 4+ characters....I dont think there are any legit uses of 4+ same letter/symbol in a row (except maybe space or \n)
_________________
You will obey or molten silver will be poured into your ears.
Back to top
View user's profile Send private message Visit poster's website
Stratadrake
Elder Than Dirt


Joined: 05 May 2004
Posts: 13721
Location: Moo

PostPosted: Fri Oct 29, 2004 5:22 pm    Post subject: Reply with quote

Right... I don't think there are any English words with triple-letters, and besides that'd risk truncating the "www" portions of URL's.

There's definitely no single standard function for truncating any and all repetitions above a certain limit (like how there's a standard "wordwrap()" call), and recursiveness generally requires some loops... that plus some substr_replace, and pseudocode could look like:

[code:1]function truncate($text)
{
// "$text" contains the description/etc. to check

for(int c=0; c<strlen($text) -1; c++)
{

 // Ignore BB code markup if
 // performed before BB code processing.
 //
 // If performed after BB code processing,
 // just specify '<' and '>' instead of '[' and ']'
 // to ignore the processed BB (HTML) markup
 //
 if ($text[c]=='[')
 {  
   c= strpos($text,']',c);
   if (c == 0) break;

   continue;
 }

 // Ignore newlines
 if ($text[c] == '\n') continue;

 // Do a case-INsensitive test for repeated chars.
 // e.g. "OoOoOoOoO" type remarks will also be truncated
 //
 // Probably not the best way to code it though...
 $c1 = chr($text[c]);
 if (strcasecmp($c1, substr($text,c+1,1)==0))
 {
   for(int d=c+1; d<=strlen($text); d++)
   {
     // Locate the end of the repetition (the 1st char after it)
     if (d==strlen($text) || strcasecmp($c1, substr($text,d,1)) != 0)
     {
       // If >3 repeated chars...
       if (d - c > 3)
       {
         // Truncate them down to 3 repeated chars... I think
         $text= substr_replace($text, $text[c], c+3, (d-c-3));
       }  
     }
   }
 }
}

}[/code:1]

Hrmm. It's an idea, but I have no idea whether it'd work properly (I've nothing to test PHP with on my comp - a basic C compiler only goes so far) .
_________________
Strata here: [url=http://www.nanowrimo.org/eng/user/242293]Nanowrimo[/url] - [url=www.fanart-central.net/user-Stratadrake.php]FAC[/url] - [url=http://stratadrake.deviantart.com]dA[/url] - [url=www.furaffinity.net/user/Stratadrake/]FA[/url]
[size=9]Disclaimer: Posts may contain URLs. Click [url=http://tvtropes.org/pmwiki/pmwiki.php/Main/TVTropesWillRuinYourLife]at your own risk.[/url][/size]
Back to top
View user's profile Send private message
OrochiLeona
Member


Joined: 13 Aug 2004
Posts: 98

PostPosted: Sun Nov 14, 2004 11:40 am    Post subject: Reply with quote

aahhh Hi I dont mean to bother but I want to see if this is the same problem that you have Strata !!
could you look at this link pllzz
http://www.fanart-central.net/pictures.php?pid=144057

I dont know if its the same or not ... I dont understand these things :wacko:
Back to top
View user's profile Send private message Visit poster's website
Stratadrake
Elder Than Dirt


Joined: 05 May 2004
Posts: 13721
Location: Moo

PostPosted: Sun Nov 14, 2004 11:58 am    Post subject: Reply with quote

Hmm.... other than the one URL draks put in his comment, I don't see what the problem is....
_________________
Strata here: [url=http://www.nanowrimo.org/eng/user/242293]Nanowrimo[/url] - [url=www.fanart-central.net/user-Stratadrake.php]FAC[/url] - [url=http://stratadrake.deviantart.com]dA[/url] - [url=www.furaffinity.net/user/Stratadrake/]FA[/url]
[size=9]Disclaimer: Posts may contain URLs. Click [url=http://tvtropes.org/pmwiki/pmwiki.php/Main/TVTropesWillRuinYourLife]at your own risk.[/url][/size]
Back to top
View user's profile Send private message
OrochiLeona
Member


Joined: 13 Aug 2004
Posts: 98

PostPosted: Sun Nov 14, 2004 12:13 pm    Post subject: Reply with quote

yes that what I ment the URL it got mixed with his comment :huh:
Back to top
View user's profile Send private message Visit poster's website
Stratadrake
Elder Than Dirt


Joined: 05 May 2004
Posts: 13721
Location: Moo

PostPosted: Sun Nov 14, 2004 12:40 pm    Post subject: Reply with quote

Far as I can tell, the URL was deliberate, not by accident. I see a broken
tag on it though, but I can't ascribe that to a bug either (since they're no longer necessary). Just strip the
_________________
Strata here: [url=http://www.nanowrimo.org/eng/user/242293]Nanowrimo[/url] - [url=www.fanart-central.net/user-Stratadrake.php]FAC[/url] - [url=http://stratadrake.deviantart.com]dA[/url] - [url=www.furaffinity.net/user/Stratadrake/]FA[/url]
[size=9]Disclaimer: Posts may contain URLs. Click [url=http://tvtropes.org/pmwiki/pmwiki.php/Main/TVTropesWillRuinYourLife]at your own risk.[/url][/size]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.fanart-central.net Forum Index -> General Help All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum