Advertisement:

Author Topic: See PDF in Posts  (Read 150231 times)

Offline BHashman

  • Semi-Newbie
  • *
  • Posts: 13
Re: See PDF in Posts
« Reply #40 on: March 19, 2008, 12:33:00 PM »
this works in 1.1.4 just fine

in the subs.php file you need to place what [unknown] has listed above
and here is mine:
Code: [Select]
// PDF [pdf]example.pdf[/pdf]
array(
'tag' => 'pdf',
'type' => 'unparsed_content',
'content' => '<object type="application/pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" data="$1" width="640" height="480"><param name="src" value="$1" /><a href="$1" target="_blank">$1</a></object>',
'disabled_content' => '<div>PDF: $1</div>',
'block_level' => true,
),
// DWF [dwf]example.dwf[/dwf]
array(
'tag' => 'dwf',
'type' => 'unparsed_content',
'content' => '<object type="application/dwf" classid="clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF" data="$1" width="640" height="480"><param name="src" value="$1" /><a href="$1" target="_blank">$1</a></object>',
'disabled_content' => '<div>PDF: $1</div>',
'block_level' => true,
),


I did declare the bbcode type [pdf] in the Subs-Post.php file but I did not declare the [dwf] tag.  Thus the declaration in the Subs-Post.php file is not necessary, as [unknown] had already mentioned above.

Please note that also included is the class id to embed a autodesk autocad DWF file.  This is a great tool if you are using drawings and need to zoom around them right in your page.
Also you can edit and create DWF files for free and it's embedded in ms Vista.
download stuff here:
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=8824283 [nofollow]

next - I would like to see a pop up window - like the web page previewers out there - to show the thumbnail of a DWF or PDF file that is an attachment.

more later...
« Last Edit: March 19, 2008, 12:36:26 PM by BHashman »


Offline samvirtual

  • Semi-Newbie
  • *
  • Posts: 53
Re: See PDF in Posts
« Reply #42 on: April 24, 2008, 06:49:12 PM »
awesome! works like a charm. tried on smf 1.14

Offline chinaren

  • Jr. Member
  • **
  • Posts: 302
  • Gender: Male
    • Tome City - all about stories
Re: See PDF in Posts
« Reply #43 on: December 02, 2008, 08:53:45 PM »
Wow, this really works well!   Good one!  Thank-you.

(Works on my heavily modded 1.1.7 forum btw).
www.tomecity.com - Story/writing forum
www.TiredofDeath.com - Free to download fantasy ebook
www.ChinarensBlog.net - My blog.

My books:

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,673
  • Gender: Male
  • Premium SMF Themes
    • idesign360 on Facebook
    • @idesign360 on Twitter
Re: See PDF in Posts
« Reply #44 on: December 02, 2008, 08:58:12 PM »
Wow, this really works well!   Good one!  Thank-you.

(Works on my heavily modded 1.1.7 forum btw).

Yes indeed...

http://www.chevyavalancheclub.com/index.php?topic=2191.0

Offline kizer

  • Jr. Member
  • **
  • Posts: 383
  • Gender: Male
    • Links4Jeeps.com
Re: See PDF in Posts
« Reply #45 on: December 03, 2008, 02:46:28 PM »
Wow that is sick to see that embeded like that. Man thats something I can tinker with myself.
Own a Jeep? Links4Jeeps.com

Offline kizer

  • Jr. Member
  • **
  • Posts: 383
  • Gender: Male
    • Links4Jeeps.com
Re: See PDF in Posts
« Reply #46 on: December 03, 2008, 02:59:54 PM »
Wow, I just sent myself a PDF embeded in a PM and it worked perfectly. Man I can't tell you how many times I had to Link a PDF to somebody now I can just embed and call it done. If I could only figure out how to mask the URL in the source when somebody views it I would be in hog heaven.
Own a Jeep? Links4Jeeps.com

Offline kizer

  • Jr. Member
  • **
  • Posts: 383
  • Gender: Male
    • Links4Jeeps.com
Re: See PDF in Posts
« Reply #47 on: December 03, 2008, 07:07:09 PM »
Seems to work perfectly in Internet Explorer is there a way to get Firefox to work?
Own a Jeep? Links4Jeeps.com

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
    • IchBin.us
Re: See PDF in Posts
« Reply #48 on: December 03, 2008, 07:26:25 PM »
Works in firefox for me.
Brad "IchBin™" Grow        TinyPortal        Themes
Coding Guidelines       

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,673
  • Gender: Male
  • Premium SMF Themes
    • idesign360 on Facebook
    • @idesign360 on Twitter
Re: See PDF in Posts
« Reply #49 on: December 03, 2008, 08:02:36 PM »
Seems to work perfectly in Internet Explorer is there a way to get Firefox to work?

I use firefox and it works just as good on IE.

Upgrade your FF.

Offline kizer

  • Jr. Member
  • **
  • Posts: 383
  • Gender: Male
    • Links4Jeeps.com
Re: See PDF in Posts
« Reply #50 on: December 04, 2008, 02:15:47 AM »
Ok, when I use post #40 it works in Internet Explorer only

When I use post #24 I get an operation not allowed and it crashes Firefox on my forum and on BlueDevils

I'm using Firefox 3.04

I made sure the plugin was enabled and when it is it crashes
Options > Applications I have Adobe set to Adobe reader
« Last Edit: December 04, 2008, 02:24:27 AM by kizer »
Own a Jeep? Links4Jeeps.com

Offline kizer

  • Jr. Member
  • **
  • Posts: 383
  • Gender: Male
    • Links4Jeeps.com
Re: See PDF in Posts
« Reply #51 on: December 04, 2008, 02:42:34 AM »
Ok, bizarre enough I had to update from Adobe 7.0 to 9.0 and it works just fine. Who would of thought.

Works with 9.0 installed, but crashes my browser with 7.0
Own a Jeep? Links4Jeeps.com

Offline Smoky "Rider" Blue

  • SMF Hero
  • ******
  • Posts: 1,682
  • Gender: Female
  • It's all in your head! :p
    • smoky.blue.01 on Facebook
Re: See PDF in Posts
« Reply #52 on: December 26, 2008, 09:34:05 PM »
anyway of hiding the url to the pdf ?? that would help out a lot of people..

* SmokyBlue crosses her fingers..  ;)
Currently in secondlife, contact me for any image creation via "pm" thanks!

**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

Offline leoist

  • Newbie
  • *
  • Posts: 3
Re: See PDF in Posts
« Reply #53 on: January 03, 2009, 04:14:32 AM »
Hello everybody,
I am really new user so sorry to ask some silly questions:(
Where should I write or paste those codes given above?
I don't know the logic of the forum how does it work etc? somebody built the forum for me but now i have to handle everything.
thank you so much for your patience.

Offline Smoky "Rider" Blue

  • SMF Hero
  • ******
  • Posts: 1,682
  • Gender: Female
  • It's all in your head! :p
    • smoky.blue.01 on Facebook
Re: See PDF in Posts
« Reply #54 on: January 03, 2009, 05:27:59 AM »
best thing to do is to start at the doc's and read:

http://docs.simplemachines.org/

good luck leoist!!

and bump with my question.. anyway to hide the url??  ;)
Currently in secondlife, contact me for any image creation via "pm" thanks!

**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: See PDF in Posts
« Reply #55 on: January 03, 2009, 05:30:05 AM »
Hello everybody,
I am really new user so sorry to ask some silly questions:(
Where should I write or paste those codes given above?
I don't know the logic of the forum how does it work etc? somebody built the forum for me but now i have to handle everything.
thank you so much for your patience.


You can install that here

http://custom.simplemachines.org/mods/index.php?mod=1468

Code changes will be automatically done  ;)
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline Smoky "Rider" Blue

  • SMF Hero
  • ******
  • Posts: 1,682
  • Gender: Female
  • It's all in your head! :p
    • smoky.blue.01 on Facebook
Re: See PDF in Posts
« Reply #56 on: January 03, 2009, 05:38:26 AM »
but if you have a custom theme you must apply the edits to it as well..

where you download the mod, there is a drop down box that tells you what to edit and where..  ;)

now Duncan, how can i hide the url for this mod?? i really dont want it to be easily seen..
Currently in secondlife, contact me for any image creation via "pm" thanks!

**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: See PDF in Posts
« Reply #57 on: January 03, 2009, 05:51:31 AM »
Sources/Subs.php

Code: (find) [Select]
// PDF [pdf]example.pdf[/pdf]
         array(
            'tag' => 'pdf',
            'type' => 'unparsed_content',
            'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object type="application/pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" data="$1" width="800" height="600"><param name="src" value="$1"><embed src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>' : '<embed type="application/pdf" src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed>'),
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (isset($disabled[\'url\']))
                  $tag[\'content\'] = \'$1\';'),
            'disabled_content' => '<a href="$1" target="_blank">$1</a>',
         ),

Code: (replace with) [Select]
// PDF [pdf]example.pdf[/pdf]
         array(
            'tag' => 'pdf',
            'type' => 'unparsed_content',
            'content' => $user_info['is_guest'] ? ' You should <a href="' . $scripturl . '?action=register">register</a> or <a href="' . $scripturl . '?action=login">login</a> to see PDF files' : (($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object type="application/pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" data="$1" width="800" height="600"><param name="src" value="$1"><embed src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>' : '<embed type="application/pdf" src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed>')),
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (isset($disabled[\'url\']))
                  $tag[\'content\'] = \'$1\';'),
            'disabled_content' => '<a href="$1" target="_blank">$1</a>',
         ),
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline Smoky "Rider" Blue

  • SMF Hero
  • ******
  • Posts: 1,682
  • Gender: Female
  • It's all in your head! :p
    • smoky.blue.01 on Facebook
Re: See PDF in Posts
« Reply #58 on: January 03, 2009, 06:16:23 AM »
thanks Duncan, i gota feeling im going to love the mod..  ;)
Currently in secondlife, contact me for any image creation via "pm" thanks!

**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: See PDF in Posts
« Reply #59 on: January 03, 2009, 06:27:23 AM »
Your welcome,glad to see that you like the mod  :)
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein