Thread: Major Additions - Yet Another Awards System
View Single Post
  #1793  
Old 12-23-2015, 11:35 AM
alcazarx's Avatar
alcazarx alcazarx is offline
 
Join Date: Jul 2014
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by squidsk View Post
The easiest way to do that would be have them do it from modcp by copying the award_request.php file to modcp and replacing the permission condition at the top with the one from modcp/award.php.
Great idea, thanks.
<-- wonders why we didnt think up of that idea ,we did something similar in the past with approving of newly registered members via the modcp.

/* another edit
Our mods reported that they cant "see" the new file in ModCP. So you have to edit the plugin "YAAS - Give Award to User Nav -> mod_index_navigation" in ACP so it looks like
Code:
// ************************************************* 
    if ($vbulletin->options['aw_modcp']) 
    { 
        construct_nav_option($vbphrase['give_user_award'], 'award.php?do=manage'); 
        construct_nav_option($vbphrase['yaas_edit_delete_user_award'], 'award_user.php?do=search'); 
        construct_nav_option($vbphrase['award_requests'], 'award_requests.php?do=display'); 
        construct_nav_group($vbphrase['award_system']); 
        construct_nav_spacer(); 
    }
Thanks.
*/

As for permissions - you are the author and decide it - for me it would be sufficient to implement the "can view award list" permission for groups and the "moderator can give this award in modcp" option (when managing awards), both described (and code provided) in earlier posts.
Custom admin permission for the award plugin itself we have already working.

/* edit
Included the code changes for custom admin permission.
Note: These are direct code changes! Use at your own risk!
(Yeah boo me coders and staff, but we are not used to the plugin system and not everything can be done with the hook system.)
*/
Attached Files
File Type: txt vb4_award_changes.txt (6.3 KB, 13 views)
Reply With Quote
Благодарность от:
CAG CheechDogg
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01324 seconds
  • Memory Usage 1,790KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_box_bit
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete