Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
BBCode: Embed PDF Files (No JavaScript/No iFrames) (BB Code) Details »
BBCode: Embed PDF Files (No JavaScript/No iFrames) (BB Code)
Mod Version: 1.00, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Jun 2019 I like it Show Printable Version Email this Page

vB Version: 3.8.x Rating: (3 votes - 5.00 average) Installs: 24
Released: 13 Aug 2010 Last Update: Never Downloads: 0
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 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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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:
http://www.vbulletin.org/forum/attac...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 Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	ss_pdfembed.jpg
Views:	1219
Size:	62.5 KB
ID:	120786  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
BB Code Enhancements ZippyShare.com shared music BBCode (Embed MP3 files in your forum!) BirdOPrey5 vBulletin 3.8 Add-ons 6 16 Jul 2013 23:44
BB Code Enhancements ZippyShare.com shared music BBCode (Embed mp3 files in you forum!) BirdOPrey5 vBulletin 4.x Add-ons 11 01 Sep 2011 11:47
BB Code Enhancements [BB Code] YouTube Javascript Embed wii vBulletin 3.8 Add-ons 21 10 May 2011 09:28
BB Code Enhancements [BB Code] YouTube Javascript Embed wii Modification Graveyard 36 13 May 2008 09:10

  #16  
Old 16 Aug 2010, 07:46
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Jan 2007
Originally Posted by BirdOPrey5 View Post
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.
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...
__________________
Yotsume
Kaydev Media Productions
Check out my mods
:
EYO-AIM, FlashChat Combo-Module for vBadvanced 3.6x or 3.7x
Reply With Quote
  #17  
Old 16 Aug 2010, 14:24
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
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.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #18  
Old 17 Aug 2010, 00:55
SublimeBoa SublimeBoa is offline
 
Join Date: Nov 2009
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.
Reply With Quote
  #19  
Old 17 Aug 2010, 02:15
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
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.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #20  
Old 22 Aug 2010, 19:41
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Jan 2007
Block Download?

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?
__________________
Yotsume
Kaydev Media Productions
Check out my mods
:
EYO-AIM, FlashChat Combo-Module for vBadvanced 3.6x or 3.7x
Reply With Quote
  #21  
Old 22 Aug 2010, 23:04
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
No, not with the BB Code... that is a setting that would have to be made by the software that created the PDF file- I don't know the specifics but I know you can set advanced PDF options in Adobe Acrobat so files are blocked from things live saving, editing, or printing.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #22  
Old 23 Aug 2010, 00:19
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Jan 2007
Originally Posted by BirdOPrey5 View Post
No, not with the BB Code... that is a setting that would have to be made by the software that created the PDF file- I don't know the specifics but I know you can set advanced PDF options in Adobe Acrobat so files are blocked from things live saving, editing, or printing.
I did up the security in my PDF so you can not save it. However, once you embed the PDF with this code the save button becomes active again. So my way around this for my needs is to PW protect the PDF. This requires forum members to enter a PW to view the PDF.
__________________
Yotsume
Kaydev Media Productions
Check out my mods
:
EYO-AIM, FlashChat Combo-Module for vBadvanced 3.6x or 3.7x
Reply With Quote
  #23  
Old 23 Aug 2010, 01:39
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Wow that sounds like a serious security flaw... did you by chance confirm if you could actually save the file if you clicked on the button? Maybe it wouldn't actually work?
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #24  
Old 27 May 2012, 17:28
Akeles Akeles is offline
 
Join Date: May 2010
Nice BB code
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:14.

Layout Options | Width: Wide Color: