Phpbb (Coding) Help Required

Discussion in 'OT Technology' started by o2, Jun 5, 2006.

  1. o2

    o2 Witty Title Here OT Supporter

    Joined:
    Oct 4, 2005
    Messages:
    16,099
    Likes Received:
    11
    Location:
    Toronto
    I just installed the following mod on my forum: http://www.phpbb.com/phpBB/viewtopic.php?t=119663

    Which allows admins to post html. It worked perfectly, but had 1 side effect..... people can put html into sigs.

    I need to disable html in signatures completely... regardless of what the board setting is set to.

    Here is the code for the entire page, that handles the signature editing. Can someone suggest a quick fix for this?

    www.planetboredom.net/o2/usercp_register.txt
     
  2. Conrad10781

    Conrad10781 New Member

    Joined:
    Feb 26, 2005
    Messages:
    45
    Likes Received:
    0
    Location:
    New York
    Interesting, if you print $allow_html does it show a 1? I am thinking if that is the case, right before one of the lines like

    $signature = prepare_message($signature, $allowhtml,

    You could put $allowhtml = '0';

    But I have a feeling this may be called in another file as far as storing the signature, as that more or less looks like the signup/register page... But again I could be wrong, PHPBB uses SMARTY, so you may need to print a {$allowhtml} and not <?php echo $allowhtml?>
     
  3. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    Where it goes to output the sig, simply use this in place of $signature:
    PHP:
    strip_tags($signature);
     
  4. o2

    o2 Witty Title Here OT Supporter

    Joined:
    Oct 4, 2005
    Messages:
    16,099
    Likes Received:
    11
    Location:
    Toronto
    Its already set to:

    $signature = htmlspecialchars(stripslashes($signature));
     
  5. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    add this below it, then:

    PHP:
    $signature $strip_tags($signature);
     

Share This Page