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: Feb 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:	1214
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 17 Jul 2013 00: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 12:47
BB Code Enhancements [BB Code] YouTube Javascript Embed wii vBulletin 3.8 Add-ons 21 10 May 2011 10:28
BB Code Enhancements [BB Code] YouTube Javascript Embed wii Modification Graveyard 36 13 May 2008 10:10

Comments
  #2  
Old 14 Aug 2010, 21:33
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Jan 2007
Works Great!

However... I changed the width to: width="100%". Looks even nicer using a %. This way the pdf view window is the full size of the post. In my case I used this inside of a vbadvanced bb code page with no wrapper.

Thanks!
__________________
Yotsume
Kaydev Media Productions
Check out my mods
:
EYO-AIM, FlashChat Combo-Module for vBadvanced 3.6x or 3.7x
Reply With Quote
  #3  
Old 14 Aug 2010, 21:55
SublimeBoa SublimeBoa is offline
 
Join Date: Nov 2009
Simple to install, user friendly and works nicely.

Thanks!
Reply With Quote
  #4  
Old 14 Aug 2010, 21:57
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by yotsume View Post
Works Great!

However... I changed the width to: width="100%". Looks even nicer using a %. This way the pdf view window is the full size of the post. In my case I used this inside of a vbadvanced bb code page with no wrapper.

Thanks!
Thanks for the suggestion, I personally prefer the smaller box but whatever works for you is good.

Originally Posted by SublimeBoa View Post
Simple to install, user friendly and works nicely.

Thanks!
No problem.
__________________
-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
  #5  
Old 15 Aug 2010, 03:17
SublimeBoa SublimeBoa is offline
 
Join Date: Nov 2009
Is there a way to adjust it so the scroll wheel works when outside the pdf itself? It scrolls the pdf just fine, but will not scroll the web page.

Thanks
Rick
Reply With Quote
  #6  
Old 15 Aug 2010, 03:18
SublimeBoa SublimeBoa is offline
 
Join Date: Nov 2009
Never mind. Guess it just wanted to mess with me. Works fine now.
Reply With Quote
  #7  
Old 15 Aug 2010, 03:25
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Jan 2007
Your scroll wheel will detect where you have clicked on the page. So if you clicked on the pdf scroll bar your scroll wheel will move that bar instead of the pages bar. Click on a portion of the page and it will detect the pages scroll bar instead.
__________________
Yotsume
Kaydev Media Productions
Check out my mods
:
EYO-AIM, FlashChat Combo-Module for vBadvanced 3.6x or 3.7x
Reply With Quote
  #8  
Old 15 Aug 2010, 03:39
SublimeBoa SublimeBoa is offline
 
Join Date: Nov 2009
Thanks!
Reply With Quote
  #9  
Old 15 Aug 2010, 06:34
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Jan 2007
There is a small problem with the BB Code. Popup menus in VB will open under the embedded PDF. (see attached screenshot)

I believe the same way that flash can be made to open under menus... the PDF can be made to as well by adding a line of code that makes it "transparent".

UPDATE: Using a transparent or opaque mode will not work with a PDF because the adobe plugin doesn't currently support them for PDFs yet. I hope another solution to this issue can be found...
Attached Images
File Type: jpg Popup Menu Issue.jpg (35.6 KB, 21 views)
__________________
Yotsume
Kaydev Media Productions
Check out my mods
:
EYO-AIM, FlashChat Combo-Module for vBadvanced 3.6x or 3.7x

Last edited by yotsume; 15 Aug 2010 at 07:38.
Reply With Quote
  #10  
Old 15 Aug 2010, 15:50
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
yotsume- I can confirm I do have this bug too, thanks... I guess the work around for now is to leave some empty lines before embedding the PDF, though for me it's not nearly as big an issue because of my choice to have a fixed width and most of the menus still very visible. This doesn't seem like it would be a problem if a pdf was posted in anyplace but the top of the first post.

I will see if I can find a solution.
__________________
-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
  #11  
Old 15 Aug 2010, 16:56
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
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.
__________________
-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
  #12  
Old 15 Aug 2010, 19:10
trotskid trotskid is offline
 
Join Date: Feb 2009
Nice BB code, but page on forum doesn't scroll with mouse wheel on Firefox.
Reply With Quote
  #13  
Old 15 Aug 2010, 21:24
SublimeBoa SublimeBoa is offline
 
Join Date: Nov 2009
Originally Posted by trotskid View Post
Nice BB code, but page on forum doesn't scroll with mouse wheel on Firefox.
I had the same glitch with FF no matter where I clicked, then it just started working right.
Reply With Quote
  #14  
Old 16 Aug 2010, 05:24
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Jan 2007
Originally Posted by BirdOPrey5 View Post
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.
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???
__________________
Yotsume
Kaydev Media Productions
Check out my mods
:
EYO-AIM, FlashChat Combo-Module for vBadvanced 3.6x or 3.7x
Reply With Quote
  #15  
Old 16 Aug 2010, 05:34
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
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.
__________________
-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
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 00:18.

Layout Options | Width: Wide Color: