Results 1 to 1 of 1

Thread: Add Button to Cases Subpanel

  1. #1
    DaneGerous is offline Junior Member
    Join Date
    Apr 2009
    Posts
    2

    Default Add Button to Cases Subpanel

    I've been searching reading and pulling out my hair for a couple of days now.
    I have gotten only so far and need some guidance on the last parts.

    I am putting a simple CRM together. Only two modules 'Accounts' and 'Cases'
    'Cases' should actually be called Cert Informations. I have attached an image
    that Is very descriptive of what I'm actually trying to accomplish.

    I have managed to get two instances of edit but can't seem to get my own
    button to show up. I'm comfortable with editing PHP but I just can't find where
    I need to put what. Here is the code that the print button would execute.
    PHP Code:
    <?php
    require('num2txt.php');

    $img imagecreate(1320,900);
    $color imagecolorallocate($img0xFF0xFF0xFF);
    $font 'DejaVuSerif-Bold.ttf';
    $fontItalic 'DejaVuSerif-BoldItalic.ttf';
    $fontCalli 'Amazone.ttf';
    $black imagecolorallocate($img000);
    $red imagecolorallocate($img25500);
    //Name Handling
    $name "";
    $bboxname imagettfbbox(180$fontItalic$name);
    $namecent $bboxname[2]/2;
    //Shares Handling
    $shares "4500";
    $bboxshares imagettfbbox(140$font$shares);
    $sharescent $bboxshares[2]/2;
    $date $today date("F j, Y");
    // Add the text
    $ispreferred '1';

    if(
    $ispreferred == '1'){
    imagettftext($img120620360$red$font"PREFERRED");//Preferred under Company Name
    }
    imagettftext($img1401065-$sharescent210$black$fontnumber_format($shares));    //Number of shares
    imagettftext($img180665-$namecent510$black$fontItalic$name); //name
    imagettftext($img140220552$black$fontItalicconvertNum($shares));//Spelled out Shares
    imagettftext($img200180740$black$fontCalli$date);//Spelled out Shares
    header ("Content-type: image/jpeg"); // Let teh system know to generate an image
    ImagePNG($img,"pic.png"); 
    $command="lp -d Cert_Print pic.png";  //      Send command to Unix OS lpr command
    exec($command);         //      Send the command string directly to the operating system */
    imagedestroy($img);
    ?>
    In the end it would print a Stock Cert with the pertinent information, I can get
    it to print properly manually but I would like to get that button on that Cases
    sub panel ..

    You don't have to 100% Tutorialize me, I just need some locations where I
    can find the files that I need to edit to make this printing process easier,

    Maybe Others Can Benefit from my above code. I have an Hp Laser Printer
    attached through USB. This may seem like cheap and dirty coding but it
    totally serves its purpose.

    You would save me a lot of hair plugs in the long run >,< ..

    Thanks DaneGer
    Attached Images Attached Images  
    Last edited by DaneGerous; 2009-04-20 at 12:27 AM. Reason: Edit

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Set ID for save button in cases module
    By slasher in forum Developer Help
    Replies: 6
    Last Post: 2009-03-11, 08:56 PM
  2. How to add new button in a subpanel?
    By aaron4tc in forum Developer Help
    Replies: 2
    Last Post: 2008-09-08, 08:38 AM
  3. How to add a button to Cases module?
    By username2345 in forum Developer Help
    Replies: 4
    Last Post: 2008-08-29, 07:06 PM
  4. Add button to Subpanel
    By redpillsweden in forum Developer Help
    Replies: 0
    Last Post: 2008-07-17, 07:46 AM
  5. Button in subpanel
    By atin in forum Help
    Replies: 4
    Last Post: 2008-04-28, 04:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •