Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6 (Latest Release) > Mods and Customizations

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old 10-09-2009, 07:24 PM
zachazow zachazow is offline
Junior Member
 
Join Date: Oct 2009
Posts: 7
Default

I was going to impliment this on the R5 version but I got to the last step (step 4) and the code I was supposed to find did not match what I have. There are a lot of differences and I wasn't sure what needed to be changed. This is the code I currently have in /include/class.ticket.php

PHP Code:
function postNote($title,$note,$alert=true,$poster='') {        
        global 
$thisuser,$cfg;

        
$sql'INSERT INTO '.TICKET_NOTE_TABLE.' SET created=NOW() '.
                
',ticket_id='.db_input($this->getId()).
                
',title='.db_input(Format::striptags($title)).
                
',note='.db_input(Format::striptags($note)).
                
',staff_id='.db_input($thisuser?$thisuser->getId():0).
                
',source='.db_input(($poster || !$thisuser)?$poster:$thisuser->getName());
        
//echo $sql;
        
if(db_query($sql) && ($id=db_insert_id())) {
            
//If enabled...send alert to staff (Internal Note Alert)
            
if($alert && $cfg->alertONNewNote()){
                
$dept=$this->getDept();
                if(!
$dept || !($tplId=$dept->getTemplateId()))
                    
$tplId=$cfg->getDefaultTemplateId();

                
$sql='SELECT note_alert_subj,note_alert_body FROM '.EMAIL_TEMPLATE_TABLE.
                     
' WHERE cfg_id='.db_input($cfg->getId()).' AND tpl_id='.db_input($tplId);
                if((
$resp=db_query($sql)) && db_num_rows($resp) && list($subj,$body)=db_fetch_row($resp)){
                    
$body=$this->replaceTemplateVars($body);
                    
$subj=$this->replaceTemplateVars($subj);
                    
$body str_replace('%note',"$title\n\n$note",$body);.............. 
Reply With Quote
  #12  
Old 10-09-2009, 09:36 PM
masino_sinaga masino_sinaga is offline
Senior Member
 
Join Date: Apr 2009
Location: Jakarta, Indonesia
Posts: 571
Send a message via Yahoo to masino_sinaga
Default RC4 vs RC5

@zachazow,

Yes. There are a lot of differences between postNote function on RC4 and RC5. Since the modification I made is only for RC4, I repeat: only for RC4, please do not apply that mod into RC5!

I will create the modification for RC5 in the next one or two days. So, stay tuned!

Sincerely,
Masino Sinaga

Last edited by masino_sinaga; 10-09-2009 at 09:36 PM. Reason: remove 'for'
Reply With Quote
  #13  
Old 02-01-2010, 03:05 PM
phonerental phonerental is offline
Junior Member
 
Join Date: Jan 2010
Posts: 13
Default

Hi Masino,

First of all, thank you very much for all your contribuitions to the osTicket community. I had the chance to visit your website, and read the instructions on how to add an attachment on an internal note (RC5). I did everything you mentioned, without any luck. I'm attaching you the 2 files that were modified and a print screen of the database. Could you be so kind to help?

Thanks in advance

Gustavo from Argentina
Attached Images
File Type: jpg db.jpg (103.1 KB, 19 views)
Attached Files
File Type: zip viewticket.inc.php.zip (5.4 KB, 1 views)
File Type: zip tickets.zip (4.8 KB, 0 views)
Reply With Quote
  #14  
Old 02-25-2010, 09:23 PM
robayer robayer is offline
Junior Member
 
Join Date: Feb 2010
Posts: 10
Default

Quote:
Originally Posted by masino_sinaga View Post
@zachazow,

Yes. There are a lot of differences between postNote function on RC4 and RC5. Since the modification I made is only for RC4, I repeat: only for RC4, please do not apply that mod into RC5!

I will create the modification for RC5 in the next one or two days. So, stay tuned!

Sincerely,
Masino Sinaga
Hi Masino - Any chance for this same mod updated to the new 1.6 stable?

Thanks

http://osticket.com/forums/showthrea...internal+notes
Reply With Quote
  #15  
Old 02-26-2010, 10:13 AM
masino_sinaga masino_sinaga is offline
Senior Member
 
Join Date: Apr 2009
Location: Jakarta, Indonesia
Posts: 571
Send a message via Yahoo to masino_sinaga
Lightbulb Attachment on Internal Note in osTicket v1.6 ST

Quote:
Originally Posted by robayer View Post
Hi Masino - Any chance for this same mod updated to the new 1.6 stable?
You can get the MOD for 1.6 ST from here:
Add Attachment on Internal Note in osTicket v1.6 ST (Stable).

Hopefully this will help you.

Sincerely,
Masino Sinaga
Reply With Quote
  #16  
Old 02-26-2010, 12:15 PM
robayer robayer is offline
Junior Member
 
Join Date: Feb 2010
Posts: 10
Default

Quote:
Originally Posted by masino_sinaga View Post
You can get the MOD for 1.6 ST from here:
Add Attachment on Internal Note in osTicket v1.6 ST (Stable).

Hopefully this will help you.

Sincerely,
Masino Sinaga
Cheers! Will implement this eve and let you know.

Thanks again.
Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 -4. The time now is 10:20 AM.