Back to vBulletin 3.6 Add-ons

vBulletin Project Tools - Color to Indicate Status
Mod Version: 1.00, by Quarterbore

This modification is in the archives.
vB Version: 3.6.8 Rating: (4 votes - 4.75 average) Installs: 18
Released: 18 Aug 2007 Last Update: Never Downloads: 77
Not Supported Uses Plugins Template Edits Code Changes Is in Beta Stage  

Background:

I am a visual person and with the project(s) I will be using using Project Tools with I need to be able to quickly look at my pages to determine if I still have outstanding issues that need to be addressed. This modification makes it easier for me to keep track of the issues that I have to still address.

About the Modification:

I am posting this here with the hope that vBulletin takes the code and improves it and turns this into a standard feature of project tools. There are lots of ways this script could be improved but java is not my strong suite and I hope by posing this here someone else can help improve this!

The Modifications that are needed:

Two files must be edited.
Install a product file with one small phrase and a small pluggin.
Edit one template

OK, let the fun begin!

STEP 1: Install the Attached Product File!

STEP 2: A Bunch of File Edits!

OPEN FILE /AdminCP/project.php

FIND

PHP Code:
if ($_POST['do'] == 'statusupdate')
{
    
$vbulletin->input->clean_array_gpc('p', array(
        
'issuestatusid' => TYPE_UINT,
        
'title' => TYPE_STR,
        
'issuetypeid' => TYPE_STR,
        
'displayorder' => TYPE_UINT,
        
'canpetitionfrom' => TYPE_UINT
    
)); 
REPLACE WITH:

PHP Code:
if ($_POST['do'] == 'statusupdate')
{
    
$vbulletin->input->clean_array_gpc('p', array(
        
'issuestatusid' => TYPE_UINT,
        
'title' => TYPE_STR,
        
'issuetypeid' => TYPE_STR,
        
'displayorder' => TYPE_UINT,
        
'canpetitionfrom' => TYPE_UINT,
        
'background' => TYPE_STR
    
)); 
FIND:

PHP Code:
    $statusdata->set('displayorder'$vbulletin->GPC['displayorder']);
    
$statusdata->set('canpetitionfrom'$vbulletin->GPC['canpetitionfrom']);
    
$statusdata->set_info('title'$vbulletin->GPC['title']);
    
$statusdata->save();

    
define('CP_REDIRECT''project.php?do=typelist');
    
print_stop_message('issue_status_saved');


REPLACE WITH:

PHP Code:
    $statusdata->set('displayorder'$vbulletin->GPC['displayorder']);
    
$statusdata->set('canpetitionfrom'$vbulletin->GPC['canpetitionfrom']);
    
$statusdata->set_info('title'$vbulletin->GPC['title']);
    
$statusdata->set('background'$vbulletin->GPC['background']);
    
$statusdata->save();

    
define('CP_REDIRECT''project.php?do=typelist');
    
print_stop_message('issue_status_saved');

FIND:

PHP Code:
        $issuestatus = array(
            
'issuestatusid' => 0,
            
'issuetypeid' => $vbulletin->GPC['type'],
            
'displayorder' => $maxorder['maxorder'] + 10,
            
'canpetitionfrom' => 1,
            
'title' => ''
        
);
    } 
REPLACE WITH:

PHP Code:
        $issuestatus = array(
            
'issuestatusid' => 0,
            
'issuetypeid' => $vbulletin->GPC['type'],
            
'displayorder' => $maxorder['maxorder'] + 10,
            
'canpetitionfrom' => 1,
            
'title' => '',
            
'background' => $vbulletin->GPC['background']
        );
    } 
FIND:

PHP Code:
    print_input_row($vbphrase['display_order'], 'displayorder'$issuestatus['displayorder'], true5);
    
print_yes_no_row($vbphrase['can_create_petitions_from_this_status'], 'canpetitionfrom'$issuestatus['canpetitionfrom']);

    
construct_hidden_code('issuestatusid'$issuestatus['issuestatusid']);
    
