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 |
#12
|
||||
|
||||
I've been playing with z-index values all morning but this is apparently a common issue with flash too and there is no solution for that either- when something loads via a plugin all bets are off on how it displays Will keep looking but it does not look good.
|
#13
|
|||
|
|||
Nice BB code, but page on forum doesn't scroll with mouse wheel on Firefox.
|
#14
|
|||
|
|||
I had the same glitch with FF no matter where I clicked, then it just started working right.
|
#15
|
||||
|
||||
The flash issue is actually easy to solve. This PDF issue however requires you to wrap it in an iframe and then use a lower z-index then the popup menu. Its a pain but for now not a big issue for me. Maybe Adobe will fix it in a new plugin update???
|
#16
|
||||
|
||||
I actually tried the iframe 'solution' I found posted but in fact it still wasn't working for me even with the iframe-div-iframe codes I found.
|
#17
|
||||
|
||||
I think the iframe and z-index solution will only work if code is added to the navbar template to define its z-index. So that way the navbar popups will be higher then the PDF iframe. That should allow the menus to open over the PDF. It might be worth it to ask over at vBulletin for some help or maybe with some of the big names over here even...
|
#18
|
||||
|
||||
I don't think the navbar template is the issue, to the browser it's all the same web page, it doesn't know if some code is in the navbar template and some code is in showthread or postbit etc... also using this in the navbar is out of the question anyway for obvious reasons.
I put a lot of time searching the web for an answer for this and it always comes back to just not possible because the way plugins are handled by the browser. |
#19
|
|||
|
|||
OK, I been messing with this over at the forum, and it does seem to have a hang up in FF. I tried IE and works fine. In FF it loads everything just fine, but the scroll will only work on the PDF. No matter where you click on the forum, it doesn't remedy it.
BUT, you can get around it by keeping your bookmarks sidebar open, and after you load a page with a PDF, click the scroll bar on the sidebar, and it fixes things in the browser for some reason. ???? This is very consistent as well, using FF 2.x and 3.x. Does this sound like something you can remedy for us FF users? Or should we just deal with it and use the back door I found? Not really that much of a pain now that I know how to get around it, but it would be nice if we didn't have to. Other then that, I gotta say I still like it. :up: |
#20
|
||||
|
||||
Yeah sorry there's nothing I'm going to be able to do about that unfortunately- I'm pretty much stuck with however the plugin and browser is programmed to behave.
|
#21
|
||||
|
||||
Question... Is there a way with the bb code to block the ability to download the embedded PDF file. Meaning the save button on the toolbar would not show or be whited out?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|