SMF Code Mod

Discussion in 'Moderator Section' started by PopUpSteve, Aug 20, 2015.

  1. PopUpSteve

    PopUpSteve Administrator

    Messages:
    19,429
    Likes Received:
    2,081
    Joined:
    Dec 22, 2002
    Location:
    Malvern, PA
    Modified the "/Themes/default/PersonalMessage.template.php" script to allow for input of the SUBJECT field from the URL.

    Start Line Line: 1010

    ORIGINAL LINE
    Code:
    <input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="60" maxlength="60" />
    NEW LINES
    Code:
    <!-- Then INPUT line for the PM Subject has been replaced so that GETs can be used and the Subject line contents obtained from the URL -->
    <!-- ================================================================================================================================= -->
    <!-- Original Line -->
    <!-- <input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="60" maxlength="60" /> -->
    <!-- New Line -->
    <input type="text" name="subject" value="', !empty($_GET['subject']) ? $_GET['subject'] : $context['subject'], '" tabindex="', $context['tabindex']++, '" size="60" maxlength="60" />
    <!-- ================================================================================================================================= -->
    It will now allow input from the URL as follows:
    Code:
    http://www.popupportal.com/index.php?action=pm;sa=send;u=12754,29367,12878,4764;subject=Bogus%20Acronyms%20-%20JimmyJohn
     
  2. pgordemer

    pgordemer Guest

    I don't recommend you do that code. That is a spam script waiting to happen as now someone can register and write a script that will create the messages in multiple forums at once then leave you the mess to clean up.
     

Share This Page