Results 1 to 7 of 7

Thread: Spec : Email notification.

  1. #1
    Join Date
    Dec 2006
    Location
    denver,co
    Posts
    1,078

    Default Spec : Email notification.

    Hey, could you add some formatting, maybe a little html color tags or bold to make the email post notification a little easier (faster) to read?

    Usually When I am reading the email is on my phone. And usually there is a lot of extraneous stuff to sift through to get the actual message.

    Little thing, I know. But should be easy to make nicer?

    chad


    When the going gets weird, the weird turn pro.


  2. #2
    Join Date
    Feb 2010
    Location
    Melbourne, Australia
    Posts
    1,106

    Default

    True. This would be an awesome refinement.

  3. #3
    Join Date
    Dec 2006
    Location
    denver,co
    Posts
    1,078

    Default

    Bumpity bump.

    chad


    When the going gets weird, the weird turn pro.


  4. #4
    Join Date
    Feb 2007
    Posts
    1,725

    Default

    Ok, I just dug this out of the database. Here is the actual structure of the instant email notifications:

    There isn't much to work with given how compartmentalized the strings are but if you want to give it a go and try to wrap html around it, please do. Remember to use escape characters.

    I'll try and find a way to hook this function so that a user can select html/plain text delivery.

    Code:
    Dear $touser[username],
    
    $bbuserinfo[username] has just replied to a thread you have subscribed to entitled - $threadinfo[prefix_plain]$threadinfo[title] - in the $foruminfo[title_clean] forum of $vboptions[bbtitle].
    
    This thread is located at:
    $threadlink
    
    Here is the message that has just been posted:
    ***************
    $pagetext
    ***************
    
    
    There may also be other replies, but you will not receive any more notifications until you visit the forum again.
    
    All the best,
    $vboptions[bbtitle]
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Unsubscription information:
    
    To unsubscribe from this thread, please visit this page:
    $unsubscribelink
    
    To unsubscribe from ALL threads, please visit this page:
    $managesubscriptionslink

  5. #5
    Join Date
    Dec 2006
    Location
    denver,co
    Posts
    1,078

    Default

    Thanks, I will play with it. I don't understand the esc-chr though. I know very little about html.
    Will the board parse this: $touser[username] anywhere when it generates an email?

    chad


    When the going gets weird, the weird turn pro.


  6. #6
    Join Date
    Feb 2007
    Posts
    1,725

    Default

    $touser[username] is just the way they call variables from strings. $ denotes a string containing an arbitrary number of variables. That's used pretty much exclusively in the email parser.

    for example: $bbuserinfo[username] parses back the information the board knows about the login credential *name* attributed to the account. The $touser[] thing is used when the board needs to figure out who it's talking to.

    However under the theme layout system here one *can't* call functions like these.(Disabled for security.)

    HTML Code:
    {userid}, {username}, {musername}, {sessionurl}, {sessionurl_q} $bbuserinfo[username]
    PHP Code:
    {userid}, {username}, {musername}, {sessionurl}, {sessionurl_q$bbuserinfo[username
    Code:
    {userid}, {username}, {musername}, {sessionurl}, {sessionurl_q} $bbuserinfo[username]
    For more in depth data on escape characters please go here: http://php.net/manual/en/regexp.reference.escape.php

    In a nutshell it's a character sequence that tells PHP that the next character or sequences of characters should be interpreted as ascii text instead of code to be worked on.

  7. #7
    Join Date
    Dec 2006
    Location
    denver,co
    Posts
    1,078

    Default

    Hum. Because I have no way to test it, and the chances of me making something that might work are very slim. How about we just trim some fat. I moved the $pagetext to the top so I get a little of the message on my phone. The subject is the title so I know what it is.

    Code:
    " $pagetext "
              $bbuserinfo[username]
    
    $threadlink
    Dear $touser[username], $bbuserinfo[username] has just replied to $threadinfo[prefix_plain]
         
         All the best,
         $vboptions[bbtitle]
    
    ~To unsubscribe from this thread,$unsubscribelink
    ~To unsubscribe from ALL threads,$managesubscriptionslink


    When the going gets weird, the weird turn pro.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •