Back to vBulletin 4.x Add-ons

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

vB Version: 4.0.x Rating: (14 votes - 5.00 average) Installs: 144
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/index.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>
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

Download

No files for download.

Similar Mods

BB Code Enhancements ZippyShare.com shared music BBCode (Embed MP3 files in your forum!) vBulletin 3.8 Add-ons
BB Code Enhancements BBCode: Embed PDF Files (No JavaScript/No iFrames) (BB Code) 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