Tunisia
|
Edited by mo5bzn at 2014-6-4 23:38
In this thread I'll show how to add a pdf file directrly in the thread.
First go to AdminCP>Styles>Editor Settings>BB Code
Add a new field named as pdf.
Then click on Details and add information :
Tag(s):
Replacement content:
- <p align="center">
- <iframe src="{1}" style="width: 100%; height: {2}px;" frameborder="0"></iframe></p>
Copy the Code
Example:
Explanation:
- Add pdf file directly in the thread
Copy the Code
Number of parameters:
Parameter prompt:
Now the bb code is added; so when creating a thread, file url and file height have to be added :
file url : is simply the url of a pdf file
file height : despite the width which is fixed to 100% that means it perfectly fit to the editor's width, the height of the file must be typed, a 800px height is perfect to fit the whole pdf page, and if < 800px you have to scroll up and down to browse the file. Note that no need to type px after the typed height, it's just mentioned to avoid any problem.
Finally, do not forget to rename this image as bb_pdf.gif (or whatever you typed) and upload it to static/image/common.
Note : the browser should support pdf reading to view the file properly.
Special thank to @Dr AM. |
This post contains more resources
You have to Login for download or view attachment(s). No Account? Register
x
Rate
-
View Rating Log
|