Menu

Enabling HTML tags

2001-08-16
2012-10-11
  • mark chitty

    mark chitty - 2001-08-16

    Hi,

    I've set phpwiki up and would like to enable the HTML tag option. This seems a simple operation i.e.

    I have changed the following code within transform.php as per the instructions:

    /* If your web server is not accessble to the general public, you may
    allow this code below, which allows embedded HTML. If just anyone can reach
    your web server it is highly advised that you do not allow this.

          elseif (preg_match("/(^|)(.*)/", $tmpline, $matches)) {
             // HTML mode
             $html .= SetHTMLOutputMode("", ZERO_LEVEL, 0);
             $html .= $matches[2];
             continue;
          }
    */

    into

    /* If your web server is not accessble to the general public, you may
    allow this code below, which allows embedded HTML. If just anyone can reach
    your web server it is highly advised that you do not allow this.
    */
          elseif (preg_match("/(^|)(.*)/", $tmpline, $matches)) {
             // HTML mode
             $html .= SetHTMLOutputMode("", ZERO_LEVEL, 0);
             $html .= $matches[2];
             continue;
          }

    But it does not work :-(

    Have I missed something obvious ??

    cheers,

    limbo90

     
    • Steve Wainstead

      Steve Wainstead - 2001-08-16

      After you have enabled this feature, you have to preface every line of HTML with a pipe (|). This is because PhpWiki processes line by line instead of by token (that is, the whole file at once). So:

      | <h1>header<\h1>
      | <table>
      | <tr>
      | <td>

      and so on. It's very cumbersome to use. Sorry.

      ~swain

       
    • John Lang

      John Lang - 2001-11-03

      How about in 1.3? Am I missing something, I can't seem to find the commented elseif that was in 1.2.

       
      • Steve Wainstead

        Steve Wainstead - 2001-11-05

        Hmm. Since the rewrite of the rendering engine I would suppose raw HTML is not possible. It would be possible to add support for a subset of HTML though (as much as I loathe the notion, but it's a very common thing for dynamic/community sites to do).

        ~swain

         
        • Geoffrey T. Dairiki

          That's right, I think.  As far as I can see, the raw HTML code was dropped when moving to the new transform code.

          If you really want it, let me know, I'll add it back in.   (It's straightforward, I think.)

          One thing to keep in mind is that the wiki markup for raw HTML conflicts with the new markup for tables (both use a leading '|'), so you will not be able to enable both at the same time.  (At least, not without further hacking of some kind.)

           
    • John Lang

      John Lang - 2001-11-12

      I've found that with a little practice I don't really need raw HTML, in fact creating tables in phpwiki seems easier then raw HTML !

       
    • John Lang

      John Lang - 2001-11-12

      I've found that with a little practice I don't really need raw HTML, in fact creating tables in phpwiki seems easier then raw HTML !

       
    • Oliver Dow

      Oliver Dow - 2001-12-09

      The new features in 1.3 are great congratuations, Steve Wainstead, and the rest of the team.

      I cannot successfully migrate from 1.2 as a few of my pages do use raw html. I put my vote forward to introduce this feature into 1.3 (please)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.