vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   New Posting Features - [HTL] & [TXT] Request/Bugs Tracker (formally vB-Bugs) (https://vborg.vbsupport.ru/showthread.php?t=63964)

Olate 07-03-2004 04:42 PM

I have now installed this hack onto 2 forums sucessfully. However, there are a couple of issues you should be aware of:
  1. If you have specified a table prefix in includes/config.php of your vB installation, this hack will not install correctly because the table prefixes are not used when creating the tables in the installer. Even if you manage to get it to install, it won't work correctly because the table prefixes are not in every SQL query. But if you are not using table prefixes, you will be fine. This hack will install without any problems through the HTL.
  2. I have tried several times to get the manual installation to work. But when it comes to importing the settings, I can't get them to import correctly. The safest way is to use the HTL to install it. If anyone has used the manual installation sucessfully, I'd like to know how they imported the settings from the XML file.

A useful feature I needed was e-mail notification upon the addition of a new bug and a bug not. So I have added this. It is a very simple addition which I intend to improve later this evening (along with some other stuff). It uses a hard coded e-mail address to send the messages to and from. If you wish to add this to your copy, then do the following:

1. Open bugs.php. Locate (around line 463)

PHP Code:

        // Redirect to the bug
        
$url "bugs.php?$session[sessionurl]do=showdetails&id=$bug[id]";
        eval(
print_standard_redirect('redirect_postthanks'));
    } else {
        eval(
print_standard_error('bugnote_text_missing'));    // i think this is causing an error
    
}


Before, add:

PHP Code:

        $message "A new note has been added to bug ID# " $bug[id] . ":\n\n" $text ."\n\nYou can view this bug at http://www.yourdomain.com/directory/bugs.php?do=showdetails&id=".$bug[id];
        
        
// E-Mail
        
mail('to@email.com''[Tracker] New Note'$message,
         
"From: [email]from@email.com[/email]\r\n" .
         
"Reply-To: [email]replyto@email.com[/email]\r\n" .
         
"X-Mailer: PHP/" phpversion()); 

This will send out a simple message when a new bug is added to include the name, description and URL.

2. Open bugs.php. Locate (around line 428)

PHP Code:

        $url "bugs.php?$session[sessionurl]&do=showdetails&id=$id";
        eval(
print_standard_redirect('redirect_postthanks'));    
    } else {    
        
$bugpreview construct_errors($errors);
        
$_REQUEST['do'] = "add";    // go back to the "Submit" bug report screen
    
}


Before, add:
PHP Code:

        $bug_result $DB_site->query('SELECT id, name, description FROM ' TABLE_PREFIX 'bugs WHERE (id = ' $id ')');
        
$bug $DB_site->fetch_array($bug_result);
        
        
$message "A new bug (ID# " $id ") has been submitted: \n\nName: " $bug['name'] . "\nDescription: " $bug['description'] . "\n\nYou can view this bug at http://www.yourdomain.com/directory/bugs.php?do=showdetails&id=" $id;
        
        
// E-Mail
        
mail('to@email.com''[Tracker] New Entry'$message,
         
"From: [email]from@email.com[/email]\r\n" .
         
"Reply-To: [email]replyto@email.com[/email]\r\n" .
         
"X-Mailer: PHP/" phpversion()); 

This will send an e-mail when a new note is added to a bug along with the note itself and a link to the bug.

Finally, for those of you who a) use table prefixes and/or b) don't want to add the mail hacks above themselves, I've attached the bugs.php and admincp/bugsadmin.php files with both those changes/fixes in. Just overwrite your copies.

I will not support these changes officially, although I may help out if I get time in this thread. If you want me to help with the installation or bug fixes, I'll happily do this as commercial paid work if you want to PM me.

ixian 07-04-2004 11:22 PM

Excellent Olate. If you could just modify it so that it grabbed the email of the bug poster/updater to be the one emailed instead of hard coding it this would be almost perfect.

Olate 07-05-2004 07:09 AM

Quote:

Originally Posted by ixian
Excellent Olate. If you could just modify it so that it grabbed the email of the bug poster/updater to be the one emailed instead of hard coding it this would be almost perfect.

Done. Update your bugs.php with the attached file. You will need to open it and edit lines 48 and 49 to set your default e-mail address and the URL to bugs.php.

A demo can be found at http://www.olate.com/forums/bugs.php

Change Log

20/04/04 v1.0.0
Original from https://vborg.vbsupport.ru/showthread.php?t=63964

03/07/04 v1.1.0
bugs.php
  • Added TABLE_PREFIX to all SQL queries
  • Added simple e-mail notifications after adding bug and bug note.
03/07/04 v1.2.0
bugs.php
  • Code tidying and standardisation
  • Fixed bug with Call to undefined function: construct_errors() with doaddbug
05/07/04 v1.3.0
bugs.php
  • Fixed bug with selected status being reset to default even if different one select when admin adds a bug
  • E-mail will now be sent to a default admin and the user the bug is assigned to when a new bug is added
  • On addition of a bug note, an e-mail will be sent to a default admin, the user assigned to and the original submitter (if the submittor is not the assigned to admin)
  • Default admin e-mail address and URL to bugs.php can now be specified at the top of the file (lines 48, 49)

