• 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

Chromaniac

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. :)
 
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.
 
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. :)
 
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.
 
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 :-)
 
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.
Works great !

embedly converts proper links into embeds. it runs on the client's machine.
if javascript is disabled, you see a link. if its on, the link is converted into an embed on load.
not the perfect solution. but the easiest one to instantly add support for plenty of third party services.

Would you be able to make a new thread detailing what you did to get embedly to embed Scribd PDFs ?
Thanks !
 
OK docs.google for pdf is here.

I'm watching right now lemme know if it works for you as well.
sort of confused... what exactly is this thing?

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

is this related to a document hosted on google docs?
 
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]
 
Top Bottom