Loading...
 
Features / Usability

Features / Usability


use of mediaplayer plugin

posts: 91

I am trying to display a pdf file from the file gallery in a page.
I am using

mediaplayer(src="tiki-download_file.php?fileId=327" , type="pdf")}

This opens a frame but downloads the pdf rather than displaying it.

Where am I going wrong?

Note i have left out the { before the first word mediaplayer otherwise it starts to run here as well :-)

Note I am using tikiwiki v11.0

Any help would be appreciated. :-)

posts: 214

What browser are you using? If you are using Firefox, it may be the control setting: Tools > Options > Applications, then Check what "Adobe Acrobat Document" action is set to.

To view a pdf in Firefox see: http://support.mozilla.org/en-US/kb/view-pdf-files-firefox-without-downloading-them

And as to stripping the first "{", this is a Tiki, wiki parsed, forum, you can display the code with the CODE plugin:

{CODE()} {mediaplayer(...)} {CODE}

or use the "no processing" tag:

~np~ {mediaplayer(...)} ~/np~

Tom

posts: 91

hi there Tom

Thanks for the advice re the np tag etc.

I have tried this with firefox / chrome and IE, all seem to behave the same way.

With each of these pdf's normally open in the browser.

I have tried another computer in the house as well - same result.

I assumed that the purpose of this plugin would be to override these sorts of settings anyway and render the pdf in the page?

By the way this problem only occurs when using files in the gallery (stored in a directory).

When I couldn't get this to work in the past I created another directory and uploaded the files directly, rather than thought tikiwiki, and used the external url and this worked fine.
Just thought it would be nice to be able to avoid uploading files twice ( as I want them to be downloadable from the gallery as well).
My previous attempts were with V10.0 and 10.2.

Regards,

Rod



posts: 91

hi there Tom

Oh great works perfectly.... so simple....
Yes, I was aware of the "display9" example, but assumed that that was a placeholder for the directory / filename. I couldn't have imagined that it literally meant display fileId 9 :-)

Thanks again :-)

Regards,

Rod


posts: 72 United States
Good catch. I had this same issue. I updated the docs so hopefully this won't confuse others.

posts: 91

Hi there Zac

Thanks for that, its much clearer now. :-)

Rod