vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=151637

Download Thread as PDF
by magnus
07 Jul 2007 22:32

1 Attachment(s)
Keywords: SHOWTHREAD, PDF, Abobe, export, download, thread

Description:
Allows you to download an entire thread in PDF format, viewable in any PDF viewer such as Adobe Acrobat or Foxit Reader.

Details:
Previously, there was a modification that performed this task however that modification is no longer supported and the backend used was seriously out-of-date and suffered from quite a few bugs. I've gone ahead and created this modification around an entirely different backend, one which works quickly and flawlessly.

Requirements:
  • PHP Version 4.0.4 or greater
  • html2ps (link)
  • ps2pdf (link)

Notes:
Please note, these prerequesits may already be installed on your system. If you're unsure, simply install the modification and upon usage it will inform you if something is missing.

If you happen to be fortunate enough to be using Debian, the above requirements can be installed with the following packages:

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


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




Usage:
Under "Thread Tools", simply select "Download as PDF" which will be located under "Show Printable Version". Easy, eh?



Installation:
  1. Download and unzip the pdfthread101.zip archive.
  2. Upload necessary files to their respective locations.
  3. Import the product-pdfthread.xml via the Product Manager.
  4. ???
  5. Profit!

Notes:
All template modifications are made automatically. They attach to pretty common text locations, so modified styles shouldn't* be a problem.



Comments:
As with all my hacks, this modification is provided free of charge. However, if you find this product useful and have money burning a hole in your pocket, feel free to make a small donation, I won't mind.. really. :)

Version History:
  • 1.0.1 - Initial release, here's to hoping...

Currently Known Bugs:
  • None

* Please note that this modification was developed on a forum with a userbase of 1 (myself). I've tested it for basic functionality but I cannot guarantee functionality or behavior on your forum. So, please -- make backups before installing this product!

magnus 07 Jul 2007 22:32

Reserved.

jasculs 07 Jul 2007 23:20

What do I do with these?

* html2ps (link)
* ps2pdf (link)

I'm not sure where to put them and I couldn't quite understand the installation instruction.

magnus 07 Jul 2007 23:26

Quote:

Originally Posted by jasculs (Post 1285413)
What do I do with these?

* html2ps (link)
* ps2pdf (link)

I'm not sure where to put them and I couldn't quite understand the installation instruction.

The applications html2ps and ps2pdf are both dependencies of this modification. If they're not already present on your system, they will need to be downloaded, compiled and installed. These utilities are not vBulletin related, they have absolutely nothing to do with vBulletin.

Chances are, if you're using a shared hosting account, these are already installed. Before trying to install them, I would just attempt to run the modification first and see if they're already present.

FleaBag 07 Jul 2007 23:46

I have printthread completely removed for SEO purposes. This is just the alternative I've been waiting for! Thanks. :)

Barakat 08 Jul 2007 01:27

all the time :- safe mode effect .

Quote:

Warning: unlink() [function.unlink]: SAFE MODE Restriction in effect. The script whose uid is 583 is not allowed to access /tmp/thread5918aSSCNI owned by uid 48 in /threadtopdf.php on line 179
HTML_ToPDF Error: html2ps [/usr/bin/html2ps] not executable
dont we have a way to prevent it .

Hornstar 08 Jul 2007 01:28

This really looks like a good feature for any forums. Thanks for releasing, will test it out shortly.
Thanks.

ssslippy 08 Jul 2007 03:58

Quote:

Originally Posted by Barakat (Post 1285476)
all the time :- safe mode effect .

dont we have a way to prevent it .

Unfortunally your host has safe mode. You would need to contact them to resolve this issue.

Quantnet 08 Jul 2007 04:14

installed this and html2ps but still have the error
HTML_ToPDF Error: html2ps [/usr/bin/local/html2ps] not executable

I changed the path in /includes/class_threadtop.php to /usr/bin/local/html2ps to no avail


This mod requires the use a direct access to their server. What about those on shared hosting ?

magnus 08 Jul 2007 04:53

A few friends of mine run vBulletin sites on shared hosting and they were able to use this modification no problem. Really, it's hit or miss with some shared hosting providers.

The html2ps error you're receiving is claiming the binary isn't set to executable. What are the permissions? Did you install from source or did you use a package (ie. rpm, deb)?

A simple chmod 755 should fix it (provided you have rights to do that).

Quantnet 08 Jul 2007 05:14

i'm on a VPS so i have full control over my server. Here is the step i used

wget http://user.it.uu.se/~jan/html2ps-1.0b5.tar.gz
tar xvfz html2ps-1.0b5.tar.gz
cd html2ps-1.0b5
./install

Click yes and set directory..it get installed in /usr/local/bin/

cd /usr/local/bin/
chmod 755 html2p*


Still the same error...did i chmod correctly ? What do i miss ?

soletrader 08 Jul 2007 06:17

anyone have the link to the older version of this hack?

ragtek 08 Jul 2007 06:35

Quote:

Originally Posted by FleaBag (Post 1285443)
I have printthread completely removed for SEO purposes. This is just the alternative I've been waiting for! Thanks. :)

this is unnecessary.

this link is marked with
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

so the bots aren't indexing it and so you woun't have double content

SuperTaz 08 Jul 2007 07:16

Is there a screenshot of this?

Lizard King 08 Jul 2007 09:33

Quote:

Originally Posted by ragtek (Post 1285581)
this is unnecessary.

this link is marked with
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

so the bots aren't indexing it and so you woun't have double content

Every search engine bot doesn't rely on rel="nofollow" .


All times are GMT. The time now is 09:13.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.