print_submit_row();


REPLACE WITH:

PHP Code:
    print_input_row($vbphrase['display_order'], 'displayorder'$issuestatus['displayorder'], true5);
    
print_yes_no_row($vbphrase['can_create_petitions_from_this_status'], 'canpetitionfrom'$issuestatus['canpetitionfrom']);
    
print_input_row($vbphrase['background_color'], 'background'$issuestatus['background'], true5);

    
construct_hidden_code('issuestatusid'$issuestatus['issuestatusid']);
    
print_submit_row();


FIND:

PHP Code:
if ($_REQUEST['do'] == 'statusadd' OR $_REQUEST['do'] == 'statusedit')
{
    
$vbulletin->input->clean_array_gpc('r', array(
        
'issuestatusid' => TYPE_UINT,
        
'type' => TYPE_STR
    
)); 
REPLACE WITH

PHP Code:
if ($_REQUEST['do'] == 'statusadd' OR $_REQUEST['do'] == 'statusedit')
{
    
$vbulletin->input->clean_array_gpc('r', array(
        
'issuestatusid' => TYPE_UINT,
        
'type' => TYPE_STR,
        
'background' => TYPE_STR
    
)); 

OPEN FILE includes/class_dm_pt_issuestatus.php

FIND:

PHP Code:
    var $validfields = array(
        
'issuestatusid'    => array(TYPE_UINTREQ_INCR),
        
'issuetypeid'      => array(TYPE_STR,  REQ_YES),
        
'displayorder'     => array(TYPE_UINTREQ_NO),
        
'canpetitionfrom'  => array(TYPE_UINTREQ_NO),
    ); 
REPLACE WITH:

PHP Code:
    var $validfields = array(
        
'issuestatusid'    => array(TYPE_UINTREQ_INCR),
        
'issuetypeid'      => array(TYPE_STR,  REQ_YES),
        
'displayorder'     => array(TYPE_UINTREQ_NO),
        
'canpetitionfrom'  => array(TYPE_UINTREQ_NO),
        
'background' => array(TYPE_STRREQ_NO),
    ); 
STEP 3: EDIT template pt_issuebit

NOTE - You can change as many or as few cells in row of each issue. In this example I did the first three as shown in the attached image!

FIND:
PHP Code:
<td class="alt2" align="center"
REPLACE WITH:
PHP Code:
<td class="alt2" align="center" style="background-color: $issue[background]"
FIND:
PHP Code:
<td class="alt1" align="$stylevar[left]"
REPLACE WITH:
PHP Code:
<td class="alt1" align="$stylevar[left]style="background-color: $issue[background]"
FIND:
PHP Code:
<td class="alt2 smallfont" align="$stylevar[right]nowrap="nowrap"
REPLACE WITH:
PHP Code:
<td class="alt2 smallfont" align="$stylevar[right]nowrap="nowrap" style="background-color: $issue[background]"
I also did the same edits to all of the cells on my site and attached a screen shot as an example!

Well, if I didn't scare you off and you are still reading... Just remember to use the color codes as the six digit hexadecimal values with the number sign. Here are the ones I am using:

#FFFFFF - White
#FFFFCC - Pastel Yellow
#CCFFFF - Pastel Blue
#FFCCFF - Pastel Pink

Note that I use color for issues that need my attention. I use white for the issues that I can ignore... But obviously you can use any colors you want! Now, if you do not add a color value, your site will use the default style colors as well!

Download

This modification is archived, downloads are still allowed.

File Type: %1$s product-pt_status_colors.xml (1.4 KB, 78 downloads)

Supporters / CoAuthors

  • Delphiprogrammi

Screenshots

Click image for larger version
Name:	Color_Status.jpg
Views:	436
Size:	62.0 KB
ID:	68631   Click image for larger version
Name:	color_2.jpg
Views:	452
Size:	84.6 KB
ID:	68633  


vblts.ru supports vBulletin®, 2022-2024