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 Post preview position

pbearpbear New
edited February 2007 in Vanilla 1.0 Help
When I add comments to a discussion, the preview appears above the add comments editing fields. When I start a new discussion, it appears below. Is there a reason new discussion previews appear after and not before? Before the editing area seems a better place to me.

Also, when previewing a comment or new discussion, the view doesn't scroll (either up or down) to the beginning of where it is being previewed so I can see what I've just written. Especially for a new discussion, sometimes I sit there "waiting" until I realize I have to scroll down to it. Then after reading I have to scoll back up to edit changes.

So I guess I'm asking if default behavior should be always to place the preview above the edit area, with autoscroll to the beginning of the preview (if it's not in the browser view already). That way one always scrolls down in the process of making a new discussion/comment.

Comments

  • any better?
  • Preview seems such a essential function to me I forgot it was an add-on, but I'll give the new one a try (v2.2!). Thanks!
  • Looks like there's a conflict between the version 2.2 and the Discussion Tags extension. Since I updated I get this error when I hit the preview button:
    Fatal error: Call to a member function on a non-object in ../extensions/DiscussionTags/default.php on line 67
  • NickENickE New
    edited February 2007
    I'd add something like this to the top of the DiscussionTags extension's default.php (obviously under the comment):if(!isset($Head) || !isset($Panel)) return;
  • edited February 2007
    Err... Now I get this from the Attachments extension:
    Fatal error: Call to a member function on a non-object in ../extensions/Attachments/default.php on line 644
    And the preview image seems to be x-repeated, by the way.
  • ok change line 644 to the following:if (in_array($Context->SelfUrl, array('comments.php', 'post.php')) && isset($Head) ) {not too sure about the background image though, it dosn't seem to be repeated for me in ie7, ff2 or o9. it really only has a background image because some people were worried that users wouldn't realize that was a preview; removing it probably wouldn't be a big deal.
  • Sorry to bug you again lol but now I get this with the BBCode Insert Bar:
    Fatal error: Call to a member function on a non-object in ../extensions/BBInsertBar/default.php on line 154
  • man all these extensions just check the page and never if the variables are available...

    but yeah, just add something like if(!isset($Head)) return; to the beginning of the extension. generally speaking, you can do that for any other extensions that give you trouble, but you want to be more careful with those that involve ajax as the default.php file may be used during an ajax query as well.
  • Ok, I'll try this, thanks.

    Shouldn't we make a list of extensions that don't check for the available variables? Sounds like quite a bit of mass updating will be required here. And since people seem to be thinking about add-on validation/guidelines stuff at the moment, it may be the right time to see what we can do about it.
  • StashStash
    edited February 2007
    Ø, I agree. To be honest SirNot, I never read anywhere that I had to check for the variable, and since I'm new to PHP (and probably other authors as well), it would be nice to have some kind of guidelines to follow.
This discussion has been closed.