1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unmaintained [TH] Promotion Message by ThemeHouse 1.0.1a

Creates a thread when a user gets promoted.

  1. Jon W

    Jon W Well-Known Member

    Last edited: Aug 17, 2013
  2. KCGaming

    KCGaming Member

    Firstly thank you for the addon but have been testing and I get the following error

    This error comes up after the cron runs for user promotions and also if I manually promote a user.

    We are using xenforo 1.2 and have quite a few addons installed but have read that XF 1.2 uses a different post method I think has anyone got any suggestion ?
     
  3. Jon W

    Jon W Well-Known Member

    Looks like you need to download the latest version of XenAtendo, or disable that add-on if it is not yet updated.
     
  4. KCGaming

    KCGaming Member

    Thank you Waindigo as always fast and excellent help disabled it and all works fine
     
    Jon W likes this.
  5. Jon W

    Jon W Well-Known Member

  6. KCGaming

    KCGaming Member

    One Little thing that could be updated is when a user is promoted the thread is created using the users name of the promoted user as the thread starter.

    It is something small but reads funny when user1 starts the thread saying congrats user1 on promotion (they are congratulating them self's)

    I have modified usergrouppromotion.php to change the thread starter id to 1 (master admin account) but would be handy for others if they had the option to nominate the thread starter userid in options.
     
  7. Jon W

    Jon W Well-Known Member

    Good point. I actually quite like that it is posted by the user because it means users can like the post etc.

    Its also similar to how Resource Manager posts when a resource is created (see first post in this thread).

    I'll definitely add it as an option though.
     
    akhilaniyan likes this.
  8. akhilaniyan

    akhilaniyan Active Member

    can you please tell me, how to edit "usergrouppromotion.php" and setting admin ID for thread starter?

    I found the file and i can edit that file, please tell which line, what modification?

    If we changed that, what will happen to existing threads?
     
  9. KCGaming

    KCGaming Member

    I have to go to work now but will post in 12-14 hrs once im home and kids in bed
     
    akhilaniyan likes this.
  10. KCGaming

    KCGaming Member

    Ok Sorry for the delay got into some gaming tonight

    edit filre Waindigo/PromotionMessage/Extend/XenForo/Model/UserGroupPromotion.php

    change lines 33,34 from this

    PHP:
    'user_id' => $userId,
      
    'username' => $username,
    to

    PHP:
    'user_id' => '1',
     
    'username' => 'Admin',
    Now obviously change the 1 and name Admin to suit your needs
     
    Jon W and akhilaniyan like this.
  11. akhilaniyan

    akhilaniyan Active Member

    Thank you very much...
     
  12. KCGaming

    KCGaming Member

    Ok I'm new here so not sure the correct procedure but have been teaching my self some things about addons,I have added the basic features into the options to allow you to choose user ID and user Name hope Waindigo approves (We did sponsor the creation of this addon so hope this should be all OK)

    Now Warning here I have just added text boxes and strings and yet don't know how to verify that these users even exist.

    I feel until Waindigo gets a chance to do it the better more secure way this will be sufficient. (after all it's only admins that change these settings)

    This has been tested on my site and I believe I have packed it correctly to allow users to upgrade by changing Version ID and naming it 1.01

    Please give me feedback on how it goes and if anyone can give me any hints on php callback I use to verify user details I could update it more
     
    akhilaniyan likes this.
  13. Jon W

    Jon W Well-Known Member

  14. Jon W

    Jon W Well-Known Member

    Thank you very much for your contribution. I have made some changes to your implementation and released as an update. I hope you find the changes that I have made useful. Do let me know if you have any questions.

    Regarding releasing updates in this way, it is technically in breach of the license conditions, regardless of whether you paid to have it produced, so I have asked the moderators to remove your attachment. While there was nothing wrong with what you released, it can cause problems for other users if there are different branches of the same add-on with different version numbers etc.. In future, we ask that you email it to us first, or just post the changes that you made to the add-on in this thread so that others can make those changes.

    That being said, we are always very happy to receive contributions in any form (code, money, beer, etc.) and will usually be more than happy to add code contributions to our add-ons!
     
  15. akhilaniyan

    akhilaniyan Active Member

    when i click upgrade(to 1.0.1), it shows an error" The forum is currently closed. Only administrators may access the forum.
    Upgrade Add-on"
     
  16. Jon W

    Jon W Well-Known Member

    That's not an error. It is a warning that you have an add-on that has been uploaded and not upgraded. Complete the upgrade (by uploading the XML file or clicking the link) and the warning will disappear.
     
  17. akhilaniyan

    akhilaniyan Active Member

    Error in upgrade..

    "Please enter a valid value for this option."
     
  18. Jon W

    Jon W Well-Known Member

  19. akhilaniyan

    akhilaniyan Active Member

    Upgrade Not working!!!

    1. Tried upgrade via normal upgrade process of "Install & Upgrade" addon. Failed.
    2. Disabled "Install & Upgrade" addon and removed your addon and tried a fresh install via xml file after uploading the files via ftp. Failed!

    "Please enter a valid value for this option."
     
  20. akhilaniyan

    akhilaniyan Active Member

    Jon W likes this.

Share This Page