1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Not Planned Ability to choose a prefix for the forum to post stock threads to

Discussion in 'Stock Trader Closed Suggestions' started by SneakyDave, Oct 25, 2014.

  1. SneakyDave

    SneakyDave Member Sportsbook

    I noticed Sportsbook has the ability to chose a forum and prefix for posting threads, but Stocktrader doesn't allow a person to choose a prefix.

    Would be nice if both add-ons could have this option.
     
  2. Bob

    Bob Developer Staff Member

    I really didn't see the need since all stock trader threads would have the same prefix in the same forum. Its not the same as a Per Category option within Showcase and Sportsbook.

    Whats the point of every stock thread having the same prefix in the same forum?
     
  3. SneakyDave

    SneakyDave Member Sportsbook

    It's just an attempt to keep consistency between the 2 addons, all "money" type transactions go to one forum, with a money prefix, but not really a big deal. The threads created are different enough that maybe I'll create prefixes for each sportsbook category, and then it'll look better.
     
  4. Bob

    Bob Developer Staff Member

    You can always just edit the createThread method of the stocktrader thread model and hard code in the setting of a prefix ID.

    edit file: /library/NFLJ/StockTrader/Model/Thread.php
    find starting appx line 86 (part of the createThread method)
    PHP:
            $writer XenForo_DataWriter::create('XenForo_DataWriter_Discussion_Thread');

            
    $writer->set('node_id'$forum['node_id']);
            
    $writer->set('title'$threadTitle); 
            
    $writer->set('user_id'$visitor['user_id']); 
            
    $writer->set('username'$visitor['username']);
            
    $writer->set('discussion_type''stocktrader');
            
    $writer->set('discussion_state''visible');
    ADD the setting of the prefix_id (change 4 to what ever the prefix_id is for the prefix you want set.
    PHP:
    $writer->set('prefix_id''4');
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.