Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorSirNot
    • CommentTimeMay 9th 2006
     # 1
    Allows users to use HTML to format their comments while stripping out potentially dangerous javascript.
    • CommentAuthorbikuta
    • CommentTimeMar 6th 2007 edited
     # 2
    trying out some html

    get your Vanilla here

    how do I make it so that urls are automatically created as a link?
    e.g. http://www.getvanilla.com <-- not a link, but is there an extension which makes it a link?
  1.  # 3
    If u use the "Text" option and then type
    http://www.getvanilla.com <-- is a link

    it would be nice is the HTML option did that as well.
    • CommentAuthorreap
    • CommentTimeMar 6th 2007
     # 4
    is there a way to combine both? so users don't have to keep switching back and forth btwn text or html?
    • CommentAuthorbikuta
    • CommentTimeMar 6th 2007
     # 5
    oh ok
    can I do that without the extension?
  2.  # 6
    there is only way to find out :)
    • CommentAuthorbikuta
    • CommentTimeMar 6th 2007
     # 7
    well I already tried it and it doesn't work.
    It just seems strange to install the html formatter extension when you don't really need the "html" part of it.
    Furthermore, an average user could get confused thinking that they need to enable the html option to have links in their post.
    •  
      CommentAuthorskube
    • CommentTimeMar 6th 2007
     # 8
    I'm confused, selecting "text" format and typing a link (http://google.com) <-- gives a link!? Hmm..that seems odd. Convenient, I suppose, but odd.

    Presumably, if you select "Html" you know how to create a link using HTML.
    • CommentAuthorbikuta
    • CommentTimeMar 6th 2007
     # 9
    Convenient indeed.
    But inconvenient from a usability POV, i.e. "text" would imply text only, as is the case for emails.

    Anyhow, the extension is definitely useful in its own right.
  3.  # 10
    Guys - that autolinking and the / me function is part of the Extended Text Formatter, not the base text formatter that comes with vanilla. Though this discussion isnt really the place for this discussion.
    • CommentAuthorbikuta
    • CommentTimeMar 6th 2007
     # 11
    ahh thank you, now that makes sense.
    • CommentAuthorquoo
    • CommentTimeMar 13th 2007
     # 12
    Is it just me, or does this double space everything when using paragraph or list tags?
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 13th 2007
     # 13
    Yes it does, that's what AutoP is for.
    • CommentAuthorquoo
    • CommentTimeMar 13th 2007
     # 14
    oh, awesome, thanks:)
  4.  # 15
    Uploaded version 2.0.3 of Html Formatter.
    • CommentAuthorSirNot
    • CommentTimeMar 15th 2007
     # 16
    wow cool, I didn't know it did that
    • CommentAuthorkifo
    • CommentTimeMar 16th 2007
     # 17
    The new version seems to break the formatting?

    I keep getting these errors?


    Notice: Uninitialized string offset: 0 in /nfsn/content/artmgs/public/forum/extensions/HtmlFormatter/default.php on line 226

    Notice: Uninitialized string offset: 0 in /nfsn/content/artmgs/public/forum/extensions/HtmlFormatter/default.php on line 226
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 16th 2007
     # 18
    I get this error as well: http://exhibitq.com/talk/discussion/1/
  5.  # 19
    Uploaded version 2.0.4 of Html Formatter.
    • CommentAuthorSirNot
    • CommentTimeMar 16th 2007
     # 20
    oops, sorry about that. guess that's what I get for not testing it... :-/

    should be fixed now
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 16th 2007 edited
     # 21
    Lovely job thanks SirNot! All clear in my test forum...
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 20th 2007
     # 22
    Found a fringe case (possibly, could be something else...) but when I use the <_< smiley in my forum with Html Formatter turned on I get odd results. Is this Html Formatter causing it or something else? Disabling the extension stops the error occurring.

    Same problems occur here :/ Any way to solve it?
    •  
      CommentAuthoremsef
    • CommentTimeMar 22nd 2007 edited
     # 23
    You can easily add auto-conversion of html links as follows:

    1. Add:
    $sReturn = $this->AutoLink($sReturn);
    Above:
    return $sReturn;
    in function Execute()

    2. Add (code taken from the Extended Text Formatter):
    function AutoLink($String) {

    $String = str_replace(array("&quot;","&amp;"),array('"','&'),$String);
    $String = preg_replace(
    "/
    (?<!<a href=\")
    (?<!\")(?<!\">)
    ((https?|ftp):\/\/)
    ([\@a-z0-9\x21\x23-\x27\x2a-\x2e\x3a\x3b\/;\x3f-\x7a\x7e\x3d]+)
    /msxi",
    "<a href=\"$0\" target=\"_blank\" rel=\"nofollow\">$0</a>",
    $String);
    return $String;
    }

    Between the Execute function and the VideoLink function.

    That's it!
  6.  # 24
    Uploaded version 2.0.5 of Html Formatter.
    • CommentAuthorSirNot
    • CommentTimeMar 22nd 2007
     # 25
    @stash: should be fixed.
    • CommentAuthorkifo
    • CommentTimeMar 22nd 2007
     # 26
    Excellent plugin SirNot
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 23rd 2007
     # 27
    Lovely thanks SirNot :)
    • CommentAuthorakb
    • CommentTimeMar 24th 2007
     # 28
    hi there,

    is there a way to make html default when writing an entry?
    •  
      CommentAuthorMr Do
    • CommentTimeMar 24th 2007
     # 29
    its a simple matter to have the radio button be selected by default if instead of text, however, I looked on the addon code and cant find where the radio buttons are created.. maybe someone with addon creation experience can help us out
  7.  # 30
    The forum should remember what formatter you used last time. Select HTML and it should stay that way till you change it.
    •  
      CommentAuthorMr Do
    • CommentTimeMar 24th 2007
     # 31
    ah right, now that i think about it, it does do that... so unless you want to turn off text formatter, or absolutely need it to be html default first time, it should be best as is
    • CommentAuthorakb
    • CommentTimeMar 24th 2007
     # 32
    ah, nice way to implement it, thanks
  8.  # 33
    I'm trying to set a discussion format from the Janine extension. I'm using this code:

    $Configuration['JanineDiscFormat'] = 'HTML';

    Everything else works, but the posts still end up in text format and I have to manually change them.

    Any help on how to get Html as the format on an automatically created post?
    • CommentAuthorSirNot
    • CommentTimeMar 26th 2007
     # 34
    well it'd be nice if I could tell what this 'janine' extension did without having to go look it up, but assuming it has something to do with setting the formatter type, I think you'd want 'Html' (note the cases).
    •  
      CommentAuthorMr Do
    • CommentTimeMar 26th 2007
     # 35
    heh thats funny considering that Janine is the most discussed add-on or topic at whole lately :)

    its a blog thingy :)
    • CommentAuthorSirNot
    • CommentTimeMar 26th 2007 edited
     # 36
    well I was actually not-so-subtely hinting that using better-suited names for extensions might make things easier for everyone.
  9.  # 37
    A round of apologies to all involved.

    Janine is an extension to automatically create a new Vanilla discussion and associate it with a post on a blog. Right now Janine only supports recent versions of WordPress, but in theory it could be easily extended to work with just about any blog or content management system.


    I actually did try "Html" as well, in case it was case sensitive, but the same thing resulted.
  10.  # 38
    Well, how stupid. I tried lower case again, just in case, and it worked. Something else was wrong last time I tested and I guess I never tried lower-case again with the other fixes. Thanks.
  11.  # 39
    Is there a way that scripts can only be added by the admin but viewed by all.
    or a way to have safe javascript like the one from google that allows embedding of google gadgets in ur webpage.
    •  
      CommentAuthorØ
    • CommentTimeApr 16th 2007 edited
     # 40
    Hi folks. I've a found a solution to something which was bugging me since a while: YouTube videos keep a white background. His this is quite ugly on a non-white background, but there's an easy fix.

    Replace this, at line 122:
    case 'youtube' : return ('<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/'.$ID.'"></param>'.
    '<embed src="http://www.youtube.com/v/'.$ID.'" type="application/x-shockwave-flash" width="425" height="350"></embed>'.
    '</object>');


    by this:
    case 'youtube' : return ('<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/'.$ID.'" name="wmode" value="transparent"></param>'.
    '<embed src="http://www.youtube.com/v/'.$ID.'" type="application/x-shockwave-flash" width="425" height="350" wmode="transparent"></embed>'.
    '</object>');


    I didn't test for other videos, but I guess if you change this for Google & MySPace, it will work the same. Hope this helps.
    • CommentAuthorcw
    • CommentTimeApr 19th 2007
     # 41
    Hey, how I can allow h1,h2,h3,h4 tags?
    The text inside them simple disappear.
    Thanks!
    •  
      CommentAuthor[-Stash-]
    • CommentTimeApr 19th 2007
     # 42
    Test:

    Header 1


    Header 2


    Header 3


    Header 4


    Header 5

    Header 6


    Test:
    <h1>Header 1</h1>
    <h2>Header 2</h2>
    <h3>Header 3</h3>
    <h4>Header 4</h4>
    <h5>Header 5</h5>
    <h6>Header 6</h6>
    •  
      CommentAuthor[-Stash-]
    • CommentTimeApr 19th 2007 edited
     # 43
    Interesting... here's the output for my above comment in fx2 win32

    <div class="CommentBody" id="CommentBody_66788">Test:<br /><h >Header 1</h><br /><h >Header 2</h><br /><h >Header 3</h><br /><h >Header 4</h><br /><h >Header 5</h><br /><h >Header 6</h><br /><br />&lt;code >Test:<br />&lt;h1&gt;Header 1&lt;/h1&gt;<br />&lt;h2&gt;Header 2&lt;/h2&gt;<br />&lt;h3&gt;Header 3&lt;/h3&gt;<br />&lt;h4&gt;Header 4&lt;/h4&gt;<br />&lt;h5&gt;Header 5&lt;/h5&gt;<br />&lt;h6&gt;Header 6&lt;/h6&gt;&lt;/code>

    </div>


    And readable
    <div class="CommentBody" id="CommentBody_66788">Test:<br />
    <h >Header 1</h><br />
    <h >Header 2</h><br />
    <h >Header 3</h><br />
    <h >Header 4</h><br />
    <h >Header 5</h><br />
    <h >Header 6</h><br />
    <br />
    &lt;code >Test:<br />
    &lt;h1&gt;Header 1&lt;/h1&gt;<br />
    &lt;h2&gt;Header 2&lt;/h2&gt;<br />
    &lt;h3&gt;Header 3&lt;/h3&gt;<br />
    &lt;h4&gt;Header 4&lt;/h4&gt;<br />
    &lt;h5&gt;Header 5&lt;/h5&gt;<br />
    &lt;h6&gt;Header 6&lt;/h6&gt;&lt;/code>
    </div>
    • CommentAuthorcw
    • CommentTimeApr 19th 2007
     # 44
    Yeah, for me it's very the headers are very important :(
    Any thoughts?
    •  
      CommentAuthorMr Do
    • CommentTimeApr 19th 2007
     # 45
    What about span?
    <span style='font-size:1.3em;'>What about span?</span>
    Or span with predefined classes?
    <span class='h1'>Or span with predefined classes?</span>
  12.  # 46
    Uploaded version 2.0.6 of Html Formatter.
    • CommentAuthorSirNot
    • CommentTimeApr 19th 2007 edited
     # 47
    oops, I managed to forget to allow digits in the node names. fixed now.
    •  
      CommentAuthorMr Do
    • CommentTimeApr 19th 2007
     # 48
    heh all fixed. good job :)
    •  
      CommentAuthor[-Stash-]
    • CommentTimeApr 19th 2007
     # 49
    Good catch cw, nice fix SirNot :)
  13.  # 50
    It doesn't work with comments tags like
    <!--more-->
    it displays it as text, rather than hide it from display

    Actually it should do a text replacement convert the more text into an anchor
    So take this /<!--more(.*?)-->/
    and convert it into this<a id="more" name="more"></a>
    also support for will be nice. it should generate links like &Page=2