vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - BBCode: Embed PDF Files (No JavaScript/No iFrames) (BB Code) (https://vborg.vbsupport.ru/showthread.php?t=248549)

RazKaziRo 06-21-2013 07:44 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2429230)
And you put in a post, for example:

[pdf]http://www.qapla.com/ju/PDFOpenParameters.pdf[/pdf]

??

yes i put exactly like that

BirdOPrey5 06-21-2013 09:40 AM

Then I don't know what to tell you, sorry. It works on dozens, maybe hundreds, of other VB forums.

You don't have any "Replacement Variables" setup that could be interfering, do you?

ar15dcm 06-23-2013 11:43 AM

The document view when I use it is skewed to right and down. Also when the post I have it embedded in comes up the browser looses focuses and focus is controlled by the embedded .pdf window.

I used the adobe .pdf document that discusses the controls and switches when embedding .pdf files and one of the controls is

http://www.xxxxx.com$fitH

This is suppsed to fit the document wigth wise in the viewable window... not.

Snowhog 06-23-2013 05:38 PM

Just added this BBCode and tested in Chromium Browser. Had to download Google Chrome .deb package, extract the contents and copy the libpdf.so file to /usr/lib/chromium-browser as Chromium doesn't have a .pdf plug-in (Google Chrome does). Restarted Chromium and went to your demo page and voila, embedded .pdf document! Just too cool. :cool: :cool:

Even though this MOD is from 2010, I've marked it as recommended for MOTM and of course, rated it Excellent. BOP5 continues to amaze me with his skills at providing improvements to vBulletin.

Digital Jedi 06-24-2013 03:55 PM

Quote:

Originally Posted by RazKaziRo (Post 2429193)
thanks for the help but i check 3 times for the code and download all pdf viewer there is and try from 3 different computers and 3 different browsers

any ideas?

It really does look like there's an error in your HTML Replacement code. There's a dot where there should be a quotation mark. In addition, it almost looks like you have the code in there twice. Double check that you also don't have a plugin that automatically tries to parse PDFs installed.

RazKaziRo 06-27-2013 10:55 AM

Quote:

Originally Posted by Digital Jedi (Post 2430203)
It really does look like there's an error in your HTML Replacement code. There's a dot where there should be a quotation mark. In addition, it almost looks like you have the code in there twice. Double check that you also don't have a plugin that automatically tries to parse PDFs installed.

i triple check it i copied the text exactly and follow the instructions
can you help me ?
i can give you admin premission for testing

thanks

Raz

BirdOPrey5 07-06-2013 09:28 PM

Sorry guys... This is a simple bbcode, if it doesn't work I don't know why, it works on dozens of other sites.

There is nothing I can change in this mod to make it magically work on a site it doesn't work on now- the issue is external from this code.

I am marking this as unsupported because I do not have time to give the support some people are asking for.

I would suggest anyone having issues-
1) Try with a different browser
2) Make sire you have Adobe PDF Reader Plugin for your browser installed
3) Double/triple check the correct code in the BB Code Manager
4) Try from another computer

xtragic 08-18-2013 05:44 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2432462)
Sorry guys... This is a simple bbcode, if it doesn't work I don't know why, it works on dozens of other sites.

There is nothing I can change in this mod to make it magically work on a site it doesn't work on now- the issue is external from this code.

I am marking this as unsupported because I do not have time to give the support some people are asking for.

I would suggest anyone having issues-
1) Try with a different browser
2) Make sire you have Adobe PDF Reader Plugin for your browser installed
3) Double/triple check the correct code in the BB Code Manager
4) Try from another computer

Actually it doesn't work. I've tried this on my forums and know how to write xhtml, xml, PHP and LUA. I can only figure there has to be something in one of the VB updates that is preventing it from property embedding.

BirdOPrey5 08-22-2013 10:33 AM

1 Attachment(s)
It works fine on my 3.8.7 and 4.2.1 forums.

Can you see the PDF on this page? http://www.qapla.com/mods/showthread...e-Embedded-PDF

This is what it looks like to me (working):

https://vborg.vbsupport.ru/attachmen...1&d=1377171151

xtragic 09-02-2013 03:12 AM

After reinstalling it a second time, it now works on 4.1.11. Not sure why it wouldn't work the first time, unless I copied the code wrong. =/

kf4eok 09-20-2013 08:10 PM

When I use this bb code it will work in the test block below bb code manager but it doesn't work in a post. I get a black block.
Also the Click here to view or download the file directly dose not work.

any ideas of what I could be doing wrong?
I am running 4.2
Here is my post link:
http://www.gonejetskifishing.com/for...&p=128#post128

kf4eok 09-20-2013 08:32 PM

Quote:

Originally Posted by kf4eok (Post 2446963)
When I use this bb code it will work in the test block below bb code manager but it doesn't work in a post. I get a black block.
Also the Click here to view or download the file directly dose not work.

any ideas of what I could be doing wrong?
I am running 4.2
Here is my post link:
http://www.gonejetskifishing.com/for...&p=128#post128

I found what I was doing wrong. My link was incorrect.

john7911 10-12-2013 06:32 PM

installed

thank you :)

good work :up:

blackberry 11-11-2013 05:43 PM

how to make it work for mediafire
http://www.mediafire.com/view/d03dsz...Episode_10.pdf
??

Digital Jedi 11-13-2013 07:20 PM

Quote:

Originally Posted by blackberry (Post 2459971)
how to make it work for mediafire
http://www.mediafire.com/view/d03dsz...Episode_10.pdf
??

Unless you have a direct link to the PDF file, you can't. The embed code is looking for an actual PDF file. Not a web page URL that happens to end in .pdf, but instead has a PDF embeded in it.

blackberry 01-22-2014 07:58 PM

Quote:

Originally Posted by Digital Jedi (Post 2460474)
Unless you have a direct link to the PDF file, you can't. The embed code is looking for an actual PDF file. Not a web page URL that happens to end in .pdf, but instead has a PDF embeded in it.

never mind, i figure out how to do for box.com

kf4eok 01-28-2014 12:42 PM

I have changed the bbcode so that users that see a blank pdf will have a link to click to view the file.

-----IF THE PDF IS BLANK CLICK HERE TO VIEW.-----

~~ok my bbcode settings are now as below:
----------------------------------------------------------------------------------------------------------------------
Title = embed_pdf
BB Code Tag Name = pdf
Replacement =
<div align="center">
<p align="center">
<p><a href="{param}">---------------IF THE PDF IS BLANK CLICK HERE TO VIEW.--------------- </a></p>
<br />
<object type="application/pdf" data="{param}" width="800" height="900">
<param name="src" value="{param}" />
<embed src="{param}" type="application/pdf" width="800" height="900">
<p><a href="{param}">Click here to view or download the file directly.</a></p>
</object><br />
</embed>
</p></div>

Example = [pdf]http://www.baymeadowscommunitycouncil.net/pdf/visionplan.pdf[/pdf]
Description = Allows you to embed a pdf file.
Use {option} = Yes

Remove Tag If Empty = Yes
Disable BB Code Within This BB Code = Yes
Disable Smilies Within This BB Code = Yes

Disable Word Wrapping Within This BB Code = Yes
Disable Automatic Link Parsing Within This BB Code = Yes
----------------------------------------------------------------------------------------------------------------------

This seems to work for now until a better solution is found.
Anyone that sees a problem with this please let me know and show me a better way of doing this.
Thanks

btedition 02-10-2014 04:11 AM

Working with 4.2.0. Marked as installed, thanks!

tini_lam 09-28-2014 12:18 PM

don't work with mediafire...

blind-eddie 03-18-2017 08:14 PM

Hey Joe, your pfd bbcode was working great on a vb4 site before it was changed to https.
Any idea what would cause it to stop functioning?
The acp is not https and the pdf bbcode example works fine there, thoughts?

Alan_SP 03-20-2017 04:10 PM

Try pdf from https source. And check in browser if it blocked http scripts. And if it is, what happens if you allow them.

BirdOPrey5 03-22-2017 09:21 AM

Weird, but confirmed same issue on my own site. I guess browsers just don't trust pdf files, even if loaded over https. I suppose its because these days PDF files can submit data on their own outside of the security of the rest of the page it is loaded on. I haven't checked yet for any fix, too many other things to deal with on the https conversion. But if I find a fix I'll post it.

Gn_Snake 03-22-2017 10:18 AM

I confirm to me does not work. It worked perfectly before migration

BirdOPrey5 03-22-2017 10:18 PM

Seems changing to an <object> tag instead of embed makes it work... There are some other small changes to the replacement code:

Code:

<div align="center">
<p align="center">
<object data="{param}" type="application/pdf" style="width:700px; height:900px;">
<br />
<a href="{param}">Click here to view or download the file directly.</a>
<br />
</object>
</p></div>


blind-eddie 03-22-2017 11:00 PM

Thanks Joe, What small changes?

blind-eddie 03-22-2017 11:07 PM

Sorry Joe, http link still refuse to work for me.

BirdOPrey5 03-23-2017 11:00 AM

Quote:

Originally Posted by blind-eddie (Post 2584217)
Thanks Joe, What small changes?

You can compare it to the one in the original post, I didn't change it. Things like width and height specified as CSS now.

Quote:

Originally Posted by blind-eddie (Post 2584218)
Sorry Joe, http link still refuse to work for me.

All I can say is it works for me. PDF file is also on my own https server. sure it won't show if loaded from http link.

Make sure you edit the post so it rebuild the cache if you didn't make a new post or truncate the postparsed table.

Gn_Snake 03-24-2017 02:53 PM

Thx BirdOPrey5, now it's ok!

Drucifer 04-19-2019 06:51 PM

Is there a PDF Viewer in the works for vB v5?


All times are GMT. The time now is 03:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01303 seconds
  • Memory Usage 1,808KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (29)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete