1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

Attachment preview (images only)

Discussion in 'Developing, APIs and extending' started by Nawid Sahebzadeh, Oct 10, 2012.

  1. Ali Dursun

    Ali Dursun Member

    sorry for the inconvenience; it worked for me with the code above.
     
  2. Rob Heymann

    Rob Heymann Member

    Thanks for this, works great! Added a box-shadow and border with radius to the 'img' css helped to get the thumbnail to stand out.
     
  3. Patrick Stel

    Patrick Stel Established Member

    Nice additions to kayako :) thanks for that.

    For people who use 4.51.1891
    You don't have to add a css line in recpheader.tpl

    You can go to __swift\libraby\Compressor\class.SWIFT_Compressor.php

    Then go to
    static protected $_cssThirdParty

    Ad a new line there like this
    PHP:
    'image_popup' => './__swift/apps/base/javascript/__global/thirdparty/hoverpop.css',
    You should change the path to where you put you're css file.

    Then add the name image_popup to static protected $_jsInterfaceAutoLoad

    Default
    PHP:
    'staff' => array('tinymce''popup''kql''notification''circleplayer''unifiedsearch''xregexp''corecp''staffcp'),
    Now
    PHP:
    'staff' => array('tinymce''image_popup''popup''kql''notification''circleplayer''unifiedsearch''xregexp''corecp''staffcp'),
    Then the compressor will allways load the css in the staff cp.
    It's a bit more work but I think it's better cause you keep within the Kayako defaults.

    Kind Regards,
    Patrick
     
  4. Would you be so kind to submit your changes for the rest of us please?

    Thank you,
    Nawid
     
  5. Hi Patrick,

    Thank you for the suggestion. I think you're right and we should keep it as close to default as possible.
    Thank you,
    Nawid
     
  6. I found that the popup images fell beneath the notes in a ticket. This was caused by the fact that the notes have a very high z-index (100 to be exact). In order to fix this problem You should add a explicit z-index to the popup image which is higher than 100.

    You could add this z-index to the hoverpop.css as I have done below:

    HTML:
    .thumbnail:hover span { /*CSS for enlarged image on hover*/
        visibility: visible;
        z-index: 200;
        width: 200px;
        bottom: 50px; /* use IF IE6 style to correct IE6 positions of larger image relative to thumb */
        right: 150px;/*position where enlarged image should offset horizontally */
    }
    
    Kind regards,
    Nawid
     
  7. Patrick Stel

    Patrick Stel Established Member

    I would try to implement you're code in to a hook for kayako so it would even be easy to import you're code cause then you install the module and only add 1 line of code in the existing script's
    Is that okay with you? cause it's you're original code :)

    Kind regards,
    Patrick
     
  8. Hi Patrick,

    Sure thing, be my guest. It would also make it much easier when upgrading to a newer version.
    Good luck!

    Kind regards,
    Nawid
     
  9. Patrick Stel

    Patrick Stel Established Member

    Hey Nawid,

    Thank you for you're approval.

    I've created a .zip and attached it to the post.
    I've also added you're name cause the original code is yours :)

    If you would like you can take a look if you agree with this or not.
    I've tested it on my Kayako Development machine and it works like a sunshine.

    Kind regards,
    Patrick
     

    Attached Files:

  10. Patrick Stel

    Patrick Stel Established Member

    Or maybe we can even improve it further with a if else statement, something like this.

    If (hook_name exists in the database) {
    execute you're code inside the hook
    } else {
    execute the kayako code
    }

    What do you think?
     
  11. I'm currently running the 4.40.1148 version so I'm unable to readily test your hook.
    But looking directly at the code I think an if/else statement should be best indeed.

    I will try upgrading to the latest version on my dev machine and testing it all out.
     
  12. Patrick Stel

    Patrick Stel Established Member

    Okay. I will continue to optimise the hook the only thing that I don't like is that now people still need to modify the compressor script, I will try to think a better solution for that
     
  13. Alfredo Malespin

    Alfredo Malespin New Member

    There is not version of this solution for kayako 4.50.xxx???
     
  14. Patrick Stel

    Patrick Stel Established Member

    Hi Alfredo,
    We are using Kayako Fusion 4.51.1891 and I works like a sunshine, I you need any help with deploying this functionality to you're helpdesk, feel free to ask

    Cheers,
    Patrick
     
  15. factor

    factor Member

    Thank you very much, does it works with 4.52?

    Regards,
     
  16. Patrick Stel

    Patrick Stel Established Member

    Hey cxtsupport,

    Thanks for the feedback I've changed it in the readme and added it again.
    If you find some more bug or things you would like to see different please share it.

    Cheers,
    Patrick
     

    Attached Files:

  17. hey,
    I think its a very nice feature for kayako, but if click on 'install', i get the following error code:

    Uncaught Exception
    Invalid data provided in ./__swift/library/App/class.SWIFT_App.php:956
    #0 File: ./__swift/apps/base/admin/class.Controller_App.php Line: 174 Function: SWIFT_App::RetrieveSetupDatabaseObject(ticket_image_hover)
    169 if (empty($_appDirectory)) 170 { 171 throw new SWIFT_Exception(SWIFT_INVALIDDATA); 172 } 173 174 $_SWIFT_SetupDatabaseObject = SWIFT_App::RetrieveSetupDatabaseObject($_appName); 175 176 $_installResult = $_SWIFT_SetupDatabaseObject->InstallApp(); 177 178 if ($_installResult !== false) 179 {
    #1 File: Line: Function: Controller_App->Install(ticket_image_hover)

    #2 File: ./__swift/library/MVC/class.SWIFT_Controller.php Line: 369 Function: call_user_func_array(((object) Controller_App, Install), (ticket_image_hover))
    364 $_argumentsContainer = array($_SWIFT_RouterObject->GetArguments($_fetchRESTArguments)); 365 } else { 366 $_argumentsContainer = $_SWIFT_RouterObject->GetArguments($_fetchRESTArguments); 367 } 368 369 call_user_func_array(array(self::$_controllerObjectCache[$_controllerClassName], $_controllerActionName), $_argumentsContainer); 370 371 return self::$_controllerObjectCache[$_controllerClassName]; 372 } 373 374 /**
    #3 File: ./__swift/library/App/class.SWIFT_App.php Line: 176 Function: SWIFT_Controller::Load((object) SWIFT_Interface, (object) SWIFT_App, (object) SWIFT_Router, FALSE)
    171 throw new SWIFT_Exception(SWIFT_INVALIDDATA); 172 173 return false; 174 } 175 176 $_SWIFT_ControllerObject = SWIFT_Controller::Load($_SWIFT->Interface, $this, $_SWIFT_RouterObject, $_controllerParentClass); 177 if (!$_SWIFT_ControllerObject instanceof SWIFT_Controller || !$_SWIFT_ControllerObject->GetIsClassLoaded()) 178 { 179 // throw new SWIFT_Exception(SWIFT_CREATEFAILED); 180 181 return false;
    #4 File: ./__swift/library/class.SWIFT.php Line: 16 Function: SWIFT_App->ExecuteController((object) SWIFT_Router)
    #5 File: ./__swift/library/class.SWIFT.php Line: 16 Function: SWIFT->Initialize()
    #6 File: ./__swift/swift.php Line: 16 Function: SWIFT::GetInstance()
    #7 File: ./admin/index.php Line: 29 Function: require_once(./__swift/swift.php)


    Can you help me?
    Verison 4.51.1891

    Cheers,
    Steffen
     
  18. Donaldini

    Donaldini Member

    Same here, would love to implement this app, but also got the error:

    [​IMG]
     
  19. Ali Dursun

    Ali Dursun Member

    This app does not work, please try to configure / setup it manually over the 3-4 steps; that works great.
     
  20. Donaldini

    Donaldini Member

    I did do those steps, but then step 7 says to install it:


     

Share This Page