subscribing to all new posts in trading forums

Discussion in 'Questions & Comments' started by srebrni, Mar 5, 2011.

  1. srebrni

    srebrni New Member Silver Stacker

    Joined:
    Oct 18, 2009
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Melbourne, Australia
    I reckon there would be quite an interest for e-mail sent whenever a new post hits trading forums.

    It seems to be possible since FluxBB 1.4.3:

    https://fluxbb.org/development/core/tickets/142/

    Can we have this turned on, please? Together with the option that plain text content of the post is included in the notification itself.

    I am aware this can increase e-mail traffic significantly. If this is deemed a potential problem, there is a simple solution. Introduce paid subscriptions, and only paying members get to have this option enabled.
     
  2. THUCYDIDES79

    THUCYDIDES79 New Member Silver Stacker

    Joined:
    Sep 1, 2010
    Messages:
    3,572
    Likes Received:
    4
    Trophy Points:
    0
    Location:
    Brisbane/Greenbank
    Great idea, paid subscriptions though medium great :)

    CK with the buzzer should veto it :)
    hehe
     
  3. goldpelican

    goldpelican Administrator Staff Member

    Joined:
    Jun 29, 2009
    Messages:
    17,648
    Likes Received:
    581
    Trophy Points:
    113
    Forum is still on 1.4.2 - there's a *lot* of customisation that makes upgrading difficult.
     
  4. srebrni

    srebrni New Member Silver Stacker

    Joined:
    Oct 18, 2009
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Melbourne, Australia
    Perhaps port just the related code then?

    Can't be that hard. It sounds like a component upgrade (syndication) which is already working for topics. You don't need to worry about any pages required to manage this new option, just port the extra fields in tables, if any. Whoever wants this can just PM you and you can update the forum ids manually.

    I can volunteer to test & help, if required. Bet CK does too ;)
     
  5. Dwayne

    Dwayne New Member

    Joined:
    Oct 6, 2010
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Sydney
    Spoken like somebody who isn't a software developer ;)
     
  6. srebrni

    srebrni New Member Silver Stacker

    Joined:
    Oct 18, 2009
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Melbourne, Australia
    If you read past the first sentence, you might have reached the opposite conclusion.
     
  7. mmm....shiney!

    mmm....shiney! Administrator Staff Member Silver Stacker

    Joined:
    Nov 15, 2010
    Messages:
    18,675
    Likes Received:
    4,436
    Trophy Points:
    113
    I think he was just havin a little joke :)
     
  8. srebrni

    srebrni New Member Silver Stacker

    Joined:
    Oct 18, 2009
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Melbourne, Australia
    No joking until GP relents and does the right thing :)

    Otherwise CK will keep giving us kennies. Down with sponsor favouritism ;)
     
  9. Dwayne

    Dwayne New Member

    Joined:
    Oct 6, 2010
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Sydney
    Exactly - if I had a dollar for every time I have heard those 4 words from clients... well I would have more silver right now :)
     
  10. renovator

    renovator Well-Known Member

    Joined:
    Jan 20, 2011
    Messages:
    6,989
    Likes Received:
    83
    Trophy Points:
    63
    Location:
    QLD
    paid subscriptions ? arghhhhh !!!!!
     
  11. srebrni

    srebrni New Member Silver Stacker

    Joined:
    Oct 18, 2009
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Melbourne, Australia
    After a bit of a distraction, back to original question.

    GP, are you willing to give us this capability - and if so, when do you reckon it could be implemented?...
     
  12. goldpelican

    goldpelican Administrator Staff Member

    Joined:
    Jun 29, 2009
    Messages:
    17,648
    Likes Received:
    581
    Trophy Points:
    113
    Sorry - haven't got the time to work on refactoring the forum software again. As I said, I can't just run a 1.4.3 upgrade script against the forum - too much fiddly customisation behind the scenes.
     
  13. srebrni

    srebrni New Member Silver Stacker

    Joined:
    Oct 18, 2009
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Melbourne, Australia
    OK, I can help.

    I've done it just now & tested. It's trivial really - a single point call in post.php. Here's step by step instructions - five steps in total:

    1. Create table forum_subscriptions. This is where you need to add people (user_id/forum_id). The structure is as follows - you can easily create it via myphpadmin:

    $schema = array(
    'FIELDS' => array(
    'user_id' => array(
    'datatype' => 'INT(10) UNSIGNED',
    'allow_null' => false,
    'default' => '0'
    ),
    'forum_id' => array(
    'datatype' => 'INT(10) UNSIGNED',
    'allow_null' => false,
    'default' => '0'
    )
    ),
    'PRIMARY KEY' => array('user_id', 'forum_id')
    );

    2. Add 'o_forum_subscriptions' => '1' in config table. Delete the cache/cache_config.php so it can be recreated.

    3. Copy two mail templates from 1.4.3 to your 1.4.2 installation. In lang\English\mail_templates: new_topic.tpl and new_topic_full.tpl.

    4. Copy get_base_url() fuction from 1.4.3 to your 1.4.2 functions.php. Or you can completely delete the references to that function in the next step as we manage the subscriptions manually.

    5. Add a code snippet that sends e-mail depending on this table (from 1.4.3 post.php) to 1.4.2 post.php. Search for "// Update the topic with last post id" in 1.4.2 file; the insertion point is just after update_forum($fid); statement. You need to insert the complete subsequent statement from corresponding 1.4.3 file (i.e. if ($pun_config['o_forum_subscriptions'] == '1') from curly to curly. E-mail me if you want me to send this to you.

    Tested, works fine and doesn't break anything else, nor it requires extensive data model changes. The only potential issue is the e-mail traffic - xx daily posts times yyy subscribers to be sent to. That's why I suggested subscriptions, both in order to reduce the number of people who will use this and to pay for more expensive hosting.
     
  14. goldpelican

    goldpelican Administrator Staff Member

    Joined:
    Jun 29, 2009
    Messages:
    17,648
    Likes Received:
    581
    Trophy Points:
    113
    Thanks - it's not a technical limitation for me to work out how to do it ;) More a case of more pressing things to be done, on and off the forum.
     
  15. srebrni

    srebrni New Member Silver Stacker

    Joined:
    Oct 18, 2009
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Melbourne, Australia
    Nah, didn't think so. For me, laziness usually stands in the way ;) so I thought if I actually looked at it you might as well incorporate it.

    I can also volunteer to integrate this properly so users can manage their own subscriptions instead of you adding them to the table manually. If you buy me a beer ;)
     
  16. goldpelican

    goldpelican Administrator Staff Member

    Joined:
    Jun 29, 2009
    Messages:
    17,648
    Likes Received:
    581
    Trophy Points:
    113
    I've had a look into this tonight - there's a few more personal mods I've made to post.php that make this a bit trickier to incorporate than the above (pulled down the 1.4.4 code and did a diff).

    1.4.5 is out soon - I've got an upcoming house move that is chewing into time needed to sit down and upgrade the entire forum, but I'll be targeting a refresh for 1.4.5 to make this available some time in April.
     
  17. Jing

    Jing Member Silver Stacker

    Joined:
    Mar 1, 2011
    Messages:
    529
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Melbourne
    I thought you could subscribe to RSS feeds with some email clients which would send you updates?
     
  18. srebrni

    srebrni New Member Silver Stacker

    Joined:
    Oct 18, 2009
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Melbourne, Australia
    Not sure about email clients, but anyway RSS feed doesn't currently work for trading forum because the authentication has to be sorted first.
     
  19. srebrni

    srebrni New Member Silver Stacker

    Joined:
    Oct 18, 2009
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Melbourne, Australia
    What's so tricky? Even if you completely hacked post.php, you just need to find a spot where new topic gets posted and copy the if statement that checks subscriptions & send emails. That's it.

    Anyway - seems you've got other priorities at the moment and hardly anyone really cares about this, so I'll wait when you do the upgrade in April.
     
  20. Maggie

    Maggie New Member Silver Stacker

    Joined:
    Feb 9, 2011
    Messages:
    6,314
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    R.I.P
    Hello everyone, Please keep it so none Tech heads can still get around forum.. I cannot find my cat let alone you guys at times.
     

Share This Page