The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
BBCode: Embed PDF Files (No JavaScript/No iFrames) (BB Code) Details »» | |||||||||||||||||||||||||||
BBCode: Embed PDF Files (No JavaScript/No iFrames) (BB Code)
Developer Last Online: Aug 2023
This is <embed> BB Code to embed a PDF file into your forum. The user needs a compatible PDF Reader such as Adobe's free PDF Reader. If they don't have one they will still see a link to view the PDF directly.
I am aware <embed> is not "proper" HTML but it works fine in all major browsers (IE/FF/Chrome/Opera/Safari) while <object> was not working for me in IE. If you prefer to keep to strict HTML guidelines and don't care about IE users then simply change the two instances of "embed" in the replacement code to "object". This has been confirmed working in the latest releases of IE, FF, Chrome, Safari, and Opera. I am also aware there are at least 2 other PDF BB Codes out there... I believe this implementation is better because one of them uses JavaScript and another uses an iFrame and relies on a 3rd party website (google) to display the PDF. My implementation uses no JavaScript and does not reply on any other websites. Demo: http://www.juot.net/forums/showthread.php?t=46803 Add a new BBCode Title: Embed PDF BB Code Tag Name: pdf Replacement: Code:
<div align="center"> <p align="center"> <embed src="{param}" type="application/pdf" width="700" height="900"> <br /> <a href="{param}">Click here to view or download the file directly.</a> <br /> </embed> </p></div> (I suggest using your own example if possible.) Use Option: No Button Image: (optional) Remove Tag If Empty: Yes All Disable Options: Yes Overall this tag acts a lot like the built in [img] tags. Please mark as installed if you use this. Check My Profile for other BB Code enhancements. They work on all versions. Screenshot Attached: https://vborg.vbsupport.ru/attachmen...1&d=1281727562 Show Your Support
|
4 благодарности(ей) от: | ||
ITDarasgah, Judith2, synseal, Toorak Times |
Comments |
#82
|
|||
|
|||
yes i put exactly like that
|
#83
|
||||
|
||||
Then I don't know what to tell you, sorry. It works on dozens, maybe hundreds, of other VB forums.
You don't have any "Replacement Variables" setup that could be interfering, do you? |
#84
|
|||
|
|||
The document view when I use it is skewed to right and down. Also when the post I have it embedded in comes up the browser looses focuses and focus is controlled by the embedded .pdf window.
I used the adobe .pdf document that discusses the controls and switches when embedding .pdf files and one of the controls is http://www.xxxxx.com$fitH This is suppsed to fit the document wigth wise in the viewable window... not. |
#85
|
||||
|
||||
Just added this BBCode and tested in Chromium Browser. Had to download Google Chrome .deb package, extract the contents and copy the libpdf.so file to /usr/lib/chromium-browser as Chromium doesn't have a .pdf plug-in (Google Chrome does). Restarted Chromium and went to your demo page and voila, embedded .pdf document! Just too cool.
Even though this MOD is from 2010, I've marked it as recommended for MOTM and of course, rated it Excellent. BOP5 continues to amaze me with his skills at providing improvements to vBulletin. |
#86
|
||||
|
||||
It really does look like there's an error in your HTML Replacement code. There's a dot where there should be a quotation mark. In addition, it almost looks like you have the code in there twice. Double check that you also don't have a plugin that automatically tries to parse PDFs installed.
|
#87
|
|||
|
|||
Quote:
can you help me ? i can give you admin premission for testing thanks Raz |
#88
|
||||
|
||||
Sorry guys... This is a simple bbcode, if it doesn't work I don't know why, it works on dozens of other sites.
There is nothing I can change in this mod to make it magically work on a site it doesn't work on now- the issue is external from this code. I am marking this as unsupported because I do not have time to give the support some people are asking for. I would suggest anyone having issues- 1) Try with a different browser 2) Make sire you have Adobe PDF Reader Plugin for your browser installed 3) Double/triple check the correct code in the BB Code Manager 4) Try from another computer |
#89
|
|||
|
|||
Quote:
|
#90
|
||||
|
||||
It works fine on my 3.8.7 and 4.2.1 forums.
Can you see the PDF on this page? http://www.qapla.com/mods/showthread...e-Embedded-PDF This is what it looks like to me (working): |
#91
|
|||
|
|||
After reinstalling it a second time, it now works on 4.1.11. Not sure why it wouldn't work the first time, unless I copied the code wrong. =/
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|