Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
vBulletin Project Tools - Color to Indicate Status Details »»
vBulletin Project Tools - Color to Indicate Status
Version: 1.00, 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-17-2007 Last Update: Never Installs: 18
Uses Plugins Template Edits
Code Changes Is in Beta Stage  
No support by the author.

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!

Supporters / CoAuthors

Show Your Support

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

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

I would really LOVE to get some help intergrating Java directly into the AdminCP like is built into the vBulletin Style Manager. I fought with that code for way too many hours before I decided to release this as is.

I also wanted to rework the main Issue Type Manager Page to show the color on there with a handy little Java script but again, I couldn't get it done!

I will not have internet access after tomorrow for about a week because of travel. I will help anybody that needs help until I leave tomorrow and I welcome someone else to help improve this and perhaps we can get this included in the standard code in Project Tools in a future release!

No copyrights claimed or otherwise... I really want to see this as a standard feature...
Reply With Quote
  #3  
Old 08-18-2007, 08:42 AM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good job Quarterbore, this should become a Project Tool Standard.
Colorizing the status makes the tool more easy to use.
Reply With Quote
  #4  
Old 08-18-2007, 09:10 AM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes!
it should be standard, specialy this is just possible with an fileedit
Reply With Quote
  #5  
Old 08-18-2007, 09:12 PM
jgommel's Avatar
jgommel jgommel is offline
 
Join Date: Jun 2005
Location: Ohio
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've made all the file edits, template edit and updated my Issue Types (added Hex color values) under the Issue Type Manager, but I don't see anything. I checked the vBulletin Project Tools - Color to Indicate Status install to be sure the table column installed correctly (it did), the install and edits all seem to be ok, but nothing changes.

Note: I also ran the Update Counters within Project Tools just in-case.
Reply With Quote
  #6  
Old 08-18-2007, 10:51 PM
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've made all the file edits, template edit and updated my Issue Types (added Hex color values) under the Issue Type Manager, but I don't see anything. I checked the vBulletin Project Tools - Color to Indicate Status install to be sure the table column installed correctly (it did), the install and edits all seem to be ok, but nothing changes.

Note: I also ran the Update Counters within Project Tools just in-case.
Did you install the product file and is the plugin active? (Product : Project Tools Status Colors)

Did you remember to edit the template in the style you are looking at? If you have multiple styles, you need to either apply this to the parent style of the rest or hack every style you want this to be shown in.

If the color shows in the AdminCP you have the hard parts done corectly! Your issue is either the plugin that pulls the color from the database based on statusid or the template edits that shows the color itself!
Reply With Quote
  #7  
Old 08-18-2007, 10:58 PM
jgommel's Avatar
jgommel jgommel is offline
 
Join Date: Jun 2005
Location: Ohio
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Quarterbore View Post
Did you remember to edit the template in the style you are looking at? If you have multiple styles, you need to either apply this to the parent style of the rest or hack every style you want this to be shown in.
I only have one style installed, so that's not the issue.

Quote:
Originally Posted by Quarterbore View Post
I also assume you installed the product file and that the plugin is active as well...
Yea, it's installed (that's how I was able to check the database to be sure the /xml script added the column to the appropriate table.
Reply With Quote
  #8  
Old 08-19-2007, 01:03 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 only have one style installed, so that's not the issue.



Yea, it's installed (that's how I was able to check the database to be sure the /xml script added the column to the appropriate table.
Yea, then you are correct, it should work?

Can you post a link to your project tools with some project where it should show colors along with a hint about which status that is shown should have a color code and what the color should be? You may also need to allow guests to see your PT for me to see as well.

I want to look at the source code for your project page to see your template edits.

You can see it on my sites:

http://www.vbclassified.com/project....typeid=feature

and

http://www.timeshareforums.com/forum...ssuetypeid=bug
Reply With Quote
  #9  
Old 08-20-2007, 06:27 AM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,

I would have been much easier if you could use the cpcolorpicker popup to select a color value hex instead of having to surf seperated websites all the time when you need one.I know it has something todo with these vBulletin stuff
  • /clientscript/vbulletin_cpcolorpicker.js
  • construct_color_picker();
  • construct_color_row();

the last function should return an input row with a color widget next to it you can double click and that should invoke the colorpickerpopup but i can't get it to work anybody knows how to get it ?
Reply With Quote
  #10  
Old 08-21-2007, 01:29 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,

We are getting there i just keep on getting a javascript error when i click the button that should popup a DHTML popup colorpicker but i will see if i can find the problem ...

Edit:in firefox the colorpicker is showing but when you click a color nothing happens ... allright one step at a time lol
Reply With Quote
Reply

Thread Tools

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 06:21 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.06547 seconds
  • Memory Usage 2,375KB
  • Queries Executed 24 (?)
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
  • (18)bbcode_php
  • (4)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
  • (2)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