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: here. 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 yotsume has found a bug where VB drop down menus (like "thread tools") may get hidden behind the PDF if the menu overlaps the same screen space as the PDF. For now please leave some extra lines before embedding a PDF at the top of the first post if you need to use the drop down menus. Screenshots
Show Your Support
|
Comments |
#2
|
||||
|
||||
Works Great!
However... I changed the width to: width="100%". Looks even nicer using a %. This way the pdf view window is the full size of the post. In my case I used this inside of a vbadvanced bb code page with no wrapper. Thanks! |
#3
|
|||
|
|||
Simple to install, user friendly and works nicely.
Thanks! :up: |
#4
|
||||
|
||||
Quote:
No problem. :up: |
#5
|
|||
|
|||
Is there a way to adjust it so the scroll wheel works when outside the pdf itself? It scrolls the pdf just fine, but will not scroll the web page.
Thanks Rick |
#6
|
|||
|
|||
Never mind. Guess it just wanted to mess with me. Works fine now.
|
#7
|
||||
|
||||
Your scroll wheel will detect where you have clicked on the page. So if you clicked on the pdf scroll bar your scroll wheel will move that bar instead of the pages bar. Click on a portion of the page and it will detect the pages scroll bar instead.
|
#8
|
|||
|
|||
Thanks!
|
#9
|
||||
|
||||
There is a small problem with the BB Code. Popup menus in VB will open under the embedded PDF. (see attached screenshot)
I believe the same way that flash can be made to open under menus... the PDF can be made to as well by adding a line of code that makes it "transparent". UPDATE: Using a transparent or opaque mode will not work with a PDF because the adobe plugin doesn't currently support them for PDFs yet. I hope another solution to this issue can be found... |
#10
|
||||
|
||||
yotsume- I can confirm I do have this bug too, thanks... I guess the work around for now is to leave some empty lines before embedding the PDF, though for me it's not nearly as big an issue because of my choice to have a fixed width and most of the menus still very visible. This doesn't seem like it would be a problem if a pdf was posted in anyplace but the top of the first post.
I will see if I can find a solution. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|