Back to vBulletin 3.8 Add-ons

BBCode: Embed PDF Files (No JavaScript/No iFrames) (BB Code)
Mod Version: 1.00, by BirdOPrey5

vB Version: 3.8.x Rating: (3 votes - 5.00 average) Installs: 26
Released: 13 Aug 2010 Last Update: Never Downloads: 0
Not Supported Re-usable Code Translations  

This is <embed> BB Code to embed a PDF file into your forum. The user needs a compatible PDF Reader such as http://www.adobe.com/products/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?p=848014#post848014

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>
Example: [pdf]http://www.qapla.com/ju/PDFOpenParameters.pdf[/pdf]
(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:
&stc=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.

Download

No files for download.

Screenshots

Click image for larger version
Name:	ss_pdfembed.jpg
Views:	1265
Size:	62.5 KB
ID:	120786  

Similar Mods

BB Code Enhancements ZippyShare.com shared music BBCode (Embed MP3 files in your forum!) vBulletin 3.8 Add-ons
BB Code Enhancements ZippyShare.com shared music BBCode (Embed mp3 files in you forum!) vBulletin 4.x Add-ons
BB Code Enhancements [BB Code] YouTube Javascript Embed vBulletin 3.8 Add-ons
BB Code Enhancements [BB Code] YouTube Javascript Embed Modification Graveyard

vblts.ru supports vBulletin®, 2022-2024