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:
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 [noparse][/noparse] tags.
Please [B]mark as installed[/B] if you use this. :)
Check [URL="http://www.vbulletin.org/forum/member.php?u=258922"]My Profile[/URL] for other BB Code enhancements. They work on all versions.
Screenshot Attached:
[url]http://www.vbulletin.org/forum/attachment.php?attachmentid=120786&stc=1&d=1281727562[/url]
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 [noparse][/noparse] tags.
Please [B]mark as installed[/B] if you use this. :)
Check [URL="http://www.vbulletin.org/forum/member.php?u=258922"]My Profile[/URL] for other BB Code enhancements. They work on all versions.
Screenshot Attached:
[url]http://www.vbulletin.org/forum/attachment.php?attachmentid=120786&stc=1&d=1281727562[/url]