Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthormightymango
    • CommentTimeDec 20th 2007 edited
     # 1
    Allows an administrator to make an award to a member. This could, for example, be for help given or for a donation that has been made.

    This is a role based feature. Just check 'Can make an award to a user' on the 'Roles & Permissions' page for those roles you wish to be able to give awards. 'Make an Award' will appear as a link on the 'Account Options' side panel menu list.

    Compatability with UserGifts
    Version 1.0.2 or later of UserAward should be used if this extension is to be used at the same time as UserGifts.

    Changing the 'award notice'
    If you would like to change the content or layout of the 'Award Notice', edit and add the following to your myforum/conf/language.php file:

    $Context->SetDefinition('UserAwardNotice', 'An award has been made to you by {awardedby} with the following message: <b>{awardnotes}</b>');

    {awardedby} will be replaced by the 'username' of the person who made the award
    {awardnotes} will be replaced by the award message.

    Adding the following line will hide the separate notice about viewing the award history (this could be added to the above code).
    $Context->SetDefinition('UserAwardListNotice', '');

    Known Issues and Future Improvements

    For a user to be able to edit or delete an award made to a user they must also have permission to make an award to a user.

    From version 1.1 awards are displayed in their 'value' order. A future version will include an option to display awards in the order they were made.

    Important
    If you have an earlier version and have edited 'awards.php' to display your own award types please check the latest version of 'awards.php'.

    Reset the database
    To force UserAward to recreate the database table and to delete all awards made, remove the following line from 'conf/settings.php':

    $Configuration['USERAWARD_VERSION'] = '1.x';

    NB Any awards made will also be removed.

    Version History
    Version 1.4.1
    - Fixed unexpected & error

    Version 1.4
    - Now uses Vanilla Framework when creating/checking UserAward table.

    Version 1.3
    - Fix for database error experienced by some users.

    Version 1.2
    - Sorted problem with repeated sorting of the awards.
    - Fixed problem with deleting award types and then adding a new award type which resulted in the incorrect icon being displayed.
    - Added option to hide the award notice when making an award
    - Each icon now has a unique filename so no need to override image cache
    - Now possible to delete all award types. The 'Make an Award' link is not available if there are no awards defined.
    - Minor bug fix for problem with upgrading the database table (thanks bmw)
    - Sort order now correct when new award is made
    - Smaller version of the 'star' icon so that it takes up less room on the comments page

    Version 1.1
    - Awards now displayed in 'value' order
    - All awards now displayed on comments page
    - Number of stars on the discussions page reflects the number of awards

    Version 1.0.3
    - Fixed problem where UserAward changed to the wrong user when an award is made without a note.
    - Only use 'Fullname' if the users has enabled the option.

    Version 1.0.2
    - Small code change for compatability with UserGifts

    Version 1.0.1
    - Now possible to remove the notice about 'history of awards' (see above).

    Version 1.0
    - Improved award message (thanks to eugen and kalikiana)
    - Fixed problem with 'Extension Options'
    - Used dictionary definition for 'Edit'
    - Correct use of 'AccountOptions'

    Version 0.9b
    - Fixed problem where 'Award Message' was not been hidden.
    - Added 'Extension Options' to language file.

    Version 0.8b
    - Fixed problem where some users were being 'locked out' of the accounts page.

    Version 0.7.1b
    - Included missing icon files and correct version of awards.php

    Version 0.7b
    - Fixed problem where users with permission to add an award were not able to.
    - Added correct message when deleting an award made to a user.

    Version 0.6b
    - Added method of creating, editing and removing different award types
    - Added check for Redirect()
    - Added check for write access to awards.php and icons folder

    Version 0.5b
    - Added 'Settings' page
    - Option to choose where and when awards are displayed

    Version 0.3b
    - Moved database settings to UserAward/conf/database.php
    - Moved lanuage settings to UserAward/conf/language.php
    - Added 'Notice' of awards

    Version 0.2b
    - Minor code changes

    Version 0.1b
    - First beta release

    Donations
    If you find this extension useful please consider making a donation. Then at least I would have something to show my wife for all the hours I spend writing Vanilla Extensions!

  1.  # 2
    if i enable this extension i get this popup (when the loader gif apears)


    // UserAward Table Structure
    $DatabaseTables['UserAward'] = 'UserAward';
    $DatabaseColumns['UserAward']['AwardID'] = 'AwardID';
    $DatabaseColumns['UserAward']['UserID'] = 'UserID';
    $DatabaseColumns['UserAward']['Award'] = 'Award';
    $DatabaseColumns['UserAward']['Notes'] = 'Notes';
    $DatabaseColumns['UserAward']['AwardedBy'] = 'AwardedBy';
    $DatabaseColumns['UserAward']['DateAwarded'] = 'DateAwarded';
    $DatabaseColumns['UserAward']['ShowMessage'] = 'ShowMessage';
    ?>UserAward


    other than that it doesnt work for me.
    btw. i have the newest vanilla release.

    thx :)
  2.  # 3
    Uploaded version 0.2 Beta of UserAward.
    •  
      CommentAuthormightymango
    • CommentTimeDec 20th 2007 edited
     # 4
    fery: I have not been able to reproduce your problem but have made a few small changes to the source code.
    Does the above code appear as soon as you try to 'Enable' the extension?
    Can you let me know how you get on with this version (0.2 beta)?

    Anyone else getting this problem?

    Thanks
    •  
      CommentAuthorskube
    • CommentTimeDec 20th 2007 edited
     # 5
    I installed (0.2beta) , got errors, un-installed and now when I logout I see this at the top of the login screen:
    // UserAward Table Structure
    $DatabaseTables['UserAward'] = 'UserAward';
    $DatabaseColumns['UserAward']['AwardID'] = 'AwardID';
    $DatabaseColumns['UserAward']['UserID'] = 'UserID';
    $DatabaseColumns['UserAward']['Award'] = 'Award';
    $DatabaseColumns['UserAward']['Notes'] = 'Notes';
    $DatabaseColumns['UserAward']['AwardedBy'] = 'AwardedBy';
    $DatabaseColumns['UserAward']['DateAwarded'] = 'DateAwarded';
    $DatabaseColumns['UserAward']['ShowMessage'] = 'ShowMessage'; ?>


    Where the heck is this coming from and how do I get rid of it?
  3.  # 6
    Looks like your conf/database.php file has messed up. Check it out.
    •  
      CommentAuthorHamed
    • CommentTimeDec 20th 2007
     # 7
    looks pretty sweet
    •  
      CommentAuthorskube
    • CommentTimeDec 20th 2007
     # 8
    Thanks, yeah conf/database.php had the UserAward stuff added after the php close tag (%>) which was causing the error. Deleted and everything is back to normal.
  4.  # 9
    so if i dont want to tweak around like silly, i should better wait for the next version of this extension to get a plug and play-ready extension?

    how are the options actually? :D
  5.  # 10
    Skube and fery: Sorry that you guys have had a problem.

    UserAward adds the above lines to conf/database.php using the Vanilla function 'AppendToConfigurationFile' as do several other extensions such as 'Thankful People'. Seems like there might be a problem with 'AppendToConfigurationFile'.

    skube: Are you using ASP-style <% %> tags?

    I've seen another way of achieving the same thing without having to add anything to database.php. I'll check it out and upload a new version.
  6.  # 11
    Uploaded version 0.3 Beta of UserAward.
    •  
      CommentAuthormightymango
    • CommentTimeDec 21st 2007 edited
     # 12
    Version 0.3 Beta no longer adds any lines to the conf/database.php file so should avoid the problem some users were having with this file becoming 'corrupted'.

    If you have installed an earlier version please edit your conf/database.php file to remove the following lines:

    // UserAward Table Structure
    $DatabaseTables['UserAward'] = 'UserAward';
    $DatabaseColumns['UserAward']['AwardID'] = 'AwardID';
    $DatabaseColumns['UserAward']['UserID'] = 'UserID';
    $DatabaseColumns['UserAward']['Award'] = 'Award';
    $DatabaseColumns['UserAward']['Notes'] = 'Notes';
    $DatabaseColumns['UserAward']['AwardedBy'] = 'AwardedBy';
    $DatabaseColumns['UserAward']['DateAwarded'] = 'DateAwarded';
    $DatabaseColumns['UserAward']['ShowMessage'] = 'ShowMessage';
    • CommentAuthorMark W
    • CommentTimeDec 21st 2007 edited
     # 13
    I get this Fatal error: Call to undefined function Redirect() in /usr/www/users/me/vanilla/extensions/UserAward/default.php on line 315

    My version of Vanilla hasn't been updated in 50 days...
  7.  # 14
    Mark W: UserAward requires the latest version of Vanilla (Redirect was introduced in v1.1.3).

    UserAward requires version 1.1.4 or later.
    • CommentAuthordigilee
    • CommentTimeDec 21st 2007 edited
     # 15
    i have the same error as mark W except that mine is on Line 400.

    I have just installed a new version - v1.1.4 - and added the extension.

    Any ideas?

    To expand a bit ... I installed v1.1.4, installed UserAwards, activated it.
    To set an award I click the user name and in the panel is a "make an award" link, I set this as normal, click save and then get the error.
    If I then click back button and refresh, the award is awarded.

    Update 2 - I just noticed the updated version 0.3, installed that, and now I get the error on the same line as Mark W.
    •  
      CommentAuthorSimba Cub
    • CommentTimeDec 21st 2007
     # 16
    Works great for me, superb extra - thanks!
    •  
      CommentAuthormightymango
    • CommentTimeDec 23rd 2007 edited
     # 17
    Digilee:

    AFAIK Redirect was introduced in version 1.1.2 of Vanilla. If you check:

    yourforum/library/Framework/Framework.Functions.php

    you should find it on line 688.

    If this file does not contain the function for 'Redirect' then you need to check that you do have all the latest files for Vanilla 1.1.4.
    If it does contain this function please let me know.
    • CommentAuthorudaman
    • CommentTimeDec 24th 2007 edited
     # 18
    Good job. It works fine!
  8.  # 19
    ok it works now for me, very good job mightymango, i really like it.
    but what can i do to get rid of the star icon, and the icon next to the username in those comments (forum)?

    thanks a lot :)

    ps: a "add award" - text button would be great , not in the panel, more the self guiding way right above the addon (#AcountHistory) like the userwall addon.
  9.  # 20
    I'm working on the next version which will include an option to:

    Make awards public (i.e. display to everyone not just the user)
    Turn display of awards on 'Discussion' page on or off
    Turn display of awards on 'Comments' page on or off
    Hide awards from 'Guests'

    The next version will also include an option to create, edit and delete new award types.

    Like the idea of a button on the 'Account' page. I also plan to put a 'Make an award' link next to each comment.
  10.  # 21
    Uploaded version 0.5 Beta of UserAward.
  11.  # 22
    The latest version includes the options listed above but does not yet include the option to create, edit and delete different award types.
    • CommentAuthorbmw
    • CommentTimeDec 29th 2007
     # 23
    I'm really liking where this extension is going.

    I keep getting this when I add or delete an award:
    Fatal error: Call to undefined function redirect() in /home/.batzi/cbabas/cbabaseball.com/board/extensions/UserAward/default.php on line 365

    I'm on 1.1.4 and I'm using 0.5.

    It does actually create or remove the award, it just doesn't want to jump back to the correct page.

    Is there quick way you could explain how to add, edit or delete awards in the code before you build in-Vanilla functionality for it?
    •  
      CommentAuthormightymango
    • CommentTimeDec 30th 2007 edited
     # 24
    bmw I keep getting this when I add or delete an award:
    Fatal error: Call to undefined function redirect() in /home/.batzi/cbabas/cbabaseball.com/board/extensions/UserAward/default.php on line 365

    bmw: You are not the first to report this problem with redirect().

    This function is built into Vanilla and should be available in the version you are running. Can you check the following file for me please:

    yourforum/library/Framework/Framework.Functions.php

    The redirect() function should be on about line 688.
  12.  # 25
    I have almost finished the code for creating and editing award types. It should be available in the next few days.

    In the meantime if you wish to create your own award types your will need to edit the awards.php file:

    // UserAward Awards
    $Context->UserAwardAwards = array();

    $Context->UserAwardAwards['Number'] = 3;

    $Context->UserAwardAwards['Title'][1] = 'Gold';
    $Context->UserAwardAwards['Icon'][1] = '1.png';

    $Context->UserAwardAwards['Title'][2] = 'Silver';
    $Context->UserAwardAwards['Icon'][2] = '2.png';

    $Context->UserAwardAwards['Title'][3] = 'Bronze';
    $Context->UserAwardAwards['Icon'][3] = '3.png';


    You might wish to change it to something like:

    // UserAward Awards
    $Context->UserAwardAwards = array();

    $Context->UserAwardAwards['Number'] = 2;

    $Context->UserAwardAwards['Title'][1] = 'Smile';
    $Context->UserAwardAwards['Icon'][1] = 'smile.png';

    $Context->UserAwardAwards['Title'][2] = 'Wink';
    $Context->UserAwardAwards['Icon'][2] = 'wink.jpg';


    In this example the image files (smile.png and wink.jpg) will have to be copied to the 'icons' folder.

    If you wish to use a different 'icon' for display on the 'Discussion' page just replace the 'star.png' file in the 'icons' folder (it must be called star.png though).

    Hope this makes sense.
    • CommentAuthorbmw
    • CommentTimeDec 31st 2007 edited
     # 26
    Ha ha! I had found that, and thought it didn't work. *Now* I see that I missed:$Context->UserAwardAwards['Number'] = 3;(duh.)

    No wonder Award #4 didn't show up in the options list.

    I'll check the Framework later and let you know.
    • CommentAuthorbmw
    • CommentTimeDec 31st 2007 edited
     # 27
    That's odd, redirect() is not there. I must have messed up when I updated Vanilla way back when. The files in the directory all date from 4/7/2007.

    Looks like my fault. Thanks for the help! :)

    Update:
    Re-did my upgrade, and no issues now. Thanks for pointing that out.
    • CommentAuthorbmw
    • CommentTimeDec 31st 2007
     # 28
    Just a thought, why not add something like a UserAwardAwards['MiniIcon'] and just set them all to star.png for the default files?
    • CommentAuthordigilee
    • CommentTimeJan 1st 2008
     # 29
    OK. This is getting silly now.
    I have vanilla 1.1.4 installed as a new install
    User Awards was working for me before but with the redirect error, so I uninstalled it.
    Now I update to 0.5 beta and get this error:

    Error Message
    An error occurred while retrieving data.
    Affected Elements
    UserAwardNotice.GetAwardsForUserID();

    The error occurred on or near: Table 'DATABASE.LUM_UserAward' doesn't exist

    Which renders the forum unusable.
    Turning UA off brings everything back to normal.
  13.  # 30
    Sounds like UserAward was only partly removed from your system.

    To force UserAward to recreate the database table remove the following line from conf/settings.php:

    $Configuration['USERAWARD_VERSION'] = '1.0';

    and then re-enable UserAward.
    • CommentAuthordigilee
    • CommentTimeJan 1st 2008
     # 31
    sorted, thanks.
  14.  # 32
    I'm getting a an error when I use preview post - it's is citing user award as it's problem

    anything I can do? - I can give you more details if you want
  15.  # 33
    More details would be useful thanks...
  16.  # 34
    here's the error that comes up when I hit preview post

    A fatal, non-recoverable error has occurred

    Technical information (for support personel):

    Error Message
    An error occurred while retrieving data.
    Affected Elements
    UserAwardNotice.GetAwardsForUserID();
    The error occurred on or near:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as AwardID, ua. as Award, ua. as Notes, ua. as AwardedBy, ua. as DateAwarded' at line 1

  17.  # 35
    Uploaded version 0.6 Beta of UserAward.
  18.  # 36
    cool - seems to work fine now - big thanks
    •  
      CommentAuthorHamed
    • CommentTimeJan 6th 2008
     # 37
    maybe we could use this as a gift giving system ( like facebook)

    users can choose what gift (image) to give to another member.. an dit would show up on their profile
    something like that
  19.  # 38
    is there a way to batch delete all the awards that have been given out

    I've been testing it out - just giving out silly awards so I want to reset the clock now that I have a proper use for it

    a sql command (I'm using myadminphp) would be fine

    thanks
  20.  # 39
    To force UserAward to recreate the database table remove the following line from conf/settings.php:

    $Configuration['USERAWARD_VERSION'] = '1.0';

    This will clear the database and remove all awards.
  21.  # 40
    oh cool I see - yes I wasn't sure if I was to do that because it looked like that only related to those upgrading - but that did the trick fine.

    thanks
    • CommentAuthorcre8d
    • CommentTimeJan 13th 2008
     # 41
    I am experiencing a problem using the add-on. I have two user groups set up with permission to grant/edit/revoke awards. For one of the groups, it works fine. For the other, when they click on "Make an Award", they get a blank center column, rather than the type of award and reason for it.

    Any help appreciated. Using version 0.5beta with Vanilla 1.1.4.
    •  
      CommentAuthormightymango
    • CommentTimeJan 14th 2008 edited
     # 42
    cre8d: Version 0.7b should fix this problem.
  22.  # 43
    Uploaded version 0.7 Beta of UserAward.
    • CommentAuthorcre8d
    • CommentTimeJan 14th 2008
     # 44
    Thanks - I am getting other errors now such as:

    Notice: Undefined offset: 0 in [....]/extensions/UserAward/default.php on line 67
    Notice: Undefined index: 2 in [....]/extensions/UserAward/default.php on line 564
    •  
      CommentAuthormightymango
    • CommentTimeJan 14th 2008 edited
     # 45
    cre8d Sorry just noticed that when I uploaded 0.7b a few files were missing which caused your errors.
    Please download the latest set of files.
  23.  # 46
    Uploaded version 0.7 Beta of UserAward.
  24.  # 47
    Uploaded version 0.7.1 Beta of UserAward.
    • CommentAuthorcre8d
    • CommentTimeJan 15th 2008
     # 48
    Thanks so much, all is working now :)
    • CommentAuthorlegioner
    • CommentTimeJan 17th 2008 edited
     # 49
    it is not working now, if the users can edit an award or remove an award etc. there is no problem but if i uncheck this points i have this error, only the admins can see the account page, in other ways users can not see the account pages, if they can not change award things

    Notice: Undefined variable: AccountUserID in public_html/forum/extensions/UserAward/default.php on line 507
    • CommentAuthorStalyn
    • CommentTimeJan 24th 2008
     # 50
    I have the same problem as legioner. Any help yet?