[bd] Image

Discussion in 'Other' started by xfrocks, Sep 11, 2013.

Tags:
Thread Status:
Not open for further replies.
  1. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    This is the add-on that helps with thread image, it will automatically pick up the first image or attachment in the first post of a thread and use that as the thread image.

    The image can be shown with 2 renderers for [bd] Widget Framework: one with slider (auto run) and one is a list of image (with tooltip).
     

    Attached Files:

    QenTox, mbenjami and yavuz like this.
  2. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    This is v0.9.5
    • added picker support for post_edit, thread_edit and thread_list_item_edit
    • updated renderer to only get threads with image
     

    Attached Files:

    mbenjami likes this.
  3. mbenjami

    mbenjami Member

    I get this error when this addon is active when i create a new resource in resource manager and insert a full image or thumbnail to the resource post. If i just upload the picture and dont press thumbnail or full image the error not appearing and the post is saved. And then if i edit the thread and click on insert full image/thumbnail then also the error dont appear. Only when you create a new resource and insert the image straight away.

    Code:
    Følgende feil oppstod:
    Undefined index: url
    XenForo_Application::handlePhpError() in bdImage/Integration.php at line 318
    bdImage_Integration::_getImageSize() in bdImage/Integration.php at line 46
    bdImage_Integration::getBbCodeImage() inbdImage/XenForo/DataWriter/DiscussionMessage/Post.php at line 24
    bdImage_XenForo_DataWriter_DiscussionMessage_Post->bdImage_getImage() inbdImage/XenForo/DataWriter/Discussion/Thread.php at line 69
    bdImage_XenForo_DataWriter_Discussion_Thread->_discussionPreSave() inXenForo/DataWriter/Discussion.php at line 308
    XenForo_DataWriter_Discussion->_preSave() in XenForo/DataWriter.php at line 1434
    XenForo_DataWriter->preSave() in XenForo/DataWriter.php at line 1373
    XenForo_DataWriter->save() in XenResource/DataWriter/Resource.php at line 533
    XenResource_DataWriter_Resource->_insertDiscussionThread() inXenResource/DataWriter/Resource.php at line 653
    XenResource_DataWriter_Resource->_resourceMadeVisible() inXenResource/DataWriter/Resource.php at line 323
    XenResource_DataWriter_Resource->_postSave() in XenForo/DataWriter.php at line 1397
    XenForo_DataWriter->save() in XenResource/ControllerPublic/Resource.php at line 592
    XenResource_ControllerPublic_Resource->actionSave() in XenForo/FrontController.php at line 337
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    server error log gives this :
    
    rrorException: Undefined index: url - library/bdImage/Integration.php:318
    Generated By: administrator, 7 minutter siden
    Stack Trace
    #0 /Applications/XAMPP/xamppfiles/htdocs/library/bdImage/Integration.php(318): XenForo_Application::handlePhpError(8, 'Undefined index...', '/Applications/X...', 318, Array)
    #1 /Applications/XAMPP/xamppfiles/htdocs/library/bdImage/Integration.php(46): bdImage_Integration::_getImageSize(Array)
    #2 /Applications/XAMPP/xamppfiles/htdocs/library/bdImage/XenForo/DataWriter/DiscussionMessage/Post.php(24): bdImage_Integration::getBbCodeImage(' => string(35) "http://xxx.xxx.xxx.xx/annonser/save"
      ["_GET"] => array(0) {
      }
      ["_POST"] => array(13) {
        ["resource_category_id"] => string(2) "15"
        ["title"] => string(3) "sfd"
        ["version_string"] => string(0) ""
        ["tag_line"] => string(2) "af"
        ["resource_file_type"] => string(8) "fileless"
        ["message_html"] => string(146) "<p><img src="attachments/91_1562744997-jpg.93/?temp_hash=6b2bbc43ade496b478fcb8bd35bec18a" class="attachFull bbCodeImage" alt="attachFull93"> </p>"
        ["_xfRelativeResolver"] => string(58) "http://xxx.xxx.xxx.xxx/annonser/add?resource_category_id=15"
        ["attachment_hash"] => string(32) "6b2bbc43ade496b478fcb8bd35bec18a"
        ["external_url"] => string(0) ""
        ["_xfToken"] => string(8) "********"
        ["_xfRequestUri"] => string(37) "/annonser/add?resource_category_id=15"
        ["_xfNoRedirect"] => string(1) "1"
        ["_xfResponseType"] => string(4) "json"
      }
    }
     

    Attached Files:

  4. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Thank you for the detail report. A fix has been made. The change will be released with the new version.
     
  5. mbenjami

    mbenjami Member

    when is the next release coming :)
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      #6 xfrocks, Sep 13, 2013
      Last edited: Dec 25, 2013
      xfrocks @mbenjami Now? :D

      This version has bug fixes, new template modification option, and a new widget renderer.

      Two Column:
      Screen Shot 2013-09-13 at 11.40.59 AM.png

      Thread Image:
      Screen Shot 2013-09-13 at 11.41.10 AM.png

      Slider:
      Screen Shot 2013-09-13 at 11.41.16 AM.png

      For your reference, here are the threads:

      [img] tags:
      Screen Shot 2013-09-13 at 11.43.46 AM.png Screen Shot 2013-09-13 at 11.43.53 AM.png Screen Shot 2013-09-13 at 11.44.11 AM.png

      [attachment] tag:
      Screen Shot 2013-09-13 at 11.44.18 AM.png

      Attachments without insert into the post:
      Screen Shot 2013-09-13 at 11.44.01 AM.png
       

      Attached Files:

      mbenjami likes this.
      1
    2. mbenjami

      mbenjami Member

      xfrocks likes this.
      1
  6. mbenjami

    mbenjami Member

    this one is named bd cache and not bd image. should i remove bd image ? if so , i disabled bd image but then i get no renders to choose from ?

    413.09.png


    213.09.png
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @mbenjami Sorry, I uploaded the wrong package for the wrong add-on. I have updated the post with correct package of [bd] Image. Please uninstall the [bd] Cache add-on and delete files in xenforo/library/bdCache directory. Of course you can keep it if you want, it's pretty cool anyway ;)

      Sorry for the confusion, working on too many add-ons at once.
       
      mbenjami likes this.
      1
  7. mbenjami

    mbenjami Member

    its ok :) downloaded and gonna try again here :) thanks
     
  8. mbenjami

    mbenjami Member

    did some more checking here. seems like everytime you try copy/paste an attachment manually in thread
    Code:
    [ATTACH=full]102[/ATTACH]
    in a thread it throws an error.

    5.png

    6.png
     
  9. mbenjami

    mbenjami Member

    also if i have the plugin waindingo customfields active it includes that also in the error message.

    7.png
     
  10. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    @mbenjami, sorry for the problem. I have found a bug. And while I was fixing it, I added YouTube thumbnail support. Now YouTube will be recognized too (the default thumbnail will be used).
     

    Attached Files:

    mbenjami likes this.
  11. mbenjami

    mbenjami Member

    thanks :) have another question also. when i insert large attachments. the thumbnail only shows approx. half of the image. where can i adjust so it shows the whole image as thumbnail ? Also would be nice to choose not to show title text when using as slider as the picture below. removed the title text from bdimage_widget_slider_threads. but then it doesn show any space between the thumbnails. possible to fix that ? :)



    10.png
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @mbenjami The thumbnail is resized to the width and height you specified in the widget option. Your image is wide (width larger than height) therefore it was cropped.
       
  12. mbenjami

    mbenjami Member

    ah oki :) another question. can it be modified so it grabs the quote attachment picture that resource manager create when you post a new resource. Now its not showing attachments from resource manager. Only from ordinary threads. thou if i edit the first post under resource discussion and upload a file then it shows..look at the screenshots
    16.png
    19.png
    20.png
    21.png
    22.png
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @mbenjami It can be done but that would be a security breach because other people can use it as a way to view unauthorized attachments. Sorry.
       
  13. mbenjami

    mbenjami Member

    Is it possible that you can make a version for that ? In my site, resource manager is used as classified system, so only image attachments gonna be used. And it will not be any restrictions between guest or members who can see what. Also Its kinda the same i want for [bd] social share also that it pulls/ add the thumbnail to the facebook post.

    test.png
     
    3rd Angle likes this.
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @mbenjami Probably a better idea to just support getting image from a resource instead of jumping over hops to get attachment from some other random post?
       
  14. mbenjami

    mbenjami Member

    that would be perfect if u can make that xfrocks :) im sure many other will appreciate that since people open their eyes that resource manager can be used to more than just resources :) an other idea i have for a mod for you is a countdown auction timer. lets say a person post a kitchen table he/she wanna sell in the morning today. after 1 day suddenly someone reply to the post and bid $ 50 and asks how long the bid round will go. He/she says until 11 pm tonight. then he/she starts the bid timer, at 11pm the thread closes automatically and automatically sends a pm to the bidder that they won the bid and tell them to take contact to arrange the meeting for picking up the kitchen table. Bid countdown timer should show on the resource item page and on resource list. just an idea.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @mbenjami Just a note, icon has been added to Resource Manager so this feature is no longer needed ;)
       
      mbenjami likes this.
      1
  15. sami simo

    sami simo New Member

    #21 sami simo, Sep 17, 2013
    Last edited: Sep 21, 2013
    I like it, have tried the file and get an error:
    Code:
    An exception occurred: Argument 2 passed to bdImage_Integration::getBbCodeImage() must be an array, none given, called in /home/albooma/public_html/test/xf/library/WidgetFramework/WidgetRenderer/FeedReader.php on line 76 and defined in /home/....../public_html/test/xf/library/bdImage/Integration.php on line 32
    
    XenForo_Application::handlePhpError() in bdImage/Integration.php at line 32
    bdImage_Integration::getBbCodeImage() in WidgetFramework/WidgetRenderer/FeedReader.php at line 76
    WidgetFramework_WidgetRenderer_FeedReader->_render() in WidgetFramework/WidgetRenderer.php at line 637
    WidgetFramework_WidgetRenderer->render() in WidgetFramework/Core.php at line 338
    WidgetFramework_Core->_renderWidgetsFor() in WidgetFramework/Core.php at line 255
    WidgetFramework_Core->renderWidgetsFor() in WidgetFramework/Listener.php at line 51
    WidgetFramework_Listener::template_post_render()
    call_user_func_array() in XenForo/CodeEvent.php at line 58
    XenForo_CodeEvent::fire() in XenForo/Template/Abstract.php at line 195
    XenForo_Template_Abstract->render() in XenForo/Template/Public.php at line 110
    XenForo_Template_Public->render() in XenForo/ViewRenderer/HtmlPublic.php at line 119
    XenForo_ViewRenderer_HtmlPublic->renderContainer() in XenForo/FrontController.php at line 604
    XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
    XenForo_FrontController->run() in /home/......./public_html/test/xf/index.php at line 13
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @sami simo Fixed, sorry for your problem.
       
      sami simo likes this.
      1
  16. yavuz

    yavuz Member

    Hi @xfrocks I've send you a P.C regarding the addon (on XenForo) lets move it to a release soon. Can't wait any longer :)
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz I have replied to your message.
       
  17. yavuz

    yavuz Member

    I'm trying to set it up the Two Column design... It's looking different on each theme, fixed themes need a different values alltogether. Is there a way around, like be able to set up for each style individually?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz You can use expression to show a widget in a style and hide it in others. If possible, try to use CSS to style it.
       
  18. yavuz

    yavuz Member

  19. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    The files are cached using the same policies as your data directory. You can set it up using .htaccess (if you are using Apache) or site configuration file (for nginx).
     
    1. yavuz

      yavuz Member

      yavuz @xfrocks For caching, you mean config.php right? I'm using apache. How would this look like? Which setting you suggest?

      This is what I have now:

      Code:
      $config['cache']['enabled'] = true;
      $config['cache']['frontend'] = 'Core';
      $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
      $config['cache']['backend'] = 'File';
       
    2. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz No, I meant something like this http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html
       
    3. yavuz

      yavuz Member

    4. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      yavuz likes this.
      1
    5. yavuz

      yavuz Member

  20. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    First Time Byte is problematic because your server is far from the test server I think.

    The progressive thingy is a bit unclear. I will check that.
     
    yavuz likes this.
Loading...