1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Embedding Scribd Documents

Discussion in 'XenForo Questions and Support' started by Saeed, Apr 27, 2012.

  1. Saeed

    Saeed Well-Known Member

    Hi everyone. :)

    I wanted to add the ability for the members on my forum to embed Scribd Documents.

    1. This could either be done by adding it as a new BB Code Media, as can be seen to be done on the IGN Board here.



    2. The second option is to use Custom BB Code Manager by King Kovifor. I've been trying this, but somehow can't seem to get a good enough result, mainly with autowidth.

    I'd love to have the first method enabled, since it's easier for members, but a custom BB Code would be fine as well. Would anyone be very kind to help me out with this? :)
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Home -> BB Code Media Sites -> Add BB Code Media Site

    Media Site ID: scribd

    Site Title: Scribd

    Site URL: http://www.scribd.com/

    Match URLs:

    http://www.scribd.com/doc/{$id}/

    Embed HTML:

    Code:
    <iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/{$id}/content?start_page=1&view_mode=list&access_key=key-mbe672hh9vrhgq74719" data-auto-height="true" data-aspect-ratio="0.666666666666667" scrolling="no" id="doc_87468" width="100%" height="600" frameborder="0"></iframe>
    
    URLs tested:
    http://www.scribd.com/doc/90051366/Zappos-com-CEO-Tony-Hsieh-on-Changing-Business-as-Usual
    http://www.scribd.com/doc/90924585/The-Dark-Monk-Excerpt-by-Oliver-Potzsch

    If you are manually typing the code into your post then use this:

    Code:
    [media=scribd]90924585[/media]
    
     
    Saeed likes this.
  3. Saeed

    Saeed Well-Known Member

    Thank you very much for this, Jake.

    I kept trying working on this, and this is what I came up with. Apparently, there is another format for documents as well. e.g.

    http://www.scribd.com/username/d/61936093-Aks-Episode-1

    So this is what I was using (in blue)...

    Media Site ID: scribd

    Site Title: Scribd

    Site URL: http://www.scribd.com/

    Match URLs:

    http://www.scribd.com/doc/{$id}/
    http://www.scribd.com/*/d/{$id:digits}

    Embed HTML:

    Code:
    <iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/{$id}/content?start_page=1&view_mode=list&access_key=key-2lh4nqcawtxot02q2lwh" data-auto-height="true" data-aspect-ratio="0.640167364016736" scrolling="no" id="doc_75039" width="600" height="800" frameborder="0"></iframe>
    I was a bit stumped with the key given in the HTML too (key-2lh4nqcawtxot02q2lwh). I thought it was unique, but apparently it isn't.

    And the width="100%" wasn't working for me. :( I'm using Firefox. Was it working for you?

    Could we perhaps combine these two together to come up with one single BB Code Media?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Simply adding the second line to Match URLs works:

    Match URLs:

    http://www.scribd.com/doc/{$id}/
    http://www.scribd.com/*/d/{$id:digits}

    And I am using Firefox. Both formats of URL work for me when I add the second Match URLs line.
     
    Saeed likes this.
  5. Saeed

    Saeed Well-Known Member

    They sure do, Jake. :)

    My problem was with the width="100%" in the Embed HTML. For some weird reason, when I use 100%, it shows an extremely small version of it. If I use width="600", it works fine, as I pasted in my Embed HTML above.

    Does the same happen on your side too?
     
  6. Saeed

    Saeed Well-Known Member

    Ok, not sure why or how, but it seems to be working perfect now.

    Thanks a TON, Jake. Your help is always appreciated. :)
     

Share This Page