1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice
What Do You Need In The Xf2 Xengallery Version? Vote for your choices here: http://www.sonnb.com/threads/what-do-you-need-in-the-xf2-xengallery-version.1539/

Sonnb - Xenforo Trigger Lightbox 1.0.10

Trigger Lightbox view for inserted images and attachments.

  1. sonnb

    sonnb Administrator Staff Member

    sonnb submitted a new resource:

    sonnb - Xenforo Trigger Lightbox (version 1.0.8) - Trigger Lightbox view for inserted images and attachments.

    Read more about this resource...
     
  2. sonnb

    sonnb Administrator Staff Member

  3. antonio

    antonio Authorized Member Authorized

    Hi :)
    I installed this addon but i don't see difference...how it works?
    Example: i upload 2000px image in topic...how can i set max width and height for have little thumbnail and fullsize image clicking to this thumb?
    Thanks
    Antonio
     
  4. sonnb

    sonnb Administrator Staff Member

    The different is, normally the image would enlarge on click, now it would be shown up using Lightbox Overlay.
     
  5. antonio

    antonio Authorized Member Authorized

    Ah ok :)
    Thanks
     
  6. Laseg

    Laseg New Member

    Hi there!
    For this link (and other similar links with images)

    Code:
    IMG]photo.qip.ru/photo/valeralc/2965466/large/133296206.jpg[/IMG]
    I have error:

    Fatal Error: Call to a member function thumbnail() on a non-object
    - image.php:45


    option external link is ON
     
    Last edited: Oct 8, 2014
  7. sonnb

    sonnb Administrator Staff Member

    May I have an example link?
     
  8. Laseg

    Laseg New Member

    Link presented in my post above. Excuse me for opened IMG tags, but newbie members like me dont have rights to place links here.
    Sorry 4 my poor english, guys :)
     
    Last edited: Oct 15, 2014
  9. Laseg

    Laseg New Member

    By the way I already fix problem in this module by editing file 'image.php'. In this file I change work with class GD on work with class imagick PECL by replacing one word in source code :)
     
  10. sonnb

    sonnb Administrator Staff Member

    So you do not have GD installed?
     
  11. Laseg

    Laseg New Member

    No, I have installed GD and imagickPECL to my server (Debian7).
    upload_2014-10-16_18-27-10.png
     
  12. sonnb

    sonnb Administrator Staff Member

    Do you see why that line throws error to you?
     
  13. Laseg

    Laseg New Member

  14. Laseg

    Laseg New Member

    No, i dont debug this.
    error comes from line 45 of file 'image.php'.
    and i wrote above about fixing this problem by editing source code, using class imagick
     
  15. Laseg

    Laseg New Member

    Problem fixed:
    edit file /image.php, find line
    Code:
    $image_gd = XenForo_Image_Gd::createFromFileDirect($validUrl, $image_type[2]);
    and replace by
    Code:
    $image_gd = XenForo_Image_ImageMagick_Pecl::createFromFileDirect($validUrl, $image_type[2]);
    another words we must change class XenForo_Image_Gd to class XenForo_Image_ImageMagick_Pecl
     
    sonnb likes this.
  16. sonnb

    sonnb Administrator Staff Member

    Because you have Imagick installed so it will works for you.
     
  17. Laseg

    Laseg New Member

    All right.
    And i hope what you improve your wonderful module features :)
    For example, I have installed two styles on XF.
    Style 1 - standard style (for desktops)
    Style 2 - mobyle style (for mobile devices)

    Also I have installed module like auto mobile switcher. which connect style 2 automatically on smartphones etc.

    And I really want to change functionality of your module like this:

    EDIT FILE /IMAGE.PHP:
    (its non-working code, just my fantasy)
    Code:
    $image_type = @getimagesize($validUrl);
    
    /*my fantastic indian code below */
    $style_id = XenForo_Application::getOptions()->MobileStyleSwitchId;  //take mobile style ID
    $visitor = XenForo_Visitor::getInstance(); //take user's current style ID
    if ($visitor['style_id'] == $style_id)   // if current stile is mobile then change parameters of scaling image
    {
    $max_width = 100; //for example
    $max_height = 100; for example
    }
    /* end of my example code*/
    
    if (empty($image_type) || !is_array($image_type))
     
    Last edited: Oct 16, 2014
  18. Laseg

    Laseg New Member

    Another idea for fixing errors:
    XF has settings in Admin Control Panel for selection GD or imagick PECL library (sorry for my bad english again :( )
    in your module may check XF variable for GD or imagick, and in image.php select different class (GD or Imagick)...
     
  19. sonnb

    sonnb Administrator Staff Member

    Yes, I do know that.
     
  20. Laseg

    Laseg New Member

    And what? :)
     

Share This Page