vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Download a PalmDoc Version (https://vborg.vbsupport.ru/showthread.php?t=23966)

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:
PHP Code:

onTheFlyPalmDoc($output"$output"$pdbname); 

To:
PHP Code:

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! :)

red 08-11-2001 06:32 PM

...or try to disable gzip output in admincp. now it works for me! thx for support from author!


All times are GMT. The time now is 12:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01169 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete