Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Project Tools - Create Project Managers who get PM on New or Replies to issues Details »»
Project Tools - Create Project Managers who get PM on New or Replies to issues
Version: 1.10, by Quarterbore Quarterbore is offline
Developer Last Online: Aug 2020 Show Printable Version Email this Page

Category: vBulletin Project Tools - Version: 3.6.8 Rating:
Released: 08-14-2007 Last Update: 08-15-2007 Installs: 23
DB Changes Uses Plugins Template Edits
Code Changes Is in Beta Stage  
No support by the author.

I am a new customer to vBulletin Project tools but I was very disapointed to discover that there was no notification when a new issue was added or replied to in vBulletin Projects.

What does this do?

This modification will create a new field in your projects database where "project managers" as determined by their username is stored. These "project managers" will get PMs when a new issue is added to the system and/or they will get a PM when a reply is posted to a topic that they are the project manager for.

How do I install this?

Step 1: Download the attached product file and install it like you install any vBulletin product file.

Step 2: Then you need to perform the following code edits:

OPEN FILE: admincp/projects.php

FIND:

PHP Code:
if ($_POST['do'] == 'projectupdate')
{
    
$vbulletin->input->clean_array_gpc('p', array(
        
'projectid' => TYPE_UINT,
        
'displayorder' => TYPE_UINT,
        
'title' => TYPE_STR,
        
'summary' => TYPE_STR,
        
'description' => TYPE_STR,
        
'startstatus' => TYPE_ARRAY_UINT,
        
'permissionbase' => TYPE_UINT,
        
'options' => TYPE_ARRAY_UINT,
        
'afterforumids' => TYPE_ARRAY_UINT,
        
'forumtitle' => TYPE_STR
    
)); 
REPLACE WITH

PHP Code:
    if ($_POST['do'] == 'projectupdate')
    {
        
$vbulletin->input->clean_array_gpc('p', array(
            
'projectid' => TYPE_UINT,
            
'displayorder' => TYPE_UINT,
            
'title' => TYPE_STR,
            
'summary' => TYPE_STR,
            
'managers' => TYPE_STR,
            
'description' => TYPE_STR,
            
'startstatus' => TYPE_ARRAY_UINT,
            
'permissionbase' => TYPE_UINT,
            
'options' => TYPE_ARRAY_UINT,
            
'afterforumids' => TYPE_ARRAY_UINT,
            
'forumtitle' => TYPE_STR
    
)); 
FIND

PHP Code:
    $projectdata->set('displayorder'$vbulletin->GPC['displayorder']);
    
$projectdata->set('title'$vbulletin->GPC['title']);
    
$projectdata->set('summary'$vbulletin->GPC['summary']);
    
$projectdata->set('description'$vbulletin->GPC['description']);
    
$projectdata->set('options'array_sum($vbulletin->GPC['options']));
    
$projectdata->set('afterforumids'implode(','$vbulletin->GPC['afterforumids']));
    
$projectdata->set('forumtitle'$vbulletin->GPC['forumtitle']); 
REPLACE WITH:

PHP Code:
    $projectdata->set('displayorder'$vbulletin->GPC['displayorder']);
    
$projectdata->set('title'$vbulletin->GPC['title']);
    
$projectdata->set('summary'$vbulletin->GPC['summary']);
    
$projectdata->set('managers'$vbulletin->GPC['managers']);
    
$projectdata->set('description'$vbulletin->GPC['description']);
    
$projectdata->set('options'array_sum($vbulletin->GPC['options']));
    
$projectdata->set('afterforumids'implode(','$vbulletin->GPC['afterforumids']));
    
$projectdata->set('forumtitle'$vbulletin->GPC['forumtitle']); 
FIND

PHP Code:
print_input_row($vbphrase['title_in_forum_list'], 'forumtitle'$project['forumtitle']); 
AFTER ADD

PHP Code:
    // ADD PROJECT MANAGERS START
    
print_textarea_row("$vbphrase[vbproject_managers]<dfn>$vbphrase[vbproject_one_name_per_line]</dfn>"'managers'$project['managers'], 660);
    
// ADD PROJECT MANAGERS END 

OPEN FILE: includes/class_dm_pt_project.php

FIND:

PHP Code:
        var $validfields = array(
            
'projectid'      => array(TYPE_UINT,       REQ_INCR),
            
'displayorder'   => array(TYPE_UINT,       REQ_NO),
            
'title'          => array(TYPE_STR,        REQ_YES),
            
'title_clean'    => array(TYPE_NOHTMLCONDREQ_AUTO),
            
'summary'        => array(TYPE_STR,        REQ_NO),
            
'summary_clean'  => array(TYPE_NOHTMLCONDREQ_AUTO),
            
'description'    => array(TYPE_STR,        REQ_NO),
            
'options'        => array(TYPE_UINT,       REQ_NO),
            
'afterforumids'  => array(TYPE_STR,        REQ_NOVF_METHOD'verify_commalist'),
            
'forumtitle'     => array(TYPE_STR,        REQ_NO)
    ); 
REPLACE WITH:

PHP Code:
        var $validfields = array(
            
'projectid'      => array(TYPE_UINT,       REQ_INCR),
            
'displayorder'   => array(TYPE_UINT,       REQ_NO),
            
'title'          => array(TYPE_STR,        REQ_YES),
            
'title_clean'    => array(TYPE_NOHTMLCONDREQ_AUTO),
            
'summary'        => array(TYPE_STR,        REQ_NO),
            
'managers'        => array(TYPE_STR,        REQ_NO),
            
'summary_clean'  => array(TYPE_NOHTMLCONDREQ_AUTO),
            
'description'    => array(TYPE_STR,        REQ_NO),
            
'options'        => array(TYPE_UINT,       REQ_NO),
            
'afterforumids'  => array(TYPE_STR,        REQ_NOVF_METHOD'verify_commalist'),
            
'forumtitle'     => array(TYPE_STR,        REQ_NO)
    ); 
Please note, I am posting this early as I need this capability for my own site and I am hoping to get some feedback on how I can improve this. I just coded it this evening and I only have one vBulletin Projects license so I have only tested this on my one site but I believe this should work for anyone...

Version History:
Version 1.0
- First Release
Version 1.1
- Now a project manager will not get a PM about their OWN new posts or replies to posts.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-15-2007, 03:28 AM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved for version history or ???
Reply With Quote
  #3  
Old 08-15-2007, 04:45 AM
jgommel's Avatar
jgommel jgommel is offline
 
Join Date: Jun 2005
Location: Ohio
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm receiving the following error when I try to access the Project Manager under the Admincp > Project Toosl > Project Manager

Code:
Parse error: syntax error, unexpected T_STRING in /home/neosmutc/public_html/vb/admincp/project.php on line 2282
Reply With Quote
  #4  
Old 08-15-2007, 11:10 AM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jgommel View Post
I'm receiving the following error when I try to access the Project Manager under the Admincp > Project Toosl > Project Manager

Code:
Parse error: syntax error, unexpected T_STRING in /home/----------------------/admincp/project.php on line 2282
Can you confirm your code edits? Your error is in the area where you needed to add the "managers" value to the "clean array" function so I assume you have a typo.

The code hack is the first set of FIND and REPLACE posted above in the /admincp/project.php file.

The code on your site should look like this:

PHP Code:
// ########################################################################

if ($_POST['do'] == 'projectupdate')
{
    
$vbulletin->input->clean_array_gpc('p', array(
        
'projectid' => TYPE_UINT,
        
'displayorder' => TYPE_UINT,
        
'title' => TYPE_STR,
        
'summary' => TYPE_STR,
        
'managers' => TYPE_STR,
        
'description' => TYPE_STR,
        
'startstatus' => TYPE_ARRAY_UINT,
        
'permissionbase' => TYPE_UINT,
        
'options' => TYPE_ARRAY_UINT,
        
'afterforumids' => TYPE_ARRAY_UINT,
        
'forumtitle' => TYPE_STR
    
));

    if (empty(
$vbulletin->GPC['title'])) 
Reply With Quote
  #5  
Old 08-15-2007, 10:36 PM
jgommel's Avatar
jgommel jgommel is offline
 
Join Date: Jun 2005
Location: Ohio
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What file versions are you editing? I was able to re-apply the the file edits and import the project xml, but I don't see anything when editing or adding a project.

My project.php file version is: RCS: $Revision: 17792 $
My class_dm_pt_project.php file version is: RCS: $Revision: 17792 $
Reply With Quote
  #6  
Old 08-15-2007, 11:12 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm, looks like I forgot to add a file edit...

I have updated the directions in the original post. Note that I added the code where it says "ADD AFTER" and this will give you a field where you can actually add the Project Managers.

Sorry for the confusion!
Reply With Quote
  #7  
Old 08-16-2007, 01:26 AM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a very userful add-on. Thanks!
Reply With Quote
  #8  
Old 08-16-2007, 09:04 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I updated the script so that now it will check if the new topic or the reply to the topic was posted by one of project managers. If the post was made by one of the project managers, that project manager will now NOT get a notification that they posted a new topic or reply :erm:
Reply With Quote
  #9  
Old 08-20-2007, 02:19 AM
jgommel's Avatar
jgommel jgommel is offline
 
Join Date: Jun 2005
Location: Ohio
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I narrowed this issue down to this mod...

When assigning a username to a Task or a Feature, I get the following Fatal Error:

Code:
Fatal error:

    * Invalid recipient username. Please press the back button, enter the correct username and try again. Click Here to See the Members List

Unable to proceed with save while $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 765
What's strange is that the user still ends up being assigned to the Task or Feature?!?! So far, this only appears to be an issue with Task and Feature Assignment. I don't see the error on Bug Assignments.

If I disable the mod, all's well.
Reply With Quote
  #10  
Old 08-24-2007, 01:20 AM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am traveling this week and I can't look at this here. I will look at it when I get back home (my work laptop is limited)...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:16 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04368 seconds
  • Memory Usage 2,363KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (9)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete