Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Preview Ext? vs HTML

edited July 2006 in Vanilla 1.0 Help
Preview Ext for V1 works fine up to the point where Html / BBcode is used in a post. When the preview button is pressed simply the code gets previewed rather than the final layout. Is there a solution to this?

I am using the BBcode/html editor on my forum, perhaps there is an extension clash? The preview seems to show html here on this forum, am I using an old version?

I have done a wee search around for this problem and the nearest discussion I could find was over at the dev forum here.



  • MarkMark Vanilla Staff
    Yeah, SirNot knows it's broken, but I thought he fixed it.

    SirNot? Any ideas?

    Oh, and it's my fault it's broken - sorry :(
  • Works great except the html preview. Been loving the new RSS2 by the way. It's like running two blogs :)
  • edited July 2006
    Bump. Has the preview ext been updated so it shows HTMl formatting?
  • MarkMark Vanilla Staff
    I haven't tried it again recently. SirNot - did you update and reupload to the addons site?
  • Haven't seen SirNot on here lately...
  • Oh, oops. I had fixed it on the subversion but I don't think it's been re-uploaded.
  • edited July 2006
    It works perfectly. ^_^
    Well, except for double-linebreaks...but that's fine. I can also confirm it works with HTML/Plain Text/Textile/and BBCode.
  • Double line breaks? Does that happen for all the format types or just certain ones?
  • Lemme check...

    Edit: Ok - here's the rundown....

    HTML/Plain Text - Displays correctly.
    BBCode - Does not display line breaks at all.
    Textile - Only displays single line matter how many you put in. But that's actually the nature of no need to worry.

    So - only BBCode messes up linebreaks by not displaying them at all.
  • Alright, should be fixed now.
  • SirNot - Perfect.
    Indeed, you are a mad-person for updating everything so quickly. ;)
  • Nope, still errors for me, conflict with another extension...

    Fatal error: Call to a member function on a non-object in /forum/extensions/Quicktags/default.php on line 43
  • edited July 2006
    I get the same Quicktags clash too. What to do what to do...

    I also get this error:
    Fatal error: Call to a member function on a non-object in /home/content/p/o/o/pooface/html/forum/extensions/Statistics/default.php on line 28

    On a related HTML note, I have noticed that if <li> lists are not closed off with a </ul> the forum goes spasmodic, some crazy formatting errors appear where the list was inserted.

    Any idea why this is happening? Is it just my forum?
  • edited July 2006
    I am getting an error with this extension installed with the Statistics extension as well. The errors I get are the following:

    Notice: Undefined variable: Head in /home/blah/bleh/blahblahblah/forums/extensions/Statistics/default.php on line 28

    Fatal error: Call to a member function AddStyleSheet() on a non-object in /home/blah/bleh/blahblahblah/forums/extensions/Statistics/default.php on line 28
  • any idea regarding these errors?
  • They're occuring because other extensions aren't properly checking whether or not a variable exists/is initizialized before using it. For Statistics, see here. You could do more or less the same for the Quicktags extension except with strings 'post.php' and 'comments.php'.
  • Thanks SirNot, that worked perfectly.
  • 3stripe3stripe ✭✭
    edited July 2006
    Hmm I have some work to do then. If anyone one want to spell it out to me I'll upload a new Quicktags thingie tomorrow.
  • Sweet stuff SIrNot, thanks a lot
  • NickENickE New
    edited July 2006
    Basically all you have to do, 3stripe, is somehow make sure all the variables you're going to access actually exist and are initialized. For example, if you're using $Head, then you might want to do something like if(!isset($Head)) return;, or alternately use it when only certain pages are access, eg. if(!in_array($Context->SelfUrl, array('post.php', 'comments.php'))) return;
This discussion has been closed.