SiteLibrary

Link Collectors Community

 



Pages: [1]    Printer Friendly Version
Hot Thread Author:
Topic: Google Thread Article problem

Andy Alkaline
(GravityIsForSucker)
Male
Level 4
Cruiser
****

Member Since: 08/20/05
Forum Posts: 169
United States
General Thread  Google Thread Article problem
 Posted on 10/10/05 at 18:39:22 GMT

On that article I submitted regarding the Google thread, url isn't being displayed properly, unless I hit the more link. Do I have a typo in there, or something else unaccounted for?

Actually the href value here would have been "more correct" I suppose.
Long term SSRI use causing irreversible brain damage and other side effects?


-----------------
Blasphology 1007 - "Money can indeed buy happiness, but it will be heavily taxed."
IP address Logged
Link to This Post  

Jos
(jos)
Female
Administrator
Developer
*******

Member Since: 08/09/03
Forum Posts: 2623
United States
General Thread  Re: Google Thread Article problem
 Posted on 10/11/05 at 02:04:43 GMT

Okay I think I figured out how to make it stop doing that.

Here's what I did in case I lose the code:


code:
if (length($message) > 255) {
   $message =~ s/<img[^&]+>//g;
   if ($enable_ubbc) {
      $message =~ s/\[quote\](.+?)\[\/quote\]/"$1"/isg;
   }
   $message = substr($message, 0, 255);
   $message =~ s/(.*)\s.*/$1/; # trims last partial or whole whole word

### closes most types of UBBC tags: ###
my %tags;
my $count;
   while ($message =~ /\[(code|fixed|sup|strike|sub|left|center|right|list|pre|b|i|u(rl)?)(=[^\]]*)?\]/g) {
      if (defined($tags{$1})) {
         $tags{$1}++;
      } else {
         $tags{$1} = 1; # Initialize
      }
   }
   foreach $tag (keys(%tags)) {
      $count = 0;
      while ($message =~ m/\[\/$tag\]/g) { # Count closing tags
         $count++;
      }
      for ($count; $count < $tags{$tag}; $count++) {
         $message .= "\[/$tag\]"; # add missing end tags
      }
   }
### end closing UBBC tags ###

   $message .= " \.\.\. <a href=\"$pageurl/viewnews/$id\" class=\"webapplink\"><i>$nav{'025'}</i></a>";
}



The other part was already there. The new part is the "closing UBBC tags" part between the comment symbol lines.


-----------------
~
IP address Logged
Visit the homepage of Jos   Link to This Post  

Andy Alkaline
(GravityIsForSucker)
Male
Level 4
Cruiser
****

Member Since: 08/20/05
Forum Posts: 169
United States
General Thread  Re: Google Thread Article problem
 Posted on 10/11/05 at 02:23:13 GMT

In other words, I helped find a bug?




-----------------
Blasphology 1007 - "Money can indeed buy happiness, but it will be heavily taxed."
IP address Logged
Link to This Post  

Jos
(jos)
Female
Administrator
Developer
*******

Member Since: 08/09/03
Forum Posts: 2623
United States
General Thread  Re: Google Thread Article problem
 Posted on 10/11/05 at 02:51:37 GMT

Yes! You did. In fact, your stylish postings are responsible for the entire tag closing system being done when it is. Norbert has suggested it a few times before, but he never left me as good an example of a mess as you do

Now we can post away to our heart's delight using any UBBC tags we like, quite carelessly as to how many characters we have before the closing tag. If we can find any other tags that break it, now would be a good time to stumble on them, while the concept is still fresh in mind.


-----------------
~
IP address Logged
Visit the homepage of Jos   Link to This Post  

Andy Alkaline
(GravityIsForSucker)
Male
Level 4
Cruiser
****

Member Since: 08/20/05
Forum Posts: 169
United States
General Thread  Re: Google Thread Article problem
 Posted on 10/11/05 at 03:27:57 GMT


Jos wrote:
Norbert has suggested it a few times before, but he never left me as good an example of a mess as you do



Your sweet words only put a smile on my face, and made my frown defy gravity. For your next trick, I suppose you'll defeat Chaos and bring back Order.


-----------------
Blasphology 1007 - "Money can indeed buy happiness, but it will be heavily taxed."
IP address Logged
Link to This Post  

Jos
(jos)
Female
Administrator
Developer
*******

Member Since: 08/09/03
Forum Posts: 2623
United States
General Thread  Re: Google Thread Article problem
 Posted on 10/11/05 at 05:47:05 GMT

I think if you switch those two words chaos and order around, you might be onto something.


-----------------
~
IP address Logged
Visit the homepage of Jos   Link to This Post  

Andy Alkaline
(GravityIsForSucker)
Male
Level 4
Cruiser
****

Member Since: 08/20/05
Forum Posts: 169
United States
General Thread  Re: Google Thread Article problem
 Posted on 10/11/05 at 11:57:13 GMT



Jos wrote:
I think if you switch those two words chaos and order around, you might be onto something.



Could be, but I think this world is a little chaotic these days. Thanks for noting the correction.


-----------------
Blasphology 1007 - "Money can indeed buy happiness, but it will be heavily taxed."
IP address Logged
Link to This Post  
  Google Thread Article problem
  Portal Features
   Forums
Pages: [1]
 
Hop to:

Who's On


EST Nov. 2002 ~ Copyright © 2002-2008 ~ SiteLibrary


Member's Banner Ad
Member's Banner Ad - Jos's site
View All Banners



This site was made with WebAPP Web Automated Perl Portal system v0.9.9.9 RC4 , a web portal system written in Perl.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the Poster.

XML v1.0