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: Jan 2020 I like it Show Printable Version Email this Page

vB Version: 4.0.x Rating: (14 votes - 5.00 average) Installs: 142
Released: 13 Aug 2010 Last Update: Never Downloads: 0
Not 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: http://www.juot.net/forums/showthread.php?t=46803

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

Download Now

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

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 BBCode: Embed PDF Files (No JavaScript/No iFrames) (BB Code) BirdOPrey5 vBulletin 3.8 Add-ons 23 27 May 2012 18:28
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

  #46  
Old 05 Mar 2012, 12:47
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Your code has a useless "classid" parameter... you should at least remove that from the code-

Your also missing the "type" from the <embed>


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

Not tested but that would be the appropriate code using both <object> and <embed>.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #47  
Old 12 Apr 2012, 00:51
ricardoNJ's Avatar
ricardoNJ ricardoNJ is offline
 
Join Date: Sep 2008
Testing..........
Reply With Quote
  #48  
Old 13 Apr 2012, 22:31
Trevor Matthews Trevor Matthews is offline
 
Join Date: Oct 2010
I am using Firefox and 4.1.12, the mod is working just great except that I can only scroll the pdf, the thread will not scroll wherever I try and click on the page.

Is there anything I can do about this.

I went to your demo page but can only see a list of BB codes and not a pdf.
Reply With Quote
  #49  
Old 14 Apr 2012, 01:28
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Fixed demo link- but there is no way to solve the scrolling issue. That's the same on all browsers.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #50  
Old 14 Apr 2012, 19:24
Trevor Matthews Trevor Matthews is offline
 
Join Date: Oct 2010
Ok, thanks for letting me know.
Reply With Quote
  #51  
Old 15 Apr 2012, 17:43
lemonadesoda lemonadesoda is offline
 
Join Date: Dec 2009
Originally Posted by Lewenhaupt View Post
...the bbcode appears to be working perfectly in firefox. But I switched to chrome a while ago, and there the attachments won't show up. (edit:
PDF files that are hosted on the site - uploaded to a folder through ftp - do work on chrome - but not through inline "attachments".)
I have the same issue, hence my post a year ago http://www.vbulletin.org/forum/showp...7&postcount=12

I have fixed it. How?

1./ Update to LATEST Acrobat Reader 10.1.3
2./ Update to latest Chrome
3./ Launch chrome
4./ In address bar type chrome://plugins
5./ Enable Acrobat Reader plugin (which will automatically disable Chrome PDF reader plugin)

Inline attachments should now work also within the bbcode as PDF inline read. There seems to be a bug in the embedded Chrome PDF reader that is not caching or cannot resolve the indirect link to the attachment PDF. This problem doesnt not occur with IE, and was a solution discovered by trial and error. No logic there!

Try it out and report back to see if this is a general solution, or just worked for me.
Reply With Quote
  #52  
Old 15 Apr 2012, 22:19
etca etca is offline
 
Join Date: Feb 2011
installed on 4.1.12
Reply With Quote
  #53  
Old 30 Sep 2012, 18:43
stl7997 stl7997 is offline
 
Join Date: Nov 2009
Is this working for anybody that has 4.2? I just get a empty gray box. I've tried Chrome, FF, and IE and it's all the same. Just curious.
Reply With Quote
  #54  
Old 30 Sep 2012, 19:02
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by stl7997 View Post
Is this working for anybody that has 4.2? I just get a empty gray box. I've tried Chrome, FF, and IE and it's all the same. Just curious.
It should work... do you have a PDF reader installed on your computer/browser?

If you can post a link to a page with the problem.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #55  
Old 30 Sep 2012, 19:19
stl7997 stl7997 is offline
 
Join Date: Nov 2009
I've got a PDF reader. Here's a link to one of the embeds.

http://forum.wapscalc.com/showthread...romotion-Study
Reply With Quote
  #56  
Old 30 Sep 2012, 20:27
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
BOP5@

Your demo doesn't work for me either - it seems to specifically want the Adobe plug-in. I'm running Kubuntu 12.04, 64-bit, with Okular version 0.15.1. Okular is an Adobe Reader compliant Linux .pdf viewer/reader.
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | ZB BLOCK | StopForumSpam
Reply With Quote
  #57  
Old 30 Sep 2012, 22:50
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by stl7997 View Post
I've got a PDF reader. Here's a link to one of the embeds.

http://forum.wapscalc.com/showthread...romotion-Study
The file you are linking to does't exist:


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

check the spelling maybe... ?m
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #58  
Old 30 Sep 2012, 22:52
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Snowhog View Post
BOP5@

Your demo doesn't work for me either - it seems to specifically want the Adobe plug-in. I'm running Kubuntu 12.04, 64-bit, with Okular version 0.15.1. Okular is an Adobe Reader compliant Linux .pdf viewer/reader.
There's nothing in the code that can specify a specific PDF reader. It's simply your PDF viewer may not work embedded in web documents.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #59  
Old 18 Nov 2012, 17:32
ikorolis's Avatar
ikorolis ikorolis is offline
 
Join Date: Sep 2006
Real name: Ilias
thanks nice plug in but no working to my vb 4.2pl3 any browser testing

uninstalled

i see only one box with html code no pdf.
__________________
The Internet World
http://www.theinternetworld.org

Last edited by ikorolis; 18 Nov 2012 at 17:46.
Reply With Quote
  #60  
Old 18 Nov 2012, 18:28
Mr_Running Mr_Running is offline
 
Join Date: May 2010
Works for me 4.2pl3 in Firefox 16 and IE9
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 02:42.

Layout Options | Width: Wide Color: