Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo

Blog - show full post


Go to End
Reply


9 Posts   3859 Views

Avatar
planetbrain

Community Member, 12 Posts

3 September 2008 at 9:35am

Played some more and found that

 
       function mytlittletest() {
              return this->ParsedContent()  ;
      }

returned my the full blog entry but
 
       function mytlittletest() {
              return this->ParsedContent()  ;
      }

Always returned 4 for ALL the entries on my summary page (maybe just coincidence but that was the number of characters in my very short test post.

Anyway playing about a bit

and changing the original ParsedContent() function from

        function ParsedContent() {
                $parser = new BBCodeParser($this->Content);
                $content = new Text('Content');
                $content->value =$parser->parse();
                return $content;
        }

to

        function ParsedContent() {
                $parser = new BBCodeParser($this->Content);
                $content = new Text('Content');
                $content->value =  Convert::raw2xml($this->Content);
                return $parser->parse();
        }

seemed to cure the problem and I was able to use

   function ShowFullPost() {
      if ($this->ParsedContent() == $this->ParagraphSummary()) {
         return false;
      } else {
         return true;
      }
   } 

Apart from the fact I have changed the released code, can anyone see any other issues with this solution??

Go to Top