Quarterbore
08-17-2007, 10:00 PM
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
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:
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:
$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:
$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:
$issuestatus = array(
'issuestatusid' => 0,
'issuetypeid' => $vbulletin->GPC['type'],
'displayorder' => $maxorder['maxorder'] + 10,
'canpetitionfrom' => 1,
'title' => ''
);
}
REPLACE WITH:
$issuestatus = array(
'issuestatusid' => 0,
'issuetypeid' => $vbulletin->GPC['type'],
'displayorder' => $maxorder['maxorder'] + 10,
'canpetitionfrom' => 1,
'title' => '',
'background' => $vbulletin->GPC['background']
);
}
FIND:
print_input_row($vbphrase['display_order'], 'displayorder', $issuestatus['displayorder'], true, 5);
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:
print_input_row($vbphrase['display_order'], 'displayorder', $issuestatus['displayorder'], true, 5);
print_yes_no_row($vbphrase['can_create_petitions_from_this_status'], 'canpetitionfrom', $issuestatus['canpetitionfrom']);
print_input_row($vbphrase['background_color'], 'background', $issuestatus['background'], true, 5);
construct_hidden_code('issuestatusid', $issuestatus['issuestatusid']);
print_submit_row();
}
FIND:
if ($_REQUEST['do'] == 'statusadd' OR $_REQUEST['do'] == 'statusedit')
{
$vbulletin->input->clean_array_gpc('r', array(
'issuestatusid' => TYPE_UINT,
'type' => TYPE_STR
));
REPLACE WITH
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:
var $validfields = array(
'issuestatusid' => array(TYPE_UINT, REQ_INCR),
'issuetypeid' => array(TYPE_STR, REQ_YES),
'displayorder' => array(TYPE_UINT, REQ_NO),
'canpetitionfrom' => array(TYPE_UINT, REQ_NO),
);
REPLACE WITH:
var $validfields = array(
'issuestatusid' => array(TYPE_UINT, REQ_INCR),
'issuetypeid' => array(TYPE_STR, REQ_YES),
'displayorder' => array(TYPE_UINT, REQ_NO),
'canpetitionfrom' => array(TYPE_UINT, REQ_NO),
'background' => array(TYPE_STR, REQ_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:
<td class="alt2" align="center">
REPLACE WITH:
<td class="alt2" align="center" style="background-color: $issue[background]">
FIND:
<td class="alt1" align="$stylevar[left]">
REPLACE WITH:
<td class="alt1" align="$stylevar[left]" style="background-color: $issue[background]">
FIND:
<td class="alt2 smallfont" align="$stylevar[right]" nowrap="nowrap">
REPLACE WITH:
<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!
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
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:
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:
$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:
$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:
$issuestatus = array(
'issuestatusid' => 0,
'issuetypeid' => $vbulletin->GPC['type'],
'displayorder' => $maxorder['maxorder'] + 10,
'canpetitionfrom' => 1,
'title' => ''
);
}
REPLACE WITH:
$issuestatus = array(
'issuestatusid' => 0,
'issuetypeid' => $vbulletin->GPC['type'],
'displayorder' => $maxorder['maxorder'] + 10,
'canpetitionfrom' => 1,
'title' => '',
'background' => $vbulletin->GPC['background']
);
}
FIND:
print_input_row($vbphrase['display_order'], 'displayorder', $issuestatus['displayorder'], true, 5);
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:
print_input_row($vbphrase['display_order'], 'displayorder', $issuestatus['displayorder'], true, 5);
print_yes_no_row($vbphrase['can_create_petitions_from_this_status'], 'canpetitionfrom', $issuestatus['canpetitionfrom']);
print_input_row($vbphrase['background_color'], 'background', $issuestatus['background'], true, 5);
construct_hidden_code('issuestatusid', $issuestatus['issuestatusid']);
print_submit_row();
}
FIND:
if ($_REQUEST['do'] == 'statusadd' OR $_REQUEST['do'] == 'statusedit')
{
$vbulletin->input->clean_array_gpc('r', array(
'issuestatusid' => TYPE_UINT,
'type' => TYPE_STR
));
REPLACE WITH
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:
var $validfields = array(
'issuestatusid' => array(TYPE_UINT, REQ_INCR),
'issuetypeid' => array(TYPE_STR, REQ_YES),
'displayorder' => array(TYPE_UINT, REQ_NO),
'canpetitionfrom' => array(TYPE_UINT, REQ_NO),
);
REPLACE WITH:
var $validfields = array(
'issuestatusid' => array(TYPE_UINT, REQ_INCR),
'issuetypeid' => array(TYPE_STR, REQ_YES),
'displayorder' => array(TYPE_UINT, REQ_NO),
'canpetitionfrom' => array(TYPE_UINT, REQ_NO),
'background' => array(TYPE_STR, REQ_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:
<td class="alt2" align="center">
REPLACE WITH:
<td class="alt2" align="center" style="background-color: $issue[background]">
FIND:
<td class="alt1" align="$stylevar[left]">
REPLACE WITH:
<td class="alt1" align="$stylevar[left]" style="background-color: $issue[background]">
FIND:
<td class="alt2 smallfont" align="$stylevar[right]" nowrap="nowrap">
REPLACE WITH:
<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!