1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Add-on to enable embed PDF files in forum posts

Discussion in 'Add-on Requests [Archive]' started by OperaManiac, Jan 10, 2011.

  1. OperaManiac

    OperaManiac Well-Known Member

  2. Andy.N

    Andy.N Well-Known Member

    So this in fact will allow you to embed iframe or other pdf hosting site like docstocs, scribb?
     
  3. OperaManiac

    OperaManiac Well-Known Member

    well scribd and other services do not render direct PDF files. i am just trying to display PDF documents in the post area (right here) using google docs viewer (which seems to cache frequently accessed documents which is very nice).

    for scribd and similar services, i am already using the embedly javascript code that is a quick and easy hack. but rendering PDF files is something it does not support right now.

    in fact, it would be pretty awesome if someone here looks into embedly api and make an official plugin for xenforo. it would seriously negate the need for individual hacks for individual services. :)
     
  4. EQnoble

    EQnoble Well-Known Member

    I have a bbcode to embed pdf files if your interested in that.

    Also I will be posting my uploader to upload pdf images and videos.

    Msg me if you need it before I post it.
     
  5. OperaManiac

    OperaManiac Well-Known Member

    that would be awesome. please provide the code!
     
  6. EQnoble

    EQnoble Well-Known Member

  7. OperaManiac

    OperaManiac Well-Known Member

    new to the xenforo plugin ecosystem. i bought XF on launch date. now deploying it on a project. let's see how it works out (plugin management) compared to vB. :)
     
  8. EQnoble

    EQnoble Well-Known Member

    Just a note OperaManiac, I have this using data/media as the path since that is that path my uploader is tied to, if you need help modifying the code to your needs let me know, I would be glad to help.
     
  9. OperaManiac

    OperaManiac Well-Known Member

  10. EQnoble

    EQnoble Well-Known Member

    Ok I'm back; had to get some grub

    Gimme the link for the doc you are testing with either here or P-Convo and I will (brain please don't give out on me now) make this work :)
     
  11. Digital Doctor

    Digital Doctor Well-Known Member

  12. EQnoble

    EQnoble Well-Known Member

    OK one sec trying something right now....

    I'll edit this in a couple mins and let you know.
     
  13. Digital Doctor

    Digital Doctor Well-Known Member

    Works great !

    Would you be able to make a new thread detailing what you did to get embedly to embed Scribd PDFs ?
    Thanks !
     
  14. EQnoble

    EQnoble Well-Known Member

    ok i fixed the google docs pdf display gimme a sec to export it.
     
  15. EQnoble

    EQnoble Well-Known Member

    OK docs.google for pdf is here.

    I'm watching right now lemme know if it works for you as well.
     
  16. Digital Doctor

    Digital Doctor Well-Known Member

    Is it one page ?
    I can't scroll, but the scrollbar looks like it should scroll.
     
  17. Digital Doctor

    Digital Doctor Well-Known Member

    Looks like this in Chrome.
     

    Attached Files:

  18. OperaManiac

    OperaManiac Well-Known Member

    i just added their javascript code to the header of the page. it convert raw links to embed code on the client's machine on page load. nothing more is required on your part. :)
     
    EQnoble likes this.
  19. OperaManiac

    OperaManiac Well-Known Member

    sort of confused... what exactly is this thing?

    0B9ipbLFXjUqUNDZiZWNjNGItOGY4Ni00ZjE1LTliMjctNGU0ODc0YjQ1YWZk&hl=en&authkey=CIO5w-8O

    is this related to a document hosted on google docs?
     
  20. EQnoble

    EQnoble Well-Known Member

    that is the document name in the address string.

    If you were to go into your google docs account and view a pdf... the address link looks something like this...

    https://docs.google.com/viewer?a=v&...liMjctNGU0ODc0YjQ1YWZk&hl=en&authkey=CIO5w-8O

    that part after srcid= is the refrence to the doc your viewing, there is other variations to this address but basically after every "&" which occurs after srcid= is an option you don't need to put the &hl=en and I believe the auth key is based on doc which you have shared but only to people who have the actual link.

    So this would work to embed it as well with the example pdf if it was set to publicly viewable to the whole internet in your google docs account.
    [gdoc]0B9ipbLFXjUqUNDZiZWNjNGItOGY4Ni00ZjE1LTliMjctNGU0ODc0YjQ1YWZk[/gdoc]
     

Share This Page