Parameters passed to notification email (how to increase amount of message sent with notification?)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stcorp
    Member
    • Mar 2014
    • 43
    • 5.0.X

    Parameters passed to notification email (how to increase amount of message sent with notification?)

    We've modified our post reply and topic reply email templates in the phrase manager: reply_post_gemailbody and reply_thread_gemailbody. Good so far.

    What I really want to do though is find where those are called/used. I want to try to increase the number of characters included in parameter number {4} when substituted in the template. It looks like it is including roughly 160 characters...maybe a few less. We'd like to bump that up to a few hundred or perhaps 1000.
  • stcorp
    Member
    • Mar 2014
    • 43
    • 5.0.X

    #2
    Well, I answered this for myself, although I consider what I had to do a 'hack'. If there is an official way to do this via a template, adminCP, or something else, I'd love to hear about it.

    For anyone else trying to do this in vBulletin 5, edit

    core/vb/library/content/text.php

    Search in it for a call to the 'vbmail' function. Notice there that it is sending "$maildata['message']" to be mailed. Now, look up a few lines for a call to fetchEmailPhrases. Within that is a call to getPreviewText that looks something like

    vB_String::getPreviewText($currentNode['rawtext'])

    getPreviewText takes an optional argument which is the desired text length. So, I changed this to

    vB_String::getPreviewText($currentNode['rawtext'], 1000)

    There are other calls to getPreviewText in the same file. If you look up a few more lines, you'll see the call to it for notifications of private messages, so you could bump the limit there too if so desired.

    Comment

    • SwissGuy
      Member
      • Jun 2004
      • 74

      #3
      I know this is a very old thread -- but would anyone know if there is an easier / non-hack way of achieving this?

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74132

        #4
        Originally posted by SwissGuy
        I know this is a very old thread -- but would anyone know if there is an easier / non-hack way of achieving this?
        Updating this value hasn't changed since this topic was created.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • SwissGuy
          Member
          • Jun 2004
          • 74

          #5
          Thanks for the reply, Wayne.

          Comment

          Related Topics

          Collapse

          Working...