Boofo 07-05-2004 07:17 AM

Quote:

Originally Posted by Olate
Done. Update your bugs.php with the attached file. You will need to open it and edit lines 48 and 49 to set your default e-mail address and the URL to bugs.php.

A demo can be found at http://www.olate.com/forums/bugs.php

Change Log

20/04/04 v1.0.0
Original from https://vborg.vbsupport.ru/showthread.php?t=63964

03/07/04 v1.1.0
bugs.php
  • Added TABLE_PREFIX to all SQL queries
  • Added simple e-mail notifications after adding bug and bug note.
03/07/04 v1.2.0
bugs.php
  • Code tidying and standardisation
  • Fixed bug with Call to undefined function: construct_errors() with doaddbug
05/07/04 v1.3.0
bugs.php
  • Fixed bug with selected status being reset to default even if different one select when admin adds a bug
  • E-mail will now be sent to a default admin and the user the bug is assigned to when a new bug is added
  • On addition of a bug note, an e-mail will be sent to a default admin, the user assigned to and the original submitter (if the submittor is not the assigned to admin)
  • Default admin e-mail address and URL to bugs.php can now be specified at the top of the file (lines 48, 49)

Ok, is there a viable working hack here that doiesn't have all the ptoblems I had when I first started messing with it? I would like to install it if it is. ;)

Olate 07-05-2004 07:51 AM

Quote:

Originally Posted by Boofo
Ok, is there a viable working hack here that doiesn't have all the ptoblems I had when I first started messing with it? I would like to install it if it is. ;)

Well you can install it if you have the HTL and aren't using table prefixes. :ninja: I installed it onto a test board using the HTL then moved it across to my live board manually without the HTL. That was difficult though and meant a restore of some of my database tables until I got it right (on the 2nd go).

Some more changes:

05/07/04 v1.3.1
bugs.php
  • Fixed bug with notification e-mails
  • Added $vboptions['notification_from_address']
  • Changed to $vboptions['notification_to_address']
  • Set up checks so multiple copies of the same message are not mailed to the same person if they are the admin, submitter and/or bug note poster
  • Removed references to Olate in the message texts and subject
  • Added separator between bug details/note in e-mail
  • Added default 'Unassigned' text if bug is not assigned when submitted rather than being blank

Boofo 07-05-2004 08:09 AM

Quote:

Originally Posted by Olate
Well you can install it if you have the HTL and aren't using table prefixes. :ninja: I installed it onto a test board using the HTL then moved it across to my live board manually without the HTL. That was difficult though and meant a restore of some of my database tables until I got it right (on the 2nd go).

Some more changes:

05/07/04 v1.3.1
bugs.php
  • Fixed bug with notification e-mails
  • Added $vboptions['notification_from_address']
  • Changed to $vboptions['notification_to_address']
  • Set up checks so multiple copies of the same message are not mailed to the same person if they are the admin, submitter and/or bug note poster
  • Removed references to Olate in the message texts and subject
  • Added separator between bug details/note in e-mail
  • Added default 'Unassigned' text if bug is not assigned when submitted rather than being blank

I don't use table prefixes but I also don't use HTL. Never saw a need for it because it restricts too many programs from being installed as that is the only way to install some of them. It's just a money machine that I don't want to get caught up in. ;)

If that is the only way to install this, then there will also have to be a text install for it to be able to be posted here.

Olate 07-05-2004 08:14 AM

Quote:

Originally Posted by Boofo
I don't use table prefixes but I also don't use HTL. Never saw a need for it because it restricts too many programs from being installed as that is the only way to install some of them. It's just a money machine that I don't want to get caught up in. ;)

If that is the only way to install this, then there will also have to be a text install for it to be able to be posted here.

There is a text installer, but it is all messed up. I'll see about making a text installation guide myself, but this isn't really my hack, I'm just distributing modifications I've made to it.

Boofo 07-05-2004 08:18 AM

Quote:

Originally Posted by Olate
There is a text installer, but it is all messed up. I'll see about making a text installation guide myself, but this isn't really my hack, I'm just distributing modifications I've made to it.

I'd really appreciate it. I'd like to install it when it isn't such a nightmare to do. ;)

ixian 07-05-2004 08:30 AM

Good stuff Olate. Email notification appears to be working well. Just to clarify from looking at the code - it will email the original author of the bug if someone adds a bugnote, and email anyone who has added a bugnote with further updates - correct?

Is there an easy way to add one more email feature - an address to send to whenever any bug is added to the system at all (kind of like your original hack did unintentionally)? I'd like to be notified of all bugs added, and to have the folks adding/updating bugs updated as well.

HellRazor 07-05-2004 04:53 PM

A while back, there were some issues with Moderate and Modify (I believe related to the Online/Offline status).

Can anyone verify that Moderate and Modify are working properly?

Also, what exactly is the difference between Moderate and Modify? And what exactly is the "Private" and "Online Status" for?


All times are GMT. The time now is 08:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01502 seconds
  • Memory Usage 1,801KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete