View Full Version : Download a PalmDoc Version
CoffeeMugDude
07-28-2001, 10:00 PM
I have an old Palm Pilot Professional; it's like the original beetle. It doesn't surf the 'net, or do the cool stuff the latest palms do, but I can keep my address book on it, and read PalmDoc files. :cool:
I came up with this script about 6 months ago when one of my subscribers, a "palm fanatic" requested a means to get stories from my site in PalmDoc format. (The most common means of reading documents on a palm)
The palmlib script for converting text to PalmDoc is not my own (I don't even understand it!), I just "tweaked" the original VB printthread.php to return a string instead of printing it out to the browser, then pass it through the "Palm Converter"
No PHP changes are required, just 3 template changes...
Included are 2 images:
- palmpilot.gif (The VB 2.0.1 default graphic theme)
- palmpilot_transparent.gif (A transparent .gif with a palm icon, to use on your own graphics)
See a working demo at http://www.coffeeintherain.com/forums, or see the attached screenshot.
(Download .zip: http://www.coffeeintherain.com/scripts/palm_hack.zip)
Enjoy!
CoffeeMugDude
07-30-2001, 06:08 AM
As I was driving to work this morning, I realised that including a hacked version of printthread.php (as palmthread.php), was probably against the hacking rules. (VB source)
I removed the source from the zipfile, and included instructions on manually hacking printthread, line-by-line :)
Sorry 'bout that!
RobAC
07-30-2001, 03:55 PM
First of all....nice hack...I'll give this one a shot.
Second, awesome set of forums!!!!!! A community dedicated to my most favored beverage!!!!! Life does not begin without a good cup of java! :D :D
CoffeeMugDude
07-30-2001, 04:02 PM
Three sips for coffee!! :D
RobAC
07-31-2001, 12:38 AM
Not sure why, but all I get, is a blank page when I click on the "Download PalmDoc Version" link.
CoffeeMugDude
07-31-2001, 07:57 AM
Try this:
Change the final line in palmthread.php from:
onTheFlyPalmDoc($output, "$output", $pdbname);
To:
echo($output);
If that gives you some garbled rubbish when you click on the "Download" link, then we know it's palmlib that's giving you trouble.
Also, are you running PHP in safe mode?
(I am, and occasionally palmlib makes my server burp about safe mode, but it still runs)
ThomasP
07-31-2001, 01:03 PM
nice hack, very handy!
-Tom
RobAC
07-31-2001, 01:39 PM
I made the code change to palmthread.php, but I still get a blank page. My site doesn't run in safe mode.
CoffeeMugDude
07-31-2001, 04:33 PM
Evidently something went wrong while making the PHP changes... hmm
-- Contemplative expression -- :rolleyes:
Next thing I'd try is starting afresh.
- Delete palmthread.php, make a copy of printthread.php
- Run the link without any PHP changes. It should look identical to the printer-friendly version (duh!)
- Then make the template changes, testing after each change. (The text displayed will look progressively uglier)
- Finally, the last output change.
Let me know where it croaks! :)
...or try to disable gzip output in admincp. now it works for me! thx for support from author!
Hello CoffeeMugdude,
Just wanted to tell you that I really love this hack! I'm the chairman of the Dutch Palm User Group (http://www.palmclub.nl and http://www.pdaclub.nl/forums - different server to spread bandwidth) and this hack comes in really handy when users want to preserve tips, nice utils or whatever comes around in our threads.
Very nice documentation and overall a winner!
Kind regards,
Jean-Paul Horn
As the Coffee In The Rain site is down, and you could only download the attachment at the site itself, I hereby resubmit it to the community.
This is not my hack!
I'm just a happy user of this hack and I think it could be usefull to others, so here you go.
slideboxer
02-06-2002, 05:04 AM
Okay, there's a typo in the install instructions that caused me some probs
for palmthread.php the instructions say
eval("\$palmbits .= \"".gettemplate("palmthreadbit")."\";");
change palmthreadbit to palmthread_bit to match the template change given earlier in the instructions.
Things work great now, though. My users love it.
mashby
06-28-2002, 12:50 PM
Just installed this hack and it's a FANTASTIC one at that! It is the perfect hack for my new board.
Thanks DJR for posting the hack here since coffeeintherain is down.
The only thing that I've noticed is that it doesn't work with the Opera browser. I've noticed that with other attachement style links, so I don't think it's a problem with the hack per se, just more with how Opera handles certain links. It works just fine in other browsers.
dogbomb
06-29-2002, 03:51 PM
:bump: this hack is no longer there. it seems the site it was hosted at has shut down :(
Hmmmm... wake up and smell the coffee :-)
https://vborg.vbsupport.ru/showthread.php?postid=216151#post216151
- djr
Jared Press
07-04-2002, 01:16 PM
I tried setting this up but it came back with a safe made restriction error. Is there a way around this problem?
Chris M
07-04-2002, 01:37 PM
Turn of safe mode in your vBulletin options...
Nice hack:)
Satan
Jared Press
07-04-2002, 02:04 PM
Tried that but my server is runing in safe mode so I guess it will have no effect?
@ Jared: Leave 'Safe mode ON' in vB and then change this line in palmlib.php:
$tempfile = tempnam("palm", "palm");
into this:
$tempfile = tempnam("images/tmp", "palm");
By hardcoding the path the hack should work. It's working at our board and we're also running vB in safe mode.
Remember: the tmp directory should be world-writable, e.g. chmod to 777!!!
Good luck,
- djr
Jared Press
07-05-2002, 10:25 PM
djr:
Should I create this temp folder and put it in my site set to 777?
Should this temp folder be located in my root as www/site/images/temp
or
www.site/forums/images/temp?
Thanks for your reply, I am relaly looking forward to having this hack.
Jared,
We've set it up like this:
/forums/images/tmp
where tmp is chmod 777
In other words: the tmp dir is a directory under your forum's images folder.
Good luck!
p.s. What kind of forum you got?
Jared Press
07-05-2002, 10:47 PM
We ahve a PAlm OS developers support site for developers using PDA Toolbox as a development tool. Great group of people and thankfully a very successful site and rapdily gaining a name for it self. We are one of the few "software distributors" who have ever gotten free advertising out of Palmgear (I think) but then we are an affiliate.
Here is the URL if you wnat ot check it out. http://www.pdatnutsandbolts.com
Some times it is referedd to as PDATN&B sometimes simply "The Nuts&Bolts"
It is only the end of our first year (6/22) and as you can imagine some part of the site is under construction all the time. 350 pages worth. But it is getting there...where ever there is ;)
Stop by and have a look around if you like.
Thanks for your help...wish I had known about this site a year ago...but then I would have had no clue what to do with it ;)
I registered at your board and am awaiting confirmation :-)
I'm the president of the Dutch Palm User Group, but let's not be off-topic and do further chit-chat on your board.
- djr
Jared Press
07-06-2002, 12:36 AM
I got the hack installed and not kicking out out of the server. However all I am getting in the doc is the thread ID and the copy right notice no thread content.
I noticed that after I did the convert no new file is in the tmp folder. Should there be?
should the palm.lib files have this in the line:
"forums/images/tmp"?
I believe right now it is
"images/tmp"
Jared Press
07-06-2002, 02:17 AM
I guess the problem is that the hack is creating invalid characters in the title. Did you have that problems?
I come up with a title that looks like "[] [] []_ _ _ _ _ _ _"
BTW thanks for stopping buy our forum...hope you'll keep coming back.
I stopped by yours but I can't read it ...bummer.
Jared Press
07-06-2002, 03:37 AM
djr:
I've attached a copy of the palmthread file I have uplaoded to server. Maybe you can see something wrong with the code. If anything?
Maybe the palm.lib file is not CHMOD right? Should it have a particular setting?
Jared,
I'm not at my own PC right now,m but when I get home i'll post my files here with full instructions.
The hack is not really difficult, but it's probably not really updated for vB 2.2.x.
- djr
Jared Press
07-07-2002, 12:20 AM
Thanks I appreciate you taking the time to help me out.
Like I said I think it might actually be a problem with the palm.lib. I get the tempalet header and footer but none of the stuff the palm lib is supposed to convert.
Does this need to be CHMOD to work...thought about trying that but figured I might as well wait.
todd.o.callen
02-05-2003, 07:25 PM
Originally posted by djr
Jared,
I'm not at my own PC right now,m but when I get home i'll post my files here with full instructions.
The hack is not really difficult, but it's probably not really updated for vB 2.2.x.
- djr
Will this work in 2.2.9?
limey
02-16-2003, 03:28 PM
I just get a blank page....
mashby
03-11-2003, 02:04 PM
Although I've had it installed on my board for quite some time, I finally started using it recently and I've noticed a glitch.
For some reason I don't receive the full text of the post. It cuts off shortly after the copyright section, which is about one page of copy
Anyone else run into this and have a fix?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.