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 |
#72
|
||||
|
||||
You can't force users to have or user any such plguins- you can just post advising them how to have the best experience on your site- it is up to them to comply.
|
#73
|
|||
|
|||
Does this works for 4.2?
|
#74
|
||||
|
||||
not working on 4.2.1 showing 404 error. but it work at the admincp
|
#75
|
||||
|
||||
I wanted to provide a size option for the hack, so I added the use of the {option} for. a dimension. The problem is that I cannot figure out how to adjust the other dimension.
The options are to allow both dimensions with a separator or use a fixed ratio like height = 1.6 x width. I used to be able to do that in html, but I don't really remember how. I tried using vb:math but that does not seem to work. I seem to recall that I cannot parse the option, but I can parse the parameter. However, I cannot find the html references on how to do that. Can anyone help? |
#76
|
||||
|
||||
There is no real way to control 2 dimensions with a simple BB Code. You would need to go to a full blown modification with php plugins to deal with that.
|
#77
|
||||
|
||||
I was hoping there was some secret expert trick to provide
embed {parameter} width="{option}" height="8*{option}/5" |
#78
|
|||
|
|||
That's normal behavior, abqtj.
Thanks for this, I'll try it out. |
#79
|
||||
|
||||
Attn: RazKaziRo from vBulletin.com
http://www.vbulletin.com/forum/forum...w-on-vbulletin Re: 1) Make sure you have a PDF Viewer plugin for your browser 2) If you do, there may be a mistake in the replacement code, copy it in again. You seem to be missing some code. |
#80
|
|||
|
|||
Quote:
any ideas? |
#81
|
||||
|
||||
And you put in a post, for example:
[pdf]http://www.qapla.com/ju/PDFOpenParameters.pdf[/pdf] ?? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|